diff --git a/.clang-format b/.clang-format new file mode 100755 index 0000000..eb26853 --- /dev/null +++ b/.clang-format @@ -0,0 +1,102 @@ +--- +AccessModifierOffset: 0 +AlignAfterOpenBracket: Align +AlignArrayOfStructures: None +AlignConsecutiveAssignments: + Enabled: true + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: true + AlignFunctionDeclarations: true + AlignFunctionPointers: true + PadOperators: true +AlignConsecutiveBitFields: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveDeclarations: + Enabled: true + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: true + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveShortCaseStatements: + Enabled: true + AcrossEmptyLines: false + AcrossComments: false + AlignCaseArrows: false + AlignCaseColons: false +AlignConsecutiveTableGenCondOperatorColons: + Enabled: true + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveTableGenDefinitionColons: + Enabled: true + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: true + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignEscapedNewlines: Left +AlignOperands: Align +AlignTrailingComments: + Kind: Always + OverEmptyLines: 0 +AllowAllArgumentsOnNextLine: true +AllowBreakBeforeNoexceptSpecifier: Never +AllowShortCaseExpressionOnASingleLine: true +AllowShortCompoundRequirementOnASingleLine: true +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortBlocksOnASingleLine: true +AllowShortCaseLabelsOnASingleLine: false +AllowShortEnumsOnASingleLine: true +AllowShortFunctionsOnASingleLine: true +AllowShortIfStatementsOnASingleLine: true +AllowShortLambdasOnASingleLine: Empty +AllowShortLoopsOnASingleLine: false +BinPackArguments: false +BinPackParameters: false +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: false + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + BeforeCatch: false + BeforeElse: false + IndentBraces: false +BreakBeforeBraces: Custom +ColumnLimit: 120 +IncludeBlocks: Preserve +IndentWidth: 4 +InsertNewlineAtEOF: true +KeepEmptyLinesAtTheStartOfBlocks: true +QualifierAlignment: Left +CommentPragmas: '^.*A2Lfactory:' +--- +Language: Cpp +Standard: c++20 +... diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 0000000..19d823e --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,15 @@ +Checks: > + -*, + clang-analyzer-*, + cert-*, + cppcoreguidelines-*, + bugprone-*, + google-*, + misc-*, + performance-*, + readability-*, + modernize-*, + -modernize-use-trailing-return-type, + -readability-identifier-length, + -misc-non-private-member-variables-in-classes + diff --git a/.gitignore b/.gitignore index 1e17110..c3dc3b5 100755 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,28 @@ .DS_Store .directory +toolchain.cmake +actions-runner/* +actions-runner/_work actions-runner -CMakeLists.txt assets/flippy.psd cmake-build* .idea .run - +compile_commands.json +build-* +build/ +cmakerc +logs/ +.clangd demo_out flippy/flippy.hpp-e discarded tests/test.info tests/test_out -logs tests/res banner.old doxygen_warnings.log make_doxygen_html.sh make_single_header_flippy.sh -benchmarks -code_overview /actions-runner/_work +/demo/planar_membrane_sheet_fluctuation_MC/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100755 index 0000000..c8fa672 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,51 @@ +cmake_minimum_required(VERSION 3.16) +project(flippy) +file(READ "VERSION.json" ver) +string(JSON ver GET ${ver} VERSION) +string(REGEX MATCHALL "[0-9]+.[0-9]+.[0-9]+" version ${ver}) +string(REGEX MATCHALL "-.+" pre_release_flag ${ver}) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +if("${pre_release_flag}" STREQUAL "") + message("no prerelease flags to set") + project(flippy VERSION ${version}) +else() + project( + flippy + VERSION ${version} + DESCRIPTION ${pre_release_flag}) + message("prerelease flag: ${pre_release_flag}") +endif() + +if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC) + message("building for MSVC") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O2") +else() + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3") +endif() + +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -g -fno-omit-frame-pointer") + +set(FLIPPY_COMPILE_OPTIONS + -Wall + -Wextra + -Wpedantic + -Wshadow + -Wconversion + -Wswitch-enum + -Werror + -ffast-math + # gToDo: remove this after fixing nlohmann dependency + -Wno-nan-infinity-disabled + # gToDo: remove this after fixing catch2 dependency + -Wno-c2y-extensions) + +set(CMAKE_CXX_STANDARD 26) +set(CXX_STANDARD_REQUIRED ON) + +enable_testing() + +add_subdirectory(third_party) +add_subdirectory(tests) +add_subdirectory(demo) +add_subdirectory(benchmarks) diff --git a/README.md b/README.md index 3a26268..ba82af1 100755 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ [![EMail](https://img.shields.io/badge/EMail-D14836?logo=Mail.ru&logoColor=white&logoWidth=20)](mailto:flippy@mailbox.org) # *flippy* -flippy +flippy c++ package for dynamically triangulated membrane simulations. @@ -19,11 +19,11 @@ c++ package for dynamically triangulated membrane simulations. | guv splitting | guv splitting tiny | # Support -*flippy* is still in active development but has the first stable release. And a full public [API documentation](https://flippy-software-package.github.io/flippy). I am actively working on flippy and welcome pull requests and bug reports. +*flippy* is still in active development but has the first stable release. And a full public [API documentation](https://flippy-software-package.github.io/flippy). I am actively working on flippy and welcome pull requests and bug reports. I will also consider feature requests, but in that case, please provide a use case. ### for questions about general usage please use the support email [![EMail](https://img.shields.io/badge/EMail-D14836?logo=Mail.ru&logoColor=white&logoWidth=20)](mailto:flippy@mailbox.org). -### for bugfixes +### for bugfixes please create an [issue](https://github.com/flippy-software-package/flippy/issues). ### for feature requests again the [issues](https://github.com/flippy-software-package/flippy/issues) page can be used, but be aware that new features will be slow to come. @@ -32,10 +32,8 @@ again the [issues](https://github.com/flippy-software-package/flippy/issues) pag *flippy* is a header-only library, so all you need to do is to download the `flippy` sub-folder and copy it into your project. -Or, if you prefer using a single header file, you can download the [flippy.hpp](https://raw.githubusercontent.com/flippy-software-package/flippy/master/single_header_flippy/flippy.hpp) header from the `single_header_flippy` folder. - # Documentation -*flippy*'s public API is fully [documented](https://flippy-software-package.github.io/flippy). However, if you have never used *flippy* before, you might want to start with the demo projects. These are located in sub-folders of the [`demo`](https://github.com/flippy-software-package/flippy/tree/master/demo) folder. Each sub-folder contains a readme like this one, explaining how to set up a project and what to expect. +*flippy*'s public API is fully [documented](https://flippy-software-package.github.io/flippy). However, if you have never used *flippy* before, you might want to start with the demo projects. These are located in sub-folders of the [`demo`](https://github.com/flippy-software-package/flippy/tree/master/demo) folder. Each sub-folder contains a readme like this one, explaining how to set up a project and what to expect. Automatically generated code [documentation](https://github.com/flippy-software-package/flippy/wiki/Documentation) over on the [wiki](https://github.com/flippy-software-package/flippy/wiki). # Citing flippy @@ -64,86 +62,125 @@ This code can be found in the sub-folder `demo/biconcave_shapes_MC` together wit ```cpp //demo/biconcave_shapes_MC/main.cpp -#include // needed for random displacement generation -#include // need for std::vector -#include // needed for std::cout #include "flippy.hpp" +#include // needed for std::cout +#include // needed for random displacement generation and node index shuffling +#include // need for std::vector + +fp::Real sphere_vol(fp::Real R) { return fp::Real(4. / 3.) * fp::PI * R * R * R; } +fp::Real sphere_area(fp::Real R) { return fp::Real(4.) * fp::PI * R * R; } + +struct EnergyParameters { + fp::Real kappa, K_V, K_A, V_t, A_t; +}; + +// This is the energy function that is used by flippy's built-in updater to decide if a move was energetically favorable +// or not +fp::Real surface_energy(const fp::Node &node, + const fp::Triangulation &trg, + const EnergyParameters &p, + const std::vector &changed_neighbourhood) { + fp::Real V = trg.global_geometry().volume; + fp::Real A = trg.global_geometry().area; + fp::Real dV = V - p.V_t; + fp::Real dA = A - p.A_t; + fp::Real E_bending = fp::node_unit_bending_energy(node); + for (fp::Index changed_node_id : changed_neighbourhood) { + E_bending += fp::node_unit_bending_energy(node); + } -double sphere_vol(double R){return 4./3. * M_PI *R*R*R;} -double sphere_area(double R){return 4. * M_PI *R*R;} - -struct EnergyParameters{double kappa, K_V, K_A, V_t, A_t;}; - -// This is the energy function that is used by flippy's built-in updater to decide if a move was energetically favorable or not -double surface_energy([[maybe_unused]]fp::Node const& node, - fp::Triangulation const& trg, - EnergyParameters const& prms){ - double V = trg.global_geometry().volume; - double A = trg.global_geometry().area; - double dV = V-prms.V_t; - double dA = A-prms.A_t; - double energy = prms.kappa*trg.global_geometry().unit_bending_energy + - prms.K_V*dV*dV/prms.V_t + prms.K_A*dA*dA/prms.A_t; + fp::Real energy = (p.kappa * E_bending) + (p.K_V * dV * dV / p.V_t) + (p.K_A * dA * dA / p.A_t); return energy; } -int main(){ - int n_triang = 7; // triangulation iteration number of nodes N_node=12+30*n+20*n*(n-1)/2 where n is the same as n_trng - double l_min = 2; - double R = l_min/(2*sin(asin(1./(2*sin(2.*M_PI/5.)))/(n_triang+1.))); // estimate of a typical bond length in the initial triangulation and then create a sphere such that the initial bond length is close to minimal. This formula is derived from the equidistant sub-triangulation of an icosahedron, where geodesic distances are used as a distance measure. - double l_max = 2.*l_min; // if you make l_max closer to l_min bond_flip acceptance rate will go down - double r_Verlet = 2*l_max; - EnergyParameters prms{.kappa=10 /*kBT*/, - .K_V=100 /*kBT/area*/, .K_A=1000 /*kBT/volume*/, - .V_t=0.6*sphere_vol(R), .A_t=sphere_area(R)}; - double linear_displ=l_min/8.; // side length of a voxel from which the displacement of the node is drawn - int max_mc_steps=1e5; // max number of iteration steps (depending on the strength of your CPU, this should take anywhere from a couple of seconds to a couple of minutes +#include "../benchmarks/external/code_utils.hpp" //ToDo Remove before prod + +int main() { + cutils::Timer t; + int n_triang = + 7; // triangulation iteration number of nodes N_node=12+30*n+20*n*(n-1)/2 where n is the same as n_trng + fp::Real l_min = 2; + fp::Real R = + l_min / + (2 * sin(asin(1. / (2 * sin(2. * M_PI / 5.))) / (n_triang + 1.))); // estimate of a typical bond length in the + // initial triangulation and then create a sphere such that the initial bond length is close to minimal. This + // formula is derived from the equidistant sub-triangulation of an icosahedron, where geodesic distances are used as + // a distance measure. + fp::Real l_max = 1.8 * l_min; // if you make l_max closer to l_min bond_flip acceptance rate will go down + fp::Real r_Verlet = 2 * l_max; + fp::Real red_vol = 0.6; + EnergyParameters prms{.kappa = 10 /*kBT*/, + .K_V = 100 /*kBT/area*/, + .K_A = 1000 /*kBT/volume*/, + .V_t = red_vol * sphere_vol(R), + .A_t = sphere_area(R)}; + fp::Real linear_displ = l_min / 18.; // side length of a voxel from which the displacement of the node is drawn + int max_mc_steps = 2e5; // max number of iteration steps (depending on the strength of your CPU, this should take + // anywhere from a couple of seconds to a couple of minutes std::random_device random_number_generator_seed; - std::mt19937 rng(random_number_generator_seed()); // create a random number generator and seed it with the current time + std::mt19937 rng( + random_number_generator_seed()); // create a random number generator and seed it with the current time // All the flippy magic is happening on the following two lines - fp::Triangulation guv(n_triang, R, r_Verlet); - fp::MonteCarloUpdater mc_updater(guv, prms, surface_energy, rng, l_min, l_max); + fp::Triangulation guv(n_triang, R, r_Verlet); + fp::MonteCarloUpdater mc_updater(guv, prms, surface_energy, rng, l_min, l_max); - fp::vec3 displ{}; // declaring a 3d vector (using flippy's built in vec3 type) for later use as a random direction vector - std::uniform_real_distribution displ_distr(-linear_displ, linear_displ); //define a distribution from which the small displacements in x y and z directions will be drawn + fp::vec3 displ{}; // declaring a 3d vector (using flippy's built in vec3 type) for later use as a random + // direction vector + std::uniform_real_distribution displ_distr(-linear_displ, linear_displ); // define a distribution from + // which the small displacements in x y and z directions will be drawn - guv.scale_node_coordinates(1, 1, 0.8); // squish the sphere in the z-direction to break the initial symmetry. This speeds up the convergence to a biconcave shape greatly. + guv.scale_node_coordinates(1, 1, 0.85); // squish the sphere in the + // z-direction to break the initial symmetry. This speeds up the convergence to a biconcave shape greatly. fp::Json data_init = guv.make_egg_data(); - fp::json_dump("test_run_init", data_init); // ATTENTION!!! this file will be saved in the same folder as the executable + fp::json_dump("test_run_init", + data_init); // ATTENTION!!! this file will be saved in the same folder as the executable std::vector shuffled_ids; shuffled_ids.reserve(guv.size()); - for(auto const& node: guv.nodes()){ shuffled_ids.push_back(node.id);} //create a vector that contains all node ids. We can shuffle this vector in each MC step to iterate randomly through the nodes + for (const auto &node : guv.nodes()) { + shuffled_ids.push_back(node.id); + } // create a vector that contains all node ids. We can shuffle this vector in each MC step to iterate randomly + // through the nodes - for(int mc_step=0; mc_step + + + + + + + + + + + + + diff --git a/assets/flippy_icon.png b/assets/flippy_icon.png old mode 100644 new mode 100755 diff --git a/assets/move and flipp updates.png b/assets/move and flipp updates.png old mode 100644 new mode 100755 diff --git a/assets/structure_of_flippy.png b/assets/structure_of_flippy.png old mode 100644 new mode 100755 diff --git a/assets/triangulation.png b/assets/triangulation.png old mode 100644 new mode 100755 diff --git a/assets/triangulation.svg b/assets/triangulation.svg old mode 100644 new mode 100755 diff --git a/assets/triangulation_four_panels.svg b/assets/triangulation_four_panels.svg old mode 100644 new mode 100755 diff --git a/banner b/banner index 2c2649e..5fa220b 100755 --- a/banner +++ b/banner @@ -9,7 +9,7 @@ * 888 888 888 888 888 888 888 888 888 dynamically triangulated * 888 888 888 888 d88P 888 d88P Y88b 888 surfaces * 888 888 888 88888P" 88888P" "Y88888 - * 888 888 888 version 1.0.1 + * 888 888 888 version 1.1.0 * 888 888 Y8b d88P * 888 888 "Y88P" * diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt new file mode 100755 index 0000000..c6456d3 --- /dev/null +++ b/benchmarks/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.16) + +# include_directories(micro_benchmarks) +include_directories(external/google_benchmark) +include_directories(external) +include_directories(benchmark_logger) +include_directories(../flippy) +include_directories(../flippy/utilities) +include_directories(.) + +# add_subdirectory(micro_benchmarks/vec3_bench) +add_subdirectory(rbc_bench) diff --git a/benchmarks/benchmark-main.zip b/benchmarks/benchmark-main.zip new file mode 100755 index 0000000..b7d5ff3 Binary files /dev/null and b/benchmarks/benchmark-main.zip differ diff --git a/benchmarks/benchmark_logger/FlippyBenchmarkLogger.h b/benchmarks/benchmark_logger/FlippyBenchmarkLogger.h new file mode 100644 index 0000000..901fdba --- /dev/null +++ b/benchmarks/benchmark_logger/FlippyBenchmarkLogger.h @@ -0,0 +1,108 @@ +#ifndef NODES_HPP_FLIPPYBENCHMARKLOGGER_H +#define NODES_HPP_FLIPPYBENCHMARKLOGGER_H +#include +#include +#include + +template + +concept Updater = requires(U u, + fp::Triangulation triangulation, + fp::Node node, + fp::Index nn_id, + fp::vec3 displacement, + unsigned long long z, + std::ostream &os) { + // { U(triangulation, node) } -> std::same_as; + + { u.move_MC_updater(node, displacement) } -> std::same_as>; + { u.flip_MC_updater(node, nn_id) } -> std::same_as; + + { u.move_attempt_count() } -> std::same_as; + { u.bond_length_move_rejection_count() } -> std::same_as; + { u.move_back_count() } -> std::same_as; + + { u.flip_attempt_count() } -> std::same_as; + { u.bond_length_flip_rejection_count() } -> std::same_as; + { u.flip_back_count() } -> std::same_as; +}; + +template class FlippyBenchmarkLogger { + const Updater &mcu_; + const fp::Triangulation &triangulation_; + cutils::Timer timer{}; + + FlippyBenchmarkLogger(const Updater &mcu, const fp::Triangulation &triangulation) + : mcu_(mcu), triangulation_(triangulation) {}; + + public: + static FlippyBenchmarkLogger start_benchmark(const Updater &mcu, const fp::Triangulation &triangulation) { + FlippyBenchmarkLogger logger(mcu, triangulation); + + PRINT("each of ", triangulation.size(), " beads will be attempted to be moved: ", "XXX", "(predicted) times"); + PRINT("leading to a total of", "XXX", "(predicted) MC moves"); + + return logger; + } + + std::string log(const std::string &log_dir, const fp::Json &config_data) { + cutils::HumanReadableTime elapsed_time = timer.stop(); + // MonteCarloUpdater counts the number of accepted and rejected moves, distinguishing whether a rejection + // occurred because of the energy or the bond length constraint. We can use this to print simple statistics + // here. For example, this will help us decide if our displacement size is too large. + auto attempt = mcu_.move_attempt_count(); + auto put_back = mcu_.move_back_count(); + auto bond_length_legal_move = attempt - mcu_.bond_length_move_rejection_count(); + + auto attempt_flip = mcu_.flip_attempt_count(); + auto flip_back = mcu_.flip_back_count(); + + auto topologically_successful_flip = mcu_.flip_attempt_count() - flip_back; + PRINT("percentage of failed moves: ", + static_cast(mcu_.move_back_count() + mcu_.bond_length_move_rejection_count()) / + static_cast(mcu_.move_attempt_count())); + PRINT("percentage of failed flips: ", + static_cast(mcu_.flip_back_count() + mcu_.bond_length_flip_rejection_count()) / + static_cast(mcu_.flip_attempt_count())); + + long double time_in_seconds = ((long double)elapsed_time.diff_ns) * 1.e-9l; + long double moves_ps = static_cast(attempt) / static_cast(time_in_seconds); + long double e_moves_ps = + static_cast(bond_length_legal_move) / static_cast(time_in_seconds); + long double flips_ps = static_cast(attempt_flip) / static_cast(time_in_seconds); + long double e_flips_ps = + static_cast(topologically_successful_flip) / static_cast(time_in_seconds); + + auto now = std::chrono::system_clock::now(); + std::time_t now_time = std::chrono::system_clock::to_time_t(now); + std::tm *time = std::localtime(&now_time); + std::stringstream date, time_stamp; + date << 1900 + time->tm_year << "-" << time->tm_mon + 1 << "-" << time->tm_mday; + time_stamp << time->tm_hour << "-" << time->tm_min << "-" << time->tm_sec; + + std::string log_sub_dir = log_dir + date.str() + "/"; + std::filesystem::create_directories(log_sub_dir); + + std::string log_name = log_sub_dir + time_stamp.str() + ".yml"; + + std::ofstream log_file(log_name); + log_file << "BENCHMARK VERSION: " << config_data["benchmark_version"].get() << '\n'; + log_file << "config: " << config_data << '\n'; + log_file << "all_attempted_bead_moves: " << attempt << '\n'; + log_file << "expensive_moves: " << bond_length_legal_move << '\n'; + log_file << "rejected_moves_stochastic: " << put_back << '\n'; + log_file << "all_attempted_flips: " << attempt_flip << '\n'; + log_file << "expensive_flips: " << topologically_successful_flip << '\n'; + log_file << "rejected_flip_stochastic: " << flip_back << '\n'; + log_file << "total_simulation_time: " << elapsed_time.diff << " " << elapsed_time.unit << " (" + << elapsed_time.diff_fine << " " << elapsed_time.unit_fine << ")" << '\n'; + log_file << "mps: " << moves_ps << '\n'; + log_file << "emps: " << e_moves_ps << '\n'; + log_file << "fps: " << flips_ps << '\n'; + log_file << "efps: " << e_flips_ps << '\n'; + log_file.close(); + return log_name; + } +}; + +#endif // NODES_HPP_FLIPPYBENCHMARKLOGGER_H diff --git a/benchmarks/experimental/Node_Static_NN_ARRAYS.hpp b/benchmarks/experimental/Node_Static_NN_ARRAYS.hpp new file mode 100644 index 0000000..84bf4c3 --- /dev/null +++ b/benchmarks/experimental/Node_Static_NN_ARRAYS.hpp @@ -0,0 +1,250 @@ +#ifndef FLIPPY_NODES_EXPERIMENTAL_HPP +#define FLIPPY_NODES_EXPERIMENTAL_HPP +/** + * @file + * @brief This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node of the + * triangulation and the collection of all nodes of the triangulation, respectively. + */ +#include "external/json.hpp" +#include "vec3.hpp" +#include +#include + +namespace fp::experimental { + +constexpr unsigned int MAX_ALLOWED_NEIGHBORS = 16; + +template class NeighborsArray : public std::array { + public: + using std::array::array; + size_t size() { return size_; } + + void emplace(size_t idx, T &&val) { + for (size_t i = size_; i > idx; --i) { + this->data()[i] = this->data()[i - 1]; + } + this->data()[idx] = val; + size_++; + } + // void pop(size_t idx){ + // for(size_t i = size_ - 1; ) + // move_left(idx, this); + // } + + private: + // void move_left(size_t start, ) + size_t size_{}; +}; + +using Json = nlohmann::json; +//! A data structure containing all geometric and topological information associated with a node. +/** + * This is a DUMB DATA STRUCTURE, meaning that it is not responsible for the coherence of the data it contains. + * For performance reasons, methods associated with Node struct will never check if the Node::curvature is the norm of + * the Node::curvature_vector or if the Node::nn_ids and Node::nn_distances are in the correct order. It is the + * responsibility of higher-order structures like Nodes and Triangulation to check that correct data is stored and + * updated correctly. However, it does check the data for consistency. It will match the length of Node::nn_ids and + * Node::nn_distances and pop and add both of them together. + * @tparam Real @RealStub + * @tparam Index @IndexStub + */ +template struct Node { + //! @NodeIDStub + Index id; + //! Voronoi area associated with the node. + /** + * The Voronoi area is the sum of (mixed) Voronoi areas inside the triangles, incident to the node. + * Definition follows [Gueguen et al. 2017](https://doi.org/10.1039/C7SM01272A). + * \f[ + * A_{i} = \sum_{j} A'_{ij}. + * \f] + * + * @see Triangulation::mixed_area + * See Figure tr1. C in Triangulation. + * @see Node::curvature_vec Triangulation::update_bulk_node_geometry(Index) + */ + Real area; + //! If the node is part of a closed surface triangulation, then the `volume` contains the volume of the tetrahedron + //! connected to each voronoi cell sub-triangle and the center of the lab coordinate system as defined in [Gueguen + //! et al. 2017](https://doi.org/10.1039/C7SM01272A). + /** * This means that the volume of an individual node does not have a proper physical interpretation. + * Only the sum of all node volumes, which is given by the triangulation + * is interpretable as a physical volume of an object. + * The definition follows [Gueguen et al. 2017](https://doi.org/10.1039/C7SM01272A). + * \f[ + * V_{ij} = A_{ij} \vec{x}_{i}\cdot \frac{\vec{n}_{ij,j+1}}{\| \vec{n}_{ij,j+1} \|}. + * \f] + * See Figure tr1. D in Triangulation. + * @see Node::curvature_vec Triangulation::update_bulk_node_geometry(Index) + */ + Real volume; + //! `unit_bending_energy` corresponds to the [Helfrich bending + //! energy](https://en.wikipedia.org/wiki/Elasticity_of_cell_membranes) with bending rigidity 1 and gaussian bending + //! stiffness 0. + /** + * \f[ + * \mathrm{unit\_bending\_energy} = \frac{1}{2} A_{\mathrm{node}} (2 H_{node})^2 + * \f] + * where \f$ H_{node} \f$ is the mean curvature of the node given by: + * \f[ + * H_{node}^2 = \frac{\vec{K}_{node}}{2A_{node}} \cdot \frac{\vec{K}_{node}}{2A_{node}} + * \f], + * with \f$ \vec{K} \f$ denoting the Node::curvature_vector. + * @see Node::curvature_vec Triangulation::update_bulk_node_geometry(Index) + */ + Real unit_bending_energy; + //! Position of the node in the lab frame. + vec3 pos; + //! Curvature vector of the node. + /** + * The definition of the curvature vector follows [Meyer et al. 2003](https://doi.org/10.1007/978-3-662-05105-4_2). + * \f[ + * \vec{K}_i = \frac{1}{2A_i}\sum_{j(i)} \left( \cot\left(\alpha_{ij}^{j+1}\right) + + * \cot\left(\alpha_{ij}^{j-1}\right) \right)\vec{\ell}_{ij} + * \f] + * See Figure tr1. B in Triangulation. + * @see Node::curvature_vec Triangulation::update_bulk_node_geometry(Index) + */ + vec3 curvature_vec; + //! A vector containing the global ids of the current node's next neighbors. + /** + * `nn_ids` contains the ids of nodes that are connected to this node in the triangulation. + * The next neighbors that are also mutual neighbors in the triangulation are stored sequentially in the vector. + * The last and the first elements are also neighbors, i.e., the nn_ids vector wraps around. + * During the calculation, this is facilitated through the use of @ref fp::Neighbors. + * @note The order of the next neighbors matters for the proper function of fp::Triangulation but is not guaranteed + * by this data structure. See Figure tr1. A, in Triangulation. + */ + NeighborsArray nn_ids; + //! Distance vectors pointing from the node to its next neighbors. + NeighborsArray> nn_distances; + //! The Verlet list contains the ids of nodes that are close to this node. + std::vector verlet_list; + + // unit-tested + //! Find and deletes the element with the id `to_pop_nn_id` in the `nn_id` vector. + void pop_nn(Index to_pop_nn_id) { + /** + * @param to_pop_nn_id @NNIDStub This id is supposed to be removed from the next neighbor id vector. + * @see Node::nn_ids + * @note this will lead to resizing of the vector, which can be expensive! + * @warning If the provided next neighbor id is not part of the Node::nn_ids, this function will fail silently. + * It will not delete anything and won't throw any errors or warnings; + */ + auto pop_pos = find_nns_loc_pointer(to_pop_nn_id); + auto dist = pop_pos - nn_ids.begin(); + + if (pop_pos != nn_ids.end()) { + // I checked that this would work on example code on cppreference https://godbolt.org/z/6qf8c9nTz + nn_ids.erase(pop_pos); + nn_distances.erase(nn_distances.begin() + dist); + } + } + + auto find_nns_loc_pointer(Index nn_id) { + /** + * @brief Given the global id of the next neighbor, this function can be used to locate it in the Node::nn_ids + * vector. + * + * This function is just a convenient wrapper around the + * [std::find](https://en.cppreference.com/w/cpp/algorithm/find) function. + * ``` + * std::find(nn_ids.begin(), nn_ids.end(), to_pop_nn_id); + * ``` + * @param nn_id @NNIDStub + * @return if `nn_id` is contained in Node::nn_ids then the pointer to the position of that id in the `nn_ids` + * vector will be returned. Otherwise `nn_ids.end()`. + * @warning This function is not responsible for graceful handling of `nn_id`'s that are not found in the + * Node::nn_ids vector. If the `nn_id` is not contained in Node::nn_ids then the `nn_ids.end()` iterator will be + * returned. It is up to the user to perform the necessary checks to avoid undefined behavior that might result + * from trying to delete uninitiated memory. + */ + return std::find(nn_ids.begin(), nn_ids.end(), nn_id); + } + + // unit-tested + void emplace_nn_id(Index to_emplace_nn_id, const vec3 &to_emplace_nn_pos, Index loc_idx) { + /** + * @brief This function can be used to add new next neighbors to this node. + * + * This function constructs `to_emplace_nn_id` right before `to_emplace_pos`, + * i.e. if to_emplace_nn_id is 3, to_emplace_nn_id will be constructed right before the + * 3rd element and will become the new 3rd element. + * @param to_emplace_nn_id @NNIDStub This id is supposed to be added to the Node::nn_ids vector of this node. + * @param to_emplace_nn_pos const reference to the 3 dimensional position vector (type vec3) containing + * the position of the new next neighbour. This input is used to calculate the correct distance between this + * node and the new next neighbor, which will then be added to the Node::nn_distances vector. + * @param loc_idx @LocNNIndexStub + * @note This function causes the resizing of two vectors, which can be costly. + * @warning Making next neighbors is a symmetric operation. I.e., if node one becomes the next neighbor of node + * two, node two also has to become the next neighbor of node one. However, this function is not responsible for + * this relationship. It only adds a new next neighbor to this node, and the higher-order structures, like + * Triangulation, are responsible for guaranteeing the reciprocal relationship. + * @see Triangulation::emplace_before(Index, Index, Index) + */ + if (loc_idx < nn_ids.size()) { + nn_ids.emplace(loc_idx, to_emplace_nn_id); + nn_distances.emplace(loc_idx, to_emplace_nn_pos - pos); + } + } + + // unit-tested + //! This function can provide the stored distance vector to the next neighbor. + const vec3 &get_distance_vector_to(Index nn_id) const { + /** + * @param nn_id @NNIDStub. + * @return returns the distance currently stored in the Node::nn_distances vector for the requested next + * neighbor. If the provided `nn_id` can not be found in the Node::nn_ids vector, then the function writes an + * error message to standard error output and terminates the program with exit code 12. + * @note @TerminationNoteStub + */ + auto id_pos = std::find(nn_ids.begin(), nn_ids.end(), nn_id); + if (id_pos != nn_ids.end()) { + return nn_distances[static_cast(id_pos - nn_ids.begin())]; + } else { + std::cerr << "nn_id:" << nn_id + << " provided to `get_distance_vector_to` is not a next neighbour of the node " << id; + exit(12); + } + } + + // defaulted operators are not explicitly unit-tested + /** + * @brief Default equality operator. + * + * @param other_node constant reference to the other Node. + * @return True if both nodes are equal. + */ + bool operator==(const Node &other_node) const = default; + + /** + * @brief Streaming operator that can print formatted output to standard out with all Node data fields. + * + * @param os This is intended to be std::cout or any other std::ofstream reference. + * @param node The streamed node. + * @return Updated stream. + */ + friend std::ostream &operator<<(std::ostream &os, const Node &node) { + + os << "node: " << node.id << '\n' + << "area: " << node.area << '\n' + << "volume: " << node.volume << '\n' + << "unit_bending_energy: " << node.unit_bending_energy << '\n' + << "curvature_vec: " << node.curvature_vec << '\n' + << "pos: " << node.pos << '\n' + << "nn_ids: "; + for (const auto &nn_id : node.nn_ids) { + os << nn_id << ' '; + } + os << '\n' << "nn_distances: "; + for (const auto &nn_dist : node.nn_distances) { + os << nn_dist << '\n'; + } + os << '\n'; + + return os; + } +}; + +} // namespace fp::experimental +#endif // FLIPPY_NODES_HPP diff --git a/benchmarks/experimental/vec3_valarray.h b/benchmarks/experimental/vec3_valarray.h new file mode 100644 index 0000000..0f67dd2 --- /dev/null +++ b/benchmarks/experimental/vec3_valarray.h @@ -0,0 +1,335 @@ +#ifndef FLIPPY_VEC3_EXPERIMENTAL_HPP +#define FLIPPY_VEC3_EXPERIMENTAL_HPP +/** + * @file + * @brief Header file containing the definition and implementation a 3 dimensional vector class, with useful + * mathematical operations like cross and dot products as member methods. + */ + +#include "custom_concepts.hpp" +#include +#include +#include +#include + +namespace fp::experimental { + +/** + * \brief Internal implementation of a 3D vector. + * + * !!! vec3 does not throw !!! This means that if you ask vec3 to divide a vector by 0 or more realistically if you + * normalize a zero length vector vec3 will not check for the division by zero and will return a nan result! + * Since vec3 is used everywhere in flippy, including in very expensive calculations, I decided to omit the security + * check for the sake of speed. + * + * To keep the external dependencies low, flippy implements it's own 3D vector class with basic functionality like dot + * product and cross product + * + * Example: + * ```c++ + * fp::vec3 v1{1,0,0}; + * fp::vec3 v2{0,0,1}; + * + * assert(v1.dot(v2)==0); + * assert(v1.cross(v2).norm()==1); + * assert(((v1-v2)==fp::vec3{1.,0.,-1.})); + * ``` + * + * @tparam Real @RealStub + */ + +template class vec3 { + std::valarray data_; + + public: + vec3() : data_(std::valarray(3)) {} + vec3(Real x, Real y, Real z) : data_(std::valarray{x, y, z}) {} + vec3(Real &&x, Real &&y, Real &&z) : data_(std::valarray{x, y, z}) {} + // vec3(Real const&x, Real const&y, Real const&z): data_(std::valarray{x, y, z}){} + + Real x() { return data_[0]; } //!< The x component of the vector. + Real y() { return data_[1]; } //!< The y component of the vector. + Real z() { return data_[2]; } //!< The z component of the vector. + + //! In place addition method. + /** + * Example: + * ```c++ + * fp::vec3 v1{1,0,0}; + * fp::vec3 v2{0,0,1}; + * v1.add(v2); // v1 will contain {1, 0, 1} + * ``` + * @param v add this vector elementwise to the vector that is calling the *add* method. + */ + void add(const vec3 &v) { data_ += v.data_; } + + //! In place subtraction method. + /** + * Example: + * ```c++ + * fp::vec3 v1{2,0,0}; + * fp::vec3 v2{1,0,1}; + * v1.subtract(v2); // v1 will contain {1, 0, -1} + * ``` + * @param v subtract this vector elementwise from the vector that is calling the *subtract* method. + */ + void subtract(const vec3 &v) { data_ -= v.data_; } + //! Scale the vector by a real number s. + /** + * This function scales the vector in-place by the provided number `s`. + * @param s multiplicative prefactor. + */ + void scale(Real s) { data_ *= s; } + + //! Calculate dot product with another vector. + /** + * Example: + * @code{c++} + * fp::vec3 v1{1,0,0}; + * fp::vec3 v2{2,0,1}; + * double res = v1.dot(v2); // res will contain 2*1 + 0*0 + 0*1=2 + * @endcode + * @param v the other vec3 vector + * @return result of the dot product between the original vector and `v`. + */ + Real dot(const vec3 &v) const { return (data_ * v.data_).sum(); } + + //! Always returns 3. + /** + * This function always returns 3 since vec3 can only have three elements. + * It was implemented for completeness, to make it more easy for vec3 to be used as a drop-in replacement for other + * vector types. + * @return Size (number of elements) of vec3. + */ + [[nodiscard]] constexpr std::size_t size() const { return data_.size(); } + + //! Calculate cross product between two vectors. + /** + * A static method to calculate cross product between two vectors. + * Example: + * @code{c++} + * fp::vec3 v1{1,0,0}; + * fp::vec3 v2{0,1,0}; + * fp::vec3 v3 = cross(v1, v2); // v3 will contain {0,0,1} + * @endcode + * @param a first vector of the cross product + * @param b second vector of the cross product + * @return result of the cross product between the original vector and `v`. + */ + static inline vec3 cross(const vec3 &a, const vec3 &b) { + vec3 res; + std::valarray as = a.data_.cshift(1); + std::valarray bs = b.data_.cshift(-1); + + res.data_ = as * bs; + + as = as.cshift(1); + bs = bs.cshift(-1); + + res.data_ -= as * bs; + + return res; + } + + //! Calculate cross product with another vector. + /** + * Example: + * @code{c++} + * fp::vec3 v1{1,0,0}; + * fp::vec3 v2{0,1,0}; + * fp::vec3 v3 = v1.cross(v2); // v3 will contain {0,0,1} + * @endcode + * @param other the other vec3 vector. + * @return result of the cross product between the original vector and `other`. + */ + vec3 cross(const vec3 &other) const { return cross(*this, other); } + + //! Returns the norm of the vector. + /** + * Example: + * @code{c++} + * fp::vec3 v{1,0,1}; + * double res = v.norm(); // res will contain 1,4142135624... i.e. sqrt(2) + * @endcode + * @return The euclidian norm of the vector. + */ + Real norm() const { return std::sqrt(this->dot(*this)); } + + //! Returns the square of the norm of the vector. + /** + * Example: + * @code{c++} + * fp::vec3 v{1,0,1}; + * double res = v.norm_square(); // res will contain 2 + * @endcode + * @return Square of the euclidian norm of the vector. + */ + Real norm_square() const { return this->dot(*this); } + + //! Normalize the vector in place. And return a reference to the new normalized vector. + /** + * @warning If you normalize a zero length vector, you effectively + * demand to divide by zero! this function will not do a security check + * for you and will just return nan! + * @return Reference to the normalized vector. + */ + const vec3 &normalize() { + *this = *this / this->norm(); + return *this; + } + + //! Streaming operator for easy printing of the vector. + friend std::ostream &operator<<(std::ostream &os, const vec3 &obj) { + os << "{" << obj.x() << ',' << obj.y() << ',' << obj.z() << '}'; + return os; + } + + //! default equality operator. + /** + * @param other vec3 on the right hand side of the comparison operator. + * @return `true` if all elements of the compared vectors are equal and to `false` otherwise. + */ + bool operator==(const vec3 &other) const = default; + + //! Overloaded operator defined in terms of vec2::add. + /** + * + * @param lhs left hand side of the `+` operator + * @param rhs right hand side oif the `+` operator + * @return equivalent to a new copy of `lhs.add(rhs)`. + */ + friend vec3 operator+(vec3 lhs, const vec3 &rhs) { + lhs += rhs; + return lhs; + } + + //! Overloaded operator defined in terms of vec3::add. + /** + * Equivalent to `lhs.add(rhs)`. + * @param lhs left hand side of the `+=` operator + * @param rhs right hand side oif the `+=` operator + */ + friend void operator+=(vec3 &lhs, const vec3 &rhs) { lhs.add(rhs); } + + //! Overloaded operator defined in terms of vec3::subtract. + /** + * + * @param lhs left hand side of the `-` operator + * @param rhs right hand side oif the `-` operator + * @return equivalent to a new copy of `lhs.subtract(rhs)`. + */ + friend vec3 operator-(vec3 lhs, const vec3 &rhs) { + lhs -= rhs; + return lhs; + } + + //! Overloaded operator defined in terms of vec3::subtract. + /** + * Equivalent to `lhs.subtract(rhs)`. + * @param lhs left hand side of the `-=` operator + * @param rhs right hand side oif the `-=` operator + */ + friend void operator-=(vec3 &lhs, const vec3 &rhs) { lhs.subtract(rhs); } + + //! Overloaded operator defined in terms of vec3::scale. + /** + * Left multiplication by a scalar `s*v`. + * @param lhs left hand side of the `*` operator + * @param rhs right hand side oif the `*` operator + * @return equivalent to a new copy of `rhs.scale(lhs)`. + */ + friend vec3 operator*(const Real &lhs, vec3 rhs) { + rhs.scale(lhs); + return rhs; + } + + //! Overloaded operator defined in terms of vec3::scale. + /** + * Right multiplication by a scalar `v*s`. + * @param lhs left hand side of the `*` operator + * @param rhs right hand side oif the `*` operator + * @return equivalent to a new copy of `lhs.scale(rhs)`. + */ + friend vec3 operator*(vec3 lhs, const Real &rhs) { + lhs.scale(rhs); + return lhs; + } + + //! Overloaded operator defined in terms of vec3::scale. + /** + * In place division by a scalar `v/s`, equivalent to `lhs.scale(1/rhs)`. + * @param lhs left hand side of the `/=` operator + * @param rhs right hand side oif the `/=` operator + * @warning for performance reasons, this function will not check for zero division! + */ + friend void operator/=(vec3 &lhs, const Real &rhs) { lhs.scale((Real)1. / rhs); } + + //! Overloaded operator defined in terms of vec3::scale. + /** + * Division by a scalar `v/s`. + * @param lhs left hand side of the `/` operator + * @param rhs right hand side oif the `/` operator + * @return equivalent to a new copu of `lhs.scale(1/rhs)`. + * @warning for performance reasons, this function will not check for zero division! + */ + friend vec3 operator/(vec3 lhs, const Real &rhs) { + lhs /= rhs; + return lhs; + } + + //! element access operator. + /** + * @tparam Index automatically deduced type of the index. + * @param idx can only be 0 1 or 2. Any other number will cause the program to exit with an error. + * @return for a vec3 v: v[1] returns v.x, v[2] returns v.y and v[3] returns v.z. + * + * @note: The use of the subscription operator might be slower than the direct access of the data member. + */ + template + requires std::is_integral_v + Real &operator[](Index idx) { + assert(idx < 3); + return data_[idx]; + } + + //! element access operator for constant environments. + /** + * @tparam Index automatically deduced type of the index. + * @param idx can only be 0 1 or 2. Any other number will cause the program to exit with an error. + * @return for a vec3 v: v[1] returns a constant reference to v.x, v[2] returns a constant reference to v.y and v[3] + * returns a constant reference to v.z. + * + * @note: The use of the subscription operator might be slower than the direct access of the data member. + */ + template + requires std::is_integral_v + const Real &operator[](Index idx) const { + assert(idx < 3); + return data_[idx]; + } + + //! Unary minus operator. + /** + * + * @param v original vector. + * @return A copy of -v the vector v itself stays unaffected. + */ + friend vec3 operator-(vec3 v) { + v.data_ = -v.data_; + return v; + } + + //! Unary minus operator for rvalues. + /** + * + * @param v an rvalue vec3 vector. + * @return The rvalue vector `v` is moved into the function and `-v` is returned. + */ + friend vec3 operator-(vec3 &&v) { + v.data_ = -v.data_; + return v; + } +}; +} // namespace fp::experimental + +#endif // FLIPPY_VEC3_HPP diff --git a/benchmarks/external/code_utils.hpp b/benchmarks/external/code_utils.hpp new file mode 100644 index 0000000..392c5bc --- /dev/null +++ b/benchmarks/external/code_utils.hpp @@ -0,0 +1,279 @@ +#pragma once +#include +#include +#include +#include +#include + +namespace cutils { + +#if LOGGING_ON +#define LOGN(x) \ + std::cout << #x << ": "; \ + cutils::print(x) +#else +#define LOGN(x) +#endif + +#if LOGGING_ON +#define LOG(...) cutils::print(__VA_ARGS__) +#else +#define LOG(...) ; +#endif + +#if PRINTING_ON +#define PRINT(...) cutils::print(__VA_ARGS__) +#else +#define PRINT(...) +#endif + +template +concept Beginable = requires(C c) { std::begin(c); }; +template +concept Endable = requires(C c) { std::end(c); }; +template +concept NeqableBeginAndEnd = requires(C c) { + { std::begin(c) != std::end(c) } -> std::same_as; +}; +template +concept BeginIncrementable = requires(C c) { std::begin(c)++; }; +template +concept BeginDerefable = requires(C c) { *std::begin(c); }; +template +concept BeginDerefToVoid = requires(C c) { + { *std::begin(c) } -> std::same_as; +}; + +template +concept BeginAndEndCopyConstructibleAndDestructible = requires(C c) { + requires std::destructible && std::destructible && + std::copy_constructible && std::copy_constructible; +}; + +template +concept Container = Beginable && Endable && NeqableBeginAndEnd && BeginIncrementable && BeginDerefable && + !BeginDerefToVoid && BeginAndEndCopyConstructibleAndDestructible; + +template +concept StdOutStreamable = requires(T t) { std::cout << t; }; +template +concept OutStreamable = requires(std::ostream os, T t) { os << t; }; +template +concept InStreamable = requires(std::istream os, T t) { os >> t; }; + +template +concept Printable = StdOutStreamable || Container; + +template static void print(); +template static void print(const Container auto &output); +template static void print(const Printable auto &first, const Printable auto &...rest); + +struct HumanReadableTime { + std::string unit; + std::string unit_fine; + long long diff; + long long diff_fine; + long long diff_ns; +}; + +// ------------------------ IMPLEMENTATIONS ---------------------------- // + +template [[maybe_unused]] void print() { std::cout << end; } + +template [[maybe_unused]] void print(const Container auto &output) { + print('{'); + const auto &last_elem = *(output.end() - 1); + for (const auto &elem : output) { + if (elem != last_elem) { + print(elem, ','); + } else { + print(elem, '}'); + } + } +} + +/** + * Print function that can take an arbitrary number of arguments. It was implemented to work similarly to Pythons print + * function. + * @tparam Tfirst Type of the first argument (automatically deduced) + * @tparam Trest Type of the remaining part of the variadic number of arguments (automatically deduced) + * @param first First argument + * @param rest rest of the variadic arguments + * @returns nothing. + * @see print(const C>& output) + * @attention can not handle containers of containers. + * @warning if a container of zero length is provided the code will crush. + */ +// template +//[[maybe_unused]] void print(const Tfirst& first, const Trest& ... rest) +template +[[maybe_unused]] void print(const Printable auto &first, const Printable auto &...rest) { + if constexpr (StdOutStreamable) { + std::cout << first << sep; + } else { + print(first); + } + print(rest...); +} + +/** + * given a time difference in the highest clock resolution this struct constructs a human readable string of elapsed + * time. + */ +static HumanReadableTime human_readable_time(long long diff) { + std::string unit; + std::string unit_fine; + long long diff_ns = diff; + long long diff_fine = diff; + double diff_d = static_cast(diff); + if (diff_d / (1.e3l) < 1.l) { + unit = " ns"; + } else if (diff_d / 1.e6 < 1.) { + unit = " µs"; + diff /= 1000; + } else if (diff_d / 1.e9 < 1.) { + unit = " ms"; + diff /= 1000'000ll; + unit_fine = " µs"; + diff_fine /= 1000ll; + } else if (diff_d / (1.e9l * 60.l) < 1.l) { + unit = " s"; + diff /= 1000'000'000ll; + unit_fine = " ms"; + diff_fine /= 1000'000ll; + } else if (diff_d / (1.e9 * 3600.) < 1.) { + unit = " m"; + diff /= 60'000'000'000ll; + unit_fine = " s"; + diff_fine /= 1000'000'000ll; + } else { + unit = " h"; + diff /= 3600'000'000'000ll; + unit_fine = " m"; + diff_fine /= 60'000'000ll; + } + return {.unit = unit, .unit_fine = unit_fine, .diff = diff, .diff_fine = diff_fine, .diff_ns = diff_ns}; +} + +class Timer { + /** + * this class keeps time form its creation to destruction. I.e. it can + * time the duration of a scope. + * + * */ + private: + using Clock = std::conditional_t; + Clock::time_point Start = Clock::now(); + Clock::time_point Now; + bool stopped = false; + + public: + [[maybe_unused]] Timer() = default; + void restart() { Start = Clock::now(); } + HumanReadableTime stop() { + Now = Clock::now(); + long long diff_ = std::chrono::duration_cast(Now - Start).count(); + + HumanReadableTime hrt = human_readable_time(diff_); + + auto end = std::chrono::system_clock::now(); + auto end_time = std::chrono::system_clock::to_time_t(end); + std::cout << "finished computation at " << std::ctime(&end_time) << "elapsed time: " << hrt.diff << hrt.unit + << " (" << hrt.diff_fine << hrt.unit_fine << ")" << '\n'; + stopped = true; + return hrt; + } + + ~Timer() { + if (not stopped) { stop(); } + } +}; + +template +concept UniformRandomBitGenerator = requires(G g) { + typename G::result_type; // Must have result_type + { G::min() } -> std::same_as; // min function + { G::max() } -> std::same_as; // max function + { g() } -> std::same_as; // operator() + requires std::is_unsigned_v; // result_type is unsigned integer type + requires G::min() < G::max(); // min is strictly less than max +}; + +template +concept RandomNumberEngine = requires(E e, + const E x, + const E y, + typename E::result_type s, + unsigned long long z, + std::ostream &os, + std::istream &is) { + typename E::result_type; + { E() } -> std::same_as; + { E(x) } -> std::same_as; + { E(s) } -> std::same_as; + { e.seed() } -> std::same_as; + { e.seed(s) } -> std::same_as; + { e() } -> std::same_as; + { e.discard(z) } -> std::same_as; + { x == y } -> std::same_as; + { x != y } -> std::same_as; + { os << x } -> std::same_as; + { is >> e } -> std::same_as; + { E::min() } -> std::same_as; + { E::max() } -> std::same_as; +}; + +// source https://en.wikipedia.org/wiki/Xorshift#xoshiro_and_xoroshiro +// template +// requires std::is_integral::value +// requires std::is_same_v +class xorshift32 { + using ResultType = uint32_t; + ResultType seed_; + + public: + typedef ResultType result_type; + + xorshift32() : seed_(12) {} + + explicit xorshift32(ResultType seed) : seed_(seed) {} + + /* The state word must be initialized to non-zero */ + ResultType operator()() { + /* Algorithm "xor" from p. 4 of Marsaglia, "Xorshift RNGs" */ + ResultType x = seed_; + x ^= x << 13; + x ^= x >> 17; + x ^= x << 5; + return seed_ = x; + } + void discard(long long z) { + for (long long i = 0; i < z; ++i) { + (*this)(); + } + } + constexpr static ResultType min() { return std::numeric_limits::min(); } + constexpr static ResultType max() { return std::numeric_limits::max(); } + + void seed() { *this = xorshift32(); } + void seed(ResultType seed_inp) { *this = xorshift32(seed_inp); } + + bool operator==(const xorshift32 &rhs) const { return seed_ == rhs.seed_; } + bool operator!=(const xorshift32 &rhs) const { return seed_ != rhs.seed_; } + + friend auto operator<<(std::ostream &os, const xorshift32 &rng) -> std::ostream & { + os.flags(std::ostream::dec | std::ostream::skipws); + os << rng.seed_; + return os; + } + + friend auto operator>>(std::istream &is, xorshift32 &rng) -> std::istream & { + is.flags(std::istream::dec | std::istream::skipws); + is >> rng.seed_; + return is; + } +}; + +} // namespace cutils diff --git a/benchmarks/make_benchmark_timeline.py b/benchmarks/make_benchmark_timeline.py new file mode 100755 index 0000000..6b16735 --- /dev/null +++ b/benchmarks/make_benchmark_timeline.py @@ -0,0 +1,126 @@ +import os +import sys +from typing import List, Dict, NamedTuple +from collections import namedtuple +import matplotlib.pyplot as plt +import numpy as np +import pandas as pd +import plotnine as p9 +import yaml + +LogPathData = namedtuple('LogData', 'path timestamp') + +ParsedData = Dict[str, str] + + +class LogData(NamedTuple): + timestamp: str + parsed_data: ParsedData + + +def get_subdirectories(directory: str) -> ([str], [str]): + sub_dir_paths = [] + sub_dir_names = [] + for d in os.listdir(directory): + full_path = os.path.join(directory, d) + if os.path.isdir(full_path): + sub_dir_paths.append(full_path) + sub_dir_names.append(d) + return sub_dir_paths, sub_dir_names + + +def get_files(directory: str, day: str) -> List[LogPathData]: + path_data: List[LogPathData] = [] + for f in os.listdir(directory): + full_path = os.path.join(directory, f) + if os.path.isfile(full_path) and f.endswith('.yml'): + hour = f.split('.')[0] + data = LogPathData(path=full_path, timestamp=f'{day}-{hour}') + path_data.append(data) + return path_data + + +def _parse_log(log: str)-> Dict[str, str]: + return yaml.safe_load(log) + + +def parse_log(log_path_data: LogPathData): + log_data: LogData + with open(file=log_path_data.path, mode='r') as log_file: + raw_data = log_file.read() + log_data = LogData(parsed_data=_parse_log(raw_data), + timestamp=log_path_data.timestamp) + return log_data + + +def get_all_logs(logs_dir: str, + benchmark_version: int | None = None) -> List[ParsedData]: + + assert os.path.isdir(logs_dir), f'{logs_dir=} is not a valid path' + + log_sub_dirs, log_dates = get_subdirectories(logs_dir) + + all_log_paths: List[LogPathData] = [] + for lsdp, day in zip(log_sub_dirs, log_dates): + files = get_files(lsdp, day) + all_log_paths += files + + all_logs: List[ParsedData] = [] + for log_path_data in all_log_paths: + log = parse_log(log_path_data=log_path_data) + if benchmark_version is not None: + if ("BENCHMARK VERSION" not in log.parsed_data or + log.parsed_data['BENCHMARK VERSION'] != benchmark_version): + continue + log.parsed_data['timestamp'] = log.timestamp + all_logs.append(log.parsed_data) + return all_logs + + +def main(): + logs_dir = sys.argv[1] + all_logs: List[ParsedData] = get_all_logs(logs_dir) + + df = pd.DataFrame(all_logs) + def version_num_to_category(num: float): + if not pd.isna(num): + return str(int(num)) + else: + return '-' + + df['BENCHMARK VERSION'] = df['BENCHMARK VERSION'].apply(version_num_to_category) + df['timestamp'] = pd.to_datetime(df['timestamp'], format='%Y-%m-%d-%H-%M-%S') + df.sort_values(by='timestamp') + + + df_long = pd.melt(df, id_vars=['timestamp', 'BENCHMARK VERSION'], + value_vars=['mps', 'emps', 'fps', 'efps'], + var_name='perf_type', value_name='perf_value') + df_long.sort_values(by='timestamp') + df_long['timestamp'] = df_long['timestamp'].dt.strftime('%Y-%m-%d %H:%M') + print(df_long.tail()) + + # x_breaks = df_long['timestamp'][::2].to_list() + # print(f'{x_breaks=}') + plot = (p9.ggplot(df_long) + + p9.aes(x='timestamp', y='perf_value', color='BENCHMARK VERSION') + # + p9.geom_text(p9.aes(label='BENCHMARK VERSION'), size=9) + + p9.geom_point() + + p9.facet_wrap('~perf_type', scales='free_y') + + p9.theme_minimal() + + p9.labs(x='time', y='perf', color='Bench.\nVersion', + title='performance over time') + # + p9.scale_color_discrete(name='Bench.\nV') + # + p9.scale_x_discrete(breaks=x_breaks) + # + p9.scale_x_datetime(breaks=x_breaks) + + p9.theme( + figure_size=(15, 9), + axis_text_x=p9.element_text(angle=70, hjust=1), + ) + ) + + print(plot) + + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/benchmarks/micro_benchmarks/bench_diff.py b/benchmarks/micro_benchmarks/bench_diff.py new file mode 100755 index 0000000..846f06f --- /dev/null +++ b/benchmarks/micro_benchmarks/bench_diff.py @@ -0,0 +1,87 @@ +#! python3 +import sys +import json +import re +import numpy as np +from termcolor import colored, cprint + +if __name__ == '__main__': + bench_types = dict() + path = sys.argv[1] + bench_file = sys.argv[2] + with open(f"{path}/{bench_file}", 'r') as f: + j = json.load(f) + reg = re.compile(r'(^[a-zA-Z][\w\s]*)(base|experimental)', re.IGNORECASE) + + for benchmark in j['benchmarks']: + full_name = benchmark["name"] + name = reg.match(full_name).group(1) + suffix = reg.match(full_name).group(2) + if not bench_types.get(name): + bench_types[name] = dict() + if benchmark['aggregate_name'] == 'mean': + bench_types[name][suffix] = {"mean": benchmark['real_time']} + if benchmark['aggregate_name'] == 'stddev': + bench_types[name][suffix]["std_dev"] = benchmark['real_time'] + + diff_log_name = "bench_diff.log" + diff_log_file = open(f"{path}/bench_diff.log", "w") + diff_json_file = open(f"{path}/bench_diff.json", "w") + + diff_dict = dict() + + string_stencil = f"{'test name':>30}{' ':<3}{'base time':<9} | {'expr time':<9} | {'rel impr':<9}\n" + line_width=len(string_stencil) + string_stencil += f"{' ':>30}{' ':<3}{'base std':<9} | {'expr std':<9} | {'av_error/tot_diff':<9}\n" + string_stencil += line_width*'_'+'\n' + for benchmark_name, benchmark in bench_types.items(): + base_time = benchmark['base']['mean'] + base_std = benchmark['base']['std_dev'] + experimental_time = benchmark['experimental']['mean'] + experimental_std = benchmark['base']['std_dev'] + diff = base_time - experimental_time + av_noise = (base_std + experimental_std)/2 + rel_change = diff/base_time + rel_noise = av_noise / abs(diff) + + if not diff_dict.get(benchmark_name): + diff_dict[benchmark_name] = dict() + + diff_dict[benchmark_name]["base time"] = base_time + diff_dict[benchmark_name]["base std"] = base_std + + diff_dict[benchmark_name]["experimental time"] = experimental_time + diff_dict[benchmark_name]["experimental std"] = experimental_std + + diff_dict[benchmark_name]["diff"] = diff + diff_dict[benchmark_name]["av_noise"] = av_noise + + diff_dict[benchmark_name]["rel change"] = rel_change + diff_dict[benchmark_name]["rel error"] = rel_noise + + attr = ['bold', 'dark'] + if rel_noise < 1: + if diff > 0: + ticker = '∆∆∆' + color = 'cyan' + if rel_noise<0.1: + color = 'green' + attr.append('blink') + else: + ticker = 'VVV' + color = 'red' + attr.append('blink') + else: + ticker = '---' + color = 'yellow' + + res = f'{np.round(rel_change,3)} {colored(ticker, color, attrs=attr)}' + string_stencil += f"{benchmark_name:>30}{' ':<3}{np.round(base_time,3):<9} | {np.round(experimental_time,3):<9} | {res:<9}\n" + string_stencil += f"{' ':>30}{' ':<3}{np.round(base_std,3):<9} | {np.round(experimental_std,3):<9} | {np.round(rel_noise,3):<9}\n" + string_stencil += int(line_width/4)*' -- '+'\n' + + print(string_stencil, file=diff_log_file) + print(string_stencil) + + out_bench = {'context': j['context'], 'diffs': diff_dict } + json.dump(out_bench, diff_json_file, indent = 6) diff --git a/benchmarks/micro_benchmarks/vec3_bench/CMakeLists.txt b/benchmarks/micro_benchmarks/vec3_bench/CMakeLists.txt new file mode 100755 index 0000000..eb036d3 --- /dev/null +++ b/benchmarks/micro_benchmarks/vec3_bench/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 3.25) +project(vec3_microbenchmark) + +set(CMAKE_CXX_STANDARD 20) +set(CXX_STANDARD_REQUIRED ON) + +set(CMAKE_BUILD_TYPE Release) + +add_compile_definitions(TEST_ASSET_PATH="${CMAKE_CURRENT_SOURCE_DIR}/assets/") +if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC) + message("building for MSVC") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O2") +else() + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3") +endif() +message(${CMAKE_CXX_COMPILER_ID}) +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -g") + +include_directories(.) +include_directories(external) + +FetchContent_MakeAvailable(Catch2) + +list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras) +include(CTest) +include(Catch) + +# Create an interface library to suppress warnings for Catch2 + +message("testing FLIPPY") +include_directories(../flippy) +include_directories(../flippy/external) + +message(${catch2_SOURCE_DIR}) +add_executable( + ${PROJECT_NAME} vec3_bench.cpp # node_neighbour_insertion_delition_bench.cpp +) + +catch_discover_tests(${PROJECT_NAME}) + +target_link_libraries(${PROJECT_NAME} PRIVATE Catch2::Catch2WithMain) +target_include_directories( + ${PROJECT_NAME} SYSTEM PRIVATE ${catch2_SOURCE_DIR}/src + ${catch2_BINARY_DIR}/src) +target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic + -Wshadow -Wconversion -Werror) +enable_testing() +add_test(${PROJECT_NAME} ${PROJECT_NAME}) diff --git a/benchmarks/micro_benchmarks/vec3_bench/node_neighbour_insertion_delition_bench.cpp b/benchmarks/micro_benchmarks/vec3_bench/node_neighbour_insertion_delition_bench.cpp new file mode 100755 index 0000000..c4dfe3a --- /dev/null +++ b/benchmarks/micro_benchmarks/vec3_bench/node_neighbour_insertion_delition_bench.cpp @@ -0,0 +1,65 @@ +#include "flippy.hpp" +#include +#include +#include + +using REAL = double; +using INDEX = unsigned int; + +#define SETUP \ + fp::vec3 v1{0., 1., 1.}; \ + fp::vec3 v2{1., 0., 7.}; \ + fp::vec3 v3{1., 0., 0.}; \ + fp::vec3 v4{0., 2., 3.}; \ + fp::vec3 v5{0., 0., 9.}; \ + fp::vec3 v6{1., 1., 3.}; \ + fp::vec3 v7{0., 3., 3.}; \ + fp::vec3 v8{1., 0., 3.}; \ + Node node0; \ + node0.id = 0; \ + node0.nn_ids = {1, 2, 3, 4, 5, 6, 7, 8}; \ + node0.nn_distances = {v1, v2, v3, v4, v5, v6, v7, v8}; + +#define BASE_EXPERIMENTAL_COMPARE(bench) \ + BENCHMARK_ADVANCED("base")(Catch::Benchmark::Chronometer meter) { \ + typedef fp::Node Node; \ + SETUP \ + bench \ + }; \ + BENCHMARK_ADVANCED("experimental")(Catch::Benchmark::Chronometer meter) { \ + typedef fp::experimental::Node Node; \ + SETUP \ + bench \ + }; + +TEST_CASE("Benchmark node", "[!benchmark]") { + + INDEX new_id{11}; + fp::vec3 new_pos{0., 0., 0}; + + SECTION("emplace at 0") { +#define emplace_at_0 \ + meter.measure([&] { \ + return node0.emplace_nn_id(new_id, new_pos, 0); \ + }); + BASE_EXPERIMENTAL_COMPARE(emplace_at_0) + }; + + SECTION("emplace at the end") { +#define emplace_at_the_end \ + auto end = static_cast(node0.nn_ids.size() - 1); \ + meter.measure([&] { \ + return node0.emplace_nn_id(new_id, new_pos, end); \ + }); + BASE_EXPERIMENTAL_COMPARE(emplace_at_the_end) + }; + + SECTION("emplace in the middle") { +#define emplace_in_the_middle \ + auto end = static_cast(node0.nn_ids.size() / 2); \ + meter.measure([&] { \ + return node0.emplace_nn_id(new_id, new_pos, end); \ + }); + BASE_EXPERIMENTAL_COMPARE(emplace_in_the_middle) + }; +} diff --git a/benchmarks/micro_benchmarks/vec3_bench/vec3_bench.cpp b/benchmarks/micro_benchmarks/vec3_bench/vec3_bench.cpp new file mode 100755 index 0000000..ce116d3 --- /dev/null +++ b/benchmarks/micro_benchmarks/vec3_bench/vec3_bench.cpp @@ -0,0 +1,130 @@ +#include "../experimental/vec3_valarray.h" +#include "experimental/vec3_valarray.h" +#include "vec3.hpp" +#include +#include +#include + +using REAL = double; +constexpr int numTrials = 1; +constexpr REAL min = -1e6, max = 1e6; + +#define TWO_VEC_SETUP \ + const std::vector rand = GENERATE(take(numTrials, chunk(6, random(min, max)))); \ + [[maybe_unused]] vec3 v0{rand[0], rand[1], rand[2]}; \ + [[maybe_unused]] vec3 v1{rand[3], rand[4], rand[5]}; + +#define BASE_EXPERIMENTAL_COMPARE(bench) \ + BENCHMARK_ADVANCED("base")(Catch::Benchmark::Chronometer meter) { \ + typedef fp::vec3 vec3; \ + TWO_VEC_SETUP \ + bench \ + }; \ + BENCHMARK_ADVANCED("experimental")(Catch::Benchmark::Chronometer meter) { \ + typedef fp::experimental::vec3 vec3; \ + TWO_VEC_SETUP \ + bench \ + }; + +TEST_CASE("Benchmark vec3", "[!benchmark]") { + + SECTION("named creation") { + const std::vector rand = GENERATE(take(numTrials, chunk(6, random(min, max)))); + BENCHMARK_ADVANCED("base")(Catch::Benchmark::Chronometer meter) { + using fp::vec3; + meter.measure([&rand] { + vec3 v1{rand[3], rand[4], rand[5]}; + return v1; + }); + }; + + BENCHMARK_ADVANCED("experimental")(Catch::Benchmark::Chronometer meter) { + using fp::experimental::vec3; + meter.measure([&rand] { + vec3 v1{rand[3], rand[4], rand[5]}; + return v1; + }); + }; + } + + SECTION("unnamed creation") { + const std::vector rand = GENERATE(take(numTrials, chunk(6, random(min, max)))); + BENCHMARK_ADVANCED("base") { return fp::vec3{rand[3], rand[4], rand[5]}; }; + BENCHMARK_ADVANCED("experimental") { return fp::experimental::vec3{rand[3], rand[4], rand[5]}; }; + } + + SECTION("dot") { +#define dot_bench \ + meter.measure([&] { \ + return v0.dot(v1); \ + }); + BASE_EXPERIMENTAL_COMPARE(dot_bench) + } + + SECTION("norm") { +#define norm_bench \ + meter.measure([&] { \ + return v0.norm(); \ + }); + BASE_EXPERIMENTAL_COMPARE(norm_bench) + } + + SECTION("norm_square") { +#define norm_square_bench \ + meter.measure([&] { \ + return v0.norm_square(); \ + }); + BASE_EXPERIMENTAL_COMPARE(norm_square_bench) + } + + SECTION("two vector subtract") { +#define subtraction_bench \ + meter.measure([&] { \ + return v0 - v1; \ + }); + BASE_EXPERIMENTAL_COMPARE(subtraction_bench) + }; + + SECTION("vector minus") { +#define vector_minus_bench \ + meter.measure([&] { \ + return -v1; \ + }); + BASE_EXPERIMENTAL_COMPARE(vector_minus_bench) + }; + + SECTION("two vector add") { +#define add_bench \ + meter.measure([&] { \ + return v0 + v1; \ + }); + BASE_EXPERIMENTAL_COMPARE(add_bench) + }; + + SECTION("multiply left") { +#define multiply_left_bench \ + auto r = rand[4]; \ + meter.measure([&] { \ + return r * v1; \ + }); + BASE_EXPERIMENTAL_COMPARE(multiply_left_bench) + }; + + SECTION("multiply right") { +#define multiply_right_bench \ + auto r = rand[4]; \ + meter.measure([&] { \ + return v1 * r; \ + }); + BASE_EXPERIMENTAL_COMPARE(multiply_left_bench) + }; + + SECTION("complex expression") { +#define complex_expression_bench \ + auto r = rand[4]; \ + meter.measure([&] { \ + return (v1 * r + v0 * v1.dot(v0)).cross(v0) - v0; \ + }); + BASE_EXPERIMENTAL_COMPARE(complex_expression_bench) + }; +} diff --git a/benchmarks/rbc_bench/CMakeLists.txt b/benchmarks/rbc_bench/CMakeLists.txt new file mode 100755 index 0000000..e495b2b --- /dev/null +++ b/benchmarks/rbc_bench/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.16) +project(flippy_rbc_benchmark) +set(CMAKE_CXX_STANDARD 20) +#set(CMAKE_BUILD_TYPE Debug) +set(CMAKE_BUILD_TYPE Release) +set(CMAKE_CXX_FLAGS_RELEASE "-O3") +set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fno-omit-frame-pointer") + +add_definitions(-DLOGGING_ON=1) +add_definitions(-DPRINTING_ON=1) +add_definitions(-DALLOCATIONTRACKING=1) + +include_directories(../benchmark_logger) +include_directories(../external) +include_directories(../../flippy) +add_executable(${PROJECT_NAME} main.cpp) +target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic -Wshadow -Wconversion -Werror -ffast-math) \ No newline at end of file diff --git a/benchmarks/rbc_bench/main.cpp b/benchmarks/rbc_bench/main.cpp new file mode 100755 index 0000000..f5aa5a2 --- /dev/null +++ b/benchmarks/rbc_bench/main.cpp @@ -0,0 +1,215 @@ +#if ALLOCATIONTRACKING + +#include +#include +#include + +namespace { +struct AllocMetrics { + std::int64_t allocation = 0; + std::uint64_t allocated_size = 0; + std::int64_t de_allocation = 0; + std::int64_t leaks = 0; +}; +} // namespace + +static AllocMetrics AM; + +void *operator new(size_t size) { + AM.allocation += 1; + AM.allocated_size += size; + // std::cout<<"allocating "<<(long double)size/1000.<<" kB\n"; + return std::malloc(size); +} +void operator delete(void *memory) noexcept { + AM.de_allocation += 1; + std::free(memory); +} + +void operator delete(void *memory, std::size_t) noexcept { + AM.de_allocation += 1; + std::free(memory); +} + +#endif + +#include +#include + +struct EnergyParameters { + fp::Real kappa, K_V, K_A, V_t, A_t; +}; +using Triangulation = fp::Triangulation; +using MCU = fp::MonteCarloUpdater; + +// This is the energy function that is used by flippy's built-in updater to decide if a move was energetically favorable +// or not +fp::Real surface_energy(const fp::Node &node, + const fp::Triangulation &trg, + const EnergyParameters &prms, + const std::vector &changed_neighborhood) { + fp::Real V = trg.global_geometry().volume; + fp::Real A = trg.global_geometry().area; + fp::Real dV = V - prms.V_t; + fp::Real dA = A - prms.A_t; + + fp::Real E_bending = fp::changed_neighborhood_bending_energy(node, trg.nodes(), changed_neighborhood); + + fp::Real energy = prms.kappa * E_bending + prms.K_V * dV * dV / prms.V_t + prms.K_A * dA * dA / prms.A_t; + return energy; +} + +int main(int /*argc*/, char **argv) { + char LOG_FILE[300]{}; + { + // triangulation iteration number of nodes + auto json_path = std::string(argv[1]); + fp::Json config = fp::json_read(json_path); + // N_node=12+30*n+20*n*(n-1)/2 where n is the same as n_trng + unsigned int n_triang = config["n_triang"].get(); + fp::Real l_min = config["l_min"].get(); + fp::Real kappa = config["kappa"].get(); /*kBT*/ + fp::Real K_A = config["K_A"].get(); /*kBT/volume*/ + fp::Real K_V = config["K_V"].get(); /*kBT/area*/ + fp::Real red_vol = config["red_vol"].get(); + int max_mc_steps = config["max_mc_steps"].get(); + std::string save_dir = config["save_dir"]; + + // estimate of a typical bond length in the initial triangulation and then create a sphere such that the initial + // bond length is close to minimal. This formula is derived from the equidistant sub-triangulation of an + // icosahedron, where geodesic distances are used as a distance measure. + fp::Real R = fp::min_radius_with_non_overlapping_beads(l_min, n_triang); + fp::Real l_max = 1.8 * l_min; // if you make l_max closer to l_min + // bond_flip acceptance rate will go down + fp::Real r_Verlet = 2 * l_max; + + fp::Real Vt = red_vol * fp::sphere_vol(R); + fp::Real At = fp::sphere_area(R); + EnergyParameters prms{.kappa = kappa, .K_V = K_V, .K_A = K_A, .V_t = Vt, .A_t = At}; + // side length of a voxel from which the displacement of the node is drawn + fp::Real linear_displ = l_min / 8; + // max number of iteration steps (depending on the strength of your CPU, this should take anywhere from a couple + // of seconds to a couple of minutes + + std::random_device random_number_generator_seed; + // create a random number generator and seed it with the current time + std::mt19937 rng(random_number_generator_seed()); + + auto guv = Triangulation(n_triang, R, r_Verlet); + auto mc_updater = MCU(guv, prms, surface_energy, rng, l_min, l_max); + + fp::vec3 displ{}; + std::uniform_real_distribution displ_distr(-linear_displ, linear_displ); + + // squish the sphere in the z-direction to break the initial symmetry. This speeds up the convergence to a + // biconcave shape greatly. + guv.scale_node_coordinates(1, 1, 0.8); + + fp::Json data_init = guv.make_egg_data(); + fp::json_dump(save_dir + "test_run_init", data_init); + + auto globals_saver = [&](const Triangulation &trg) { + std::unordered_map out; + + out["volume"] = std::to_string(trg.global_geometry().volume); + out["area"] = std::to_string(trg.global_geometry().area); + out["volume_rel"] = std::to_string(trg.global_geometry().volume / Vt); + out["area_rel"] = std::to_string(trg.global_geometry().area / At); + return out; + }; + + auto stream_particle = [&](const fp::Node &node, const fp::Triangulation &) { + std::string s{"1"}; + fp::vec3 pos = node.pos; + static const std::string empty{" "}; + s += empty + std::to_string(pos.x) + empty + std::to_string(pos.y) + empty + std::to_string(pos.z) + empty + + std::to_string(node.curvature_vec.norm()) + "\n"; + return s; + }; + std::vector properties{ + fp::experimental::xyzProperty{ + .name = "species", .xyz_type = fp::experimental::XYZ_TYPE::S, .column_count = 1}, + fp::experimental::xyzProperty{.name = "pos", .xyz_type = fp::experimental::XYZ_TYPE::R, .column_count = 3}, + fp::experimental::xyzProperty{ + .name = "curv", .xyz_type = fp::experimental::XYZ_TYPE::R, .column_count = 1}}; + auto xyz_saver = fp::experimental::xyzDataSaver(save_dir + "data.xyz", properties, stream_particle); + std::vector shuffled_ids; + shuffled_ids.reserve(guv.size()); + + // create a vector that contains all node ids. We can shuffle this vector in each MC step to iterate randomly + // through the nodes + for (const auto &node : guv.nodes()) { + shuffled_ids.push_back(node.id); + } + + fp::Real probability_target = 0.5f; + fp::Real adaptation_magnitude = 0.1f; + std::optional e_diff = 0; + + fp::Real V0 = guv.global_geometry().volume; + fp::Real A0 = guv.global_geometry().area; + auto displ_updater = fp::DynamicDisplacementUpdater(linear_displ, adaptation_magnitude, probability_target); + auto logger = FlippyBenchmarkLogger::start_benchmark(mc_updater, guv); + + for (int mc_step = 0; mc_step < max_mc_steps; ++mc_step) { + auto t = static_cast(mc_step); + auto t_max = static_cast(max_mc_steps); + prms.V_t = fp::linear_adaptation(t, 0.f, 0.3f * t_max, V0, Vt); + prms.A_t = fp::linear_adaptation(t, 0.f, 0.3f * t_max, A0, At); + fp::Real kT = fp::linear_adaptation(t, 0.7f * t_max, 0.9f * t_max, 1.f, 0.1f); + mc_updater.reset_kBT(kT); + displ_distr = displ_updater.new_displ_distr(); + for (fp::Index node_id : shuffled_ids) { + displ = {displ_distr(rng), displ_distr(rng), displ_distr(rng)}; + e_diff = mc_updater.move_MC_updater(guv[node_id], displ); + displ_updater.probability_aggregator(e_diff, mc_updater.kBT()); + } + fp::Real pt = fp::linear_adaptation(t, 0.7f * t_max, 0.9f * t_max, probability_target, 0.2f); + displ_updater.reset_target_acceptance_probability(pt); + // then we shuffle the bead_ids + std::shuffle(shuffled_ids.begin(), shuffled_ids.end(), rng); + // then we loop through all of + for (auto node_id : shuffled_ids) { + // them again and try to flip their bonds + mc_updater.flip_MC_updater(guv[node_id]); + } + if (mc_step % 1000 == 0) { xyz_saver.save_current_state_in_memory(guv, globals_saver); } + if (mc_step % 10000 == 0) { + xyz_saver.save_current_state_in_memory(guv, globals_saver); + xyz_saver.flush_data_to_file(); + } + } + + xyz_saver.save_current_state_in_memory(guv, globals_saver); + xyz_saver.flush_data_to_file(); + + std::string log_file_path = logger.log(config["log_dir"], config); + + const char *log_file_char = log_file_path.c_str(); + for (size_t i = 0; i < log_file_path.size(); ++i) { + LOG_FILE[i] = log_file_char[i]; + } + cutils::print(LOG_FILE); + + fp::Json data_final = guv.make_egg_data(); + // ATTENTION!!! this file will be saved in the same folder as the executable + fp::json_dump(save_dir + "test_run_final", data_final); + } + +#if ALLOCATIONTRACKING + AM.leaks = AM.allocation - AM.de_allocation; + std::printf("total allocations: %5ld | total de_allocations: %5ld | leaks %5ld\n", + AM.allocation, + AM.de_allocation, + AM.leaks); + std::printf("allocated size: %5lo\n", AM.allocated_size); + + std::ofstream log(LOG_FILE, std::ios_base::app); + log << "total_allocations: " << AM.allocation << '\n' + << "total_de_allocations: " << AM.de_allocation << '\n' + << "leaks: " << AM.leaks << '\n' + << "allocated_size: " << AM.allocated_size << '\n' + << "COMMENTS: |\n \n"; +#endif + return 0; +} diff --git a/benchmarks/rbc_bench/rbc_config.json b/benchmarks/rbc_bench/rbc_config.json new file mode 100755 index 0000000..e29b183 --- /dev/null +++ b/benchmarks/rbc_bench/rbc_config.json @@ -0,0 +1,16 @@ +{ + "n_triang": 8, + "l_min": 2, + "seed": 12, + "verlet_update_frequency": 0.5, + "N_membrane_update": 2, + "kappa": 10, + "K_A": 1000, + "K_V": 100, + "red_vol": 0.6, + "max_mc_steps": 3e5, + "benchmark_version": 5, + "save_name": "data", + "save_dir": "../../../demo_out/rbc_bench/", + "log_dir": "../../../logs/rbc_bench/" +} \ No newline at end of file diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt new file mode 100755 index 0000000..852fa8f --- /dev/null +++ b/demo/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.16) + +add_subdirectory(biconcave_shapes_MC) \ No newline at end of file diff --git a/demo/Readme.md b/demo/Readme.md index f14191d..ee3cd7c 100755 --- a/demo/Readme.md +++ b/demo/Readme.md @@ -21,13 +21,13 @@ cd cmake-build ```shell cmake .. ``` -5. build the executable +5. build the executable ```shell cmake --build . --config Release ``` The executable file will now be located in the `cmake-build` folder and have the same name as specified in `CMakeLists.txt` in the `project(...)` statement. One caveat for `MSVC` users, the executable will be located in the `Release` sub-folder. -This will work if you cloned the whole git repository and did not change the folder structure. `CMakeLists.txt` relies on the relative position of the `demo` and `flippy` folders. +This will work if you cloned the whole git repository and did not change the folder structure. `CMakeLists.txt` relies on the relative position of the `demo` and `flippy` folders. ``` . ├── assets @@ -37,20 +37,10 @@ This will work if you cloned the whole git repository and did not change the fol ├── flippy │ ├── external │ └── utilities -├── single_header_flippy └── tests ├─ ... ... ``` -Alternatively, you can use the single header flippy if you want to compile from the command line directly. Just copy and paste `flippy.hpp` from the `single_header_flippy` folder to the same folder as the `main.cpp` file of the demo that you are compiling and run: -```shell -g++ --std=c++2a -O3 main.cpp -o demo -``` -This will create an executable named demo in the same folder. -There are two caveats with the above line of code: -1. `g++` might need to be replaced with another compiler name, depending on what is installed on your system. For example, `g++-11` if you separately installed a newer `gcc` compiler or `clang++` if you use the compilers' clang family. -2. The name of the executable will need the `.exe` suffix on Windows. -3. `--std=c++2a` and `-O3` are important flags for the compilation, the first one sets the language standard to `c++20` and is strictly necessary for the code to compile. The second one sets the optimization level to `O3`, the highest possible value. This is not strictly necessary, but it will make the code run significantly faster. ## how to use shell ### MacOS Open the `Terminal` app, which comes preinstalled. If you have never used this app before, then you will need to first install the command line tools by executing @@ -63,4 +53,4 @@ This step will take a bit and will install command line tools and a `c++` compil ### Windows The easiest way to get a shell on windows (that I am aware of) is to install the [`PowerShell`](https://www.microsoft.com/en-us/p/powershell/9mz1snwt0n5d#activetab=pivot:overviewtab). ### Linux -If you are a Linux user, you know what to do ;) \ No newline at end of file +If you are a Linux user, you know what to do ;) diff --git a/demo/biconcave_shapes_MC/main.cpp b/demo/biconcave_shapes_MC/main.cpp index 52cc94e..547ae59 100755 --- a/demo/biconcave_shapes_MC/main.cpp +++ b/demo/biconcave_shapes_MC/main.cpp @@ -1,75 +1,113 @@ -#include // needed for random displacement generation -#include // need for std::vector -#include // needed for std::cout #include "flippy.hpp" +#include // needed for std::cout +#include // needed for random displacement generation and node index shuffling +#include // need for std::vector + +fp::Real sphere_vol(fp::Real R) { return fp::Real(4. / 3.) * fp::PI * R * R * R; } +fp::Real sphere_area(fp::Real R) { return fp::Real(4.) * fp::PI * R * R; } + +struct EnergyParameters { + fp::Real kappa, K_V, K_A, V_t, A_t; +}; -double sphere_vol(double R){return 4./3. * M_PI *R*R*R;} -double sphere_area(double R){return 4. * M_PI *R*R;} - -struct EnergyParameters{double kappa, K_V, K_A, V_t, A_t;}; - -// This is the energy function that is used by flippy's built-in updater to decide if a move was energetically favorable or not -double surface_energy([[maybe_unused]]fp::Node const& node, - fp::Triangulation const& trg, - EnergyParameters const& prms){ - double V = trg.global_geometry().volume; - double A = trg.global_geometry().area; - double dV = V-prms.V_t; - double dA = A-prms.A_t; - double energy = prms.kappa*trg.global_geometry().unit_bending_energy + - prms.K_V*dV*dV/prms.V_t + prms.K_A*dA*dA/prms.A_t; +// This is the energy function that is used by flippy's built-in updater to decide if a move was energetically favorable +// or not +fp::Real surface_energy(const fp::Node &node, + const fp::Triangulation &trg, + const EnergyParameters &p, + const std::vector &changed_neighbourhood) { + fp::Real V = trg.global_geometry().volume; + fp::Real A = trg.global_geometry().area; + fp::Real dV = V - p.V_t; + fp::Real dA = A - p.A_t; + fp::Real E_bending = fp::node_unit_bending_energy(node); + for (fp::Index changed_node_id : changed_neighbourhood) { + E_bending += fp::node_unit_bending_energy(node); + } + + fp::Real energy = (p.kappa * E_bending) + (p.K_V * dV * dV / p.V_t) + (p.K_A * dA * dA / p.A_t); return energy; } -int main(){ - int n_triang = 7; // triangulation iteration number of nodes N_node=12+30*n+20*n*(n-1)/2 where n is the same as n_trng - double l_min = 2; - double R = l_min/(2*sin(asin(1./(2*sin(2.*M_PI/5.)))/(n_triang+1.))); // estimate of a typical bond length in the initial triangulation and then create a sphere such that the initial bond length is close to minimal. This formula is derived from the equidistant sub-triangulation of an icosahedron, where geodesic distances are used as a distance measure. - double l_max = 2.*l_min; // if you make l_max closer to l_min bond_flip acceptance rate will go down - double r_Verlet = 2*l_max; - EnergyParameters prms{.kappa=10 /*kBT*/, - .K_V=100 /*kBT/area*/, .K_A=1000 /*kBT/volume*/, - .V_t=0.6*sphere_vol(R), .A_t=sphere_area(R)}; - double linear_displ=l_min/8.; // side length of a voxel from which the displacement of the node is drawn - int max_mc_steps=1e5; // max number of iteration steps (depending on the strength of your CPU, this should take anywhere from a couple of seconds to a couple of minutes +#include "../benchmarks/external/code_utils.hpp" //ToDo Remove before prod + +int main() { + cutils::Timer t; + int n_triang = + 7; // triangulation iteration number of nodes N_node=12+30*n+20*n*(n-1)/2 where n is the same as n_trng + fp::Real l_min = 2; + fp::Real R = + l_min / + (2 * sin(asin(1. / (2 * sin(2. * M_PI / 5.))) / (n_triang + 1.))); // estimate of a typical bond length in the + // initial triangulation and then create a sphere such that the initial bond length is close to minimal. This + // formula is derived from the equidistant sub-triangulation of an icosahedron, where geodesic distances are used as + // a distance measure. + fp::Real l_max = 1.8 * l_min; // if you make l_max closer to l_min bond_flip acceptance rate will go down + fp::Real r_Verlet = 2 * l_max; + fp::Real red_vol = 0.6; + EnergyParameters prms{.kappa = 10 /*kBT*/, + .K_V = 100 /*kBT/area*/, + .K_A = 1000 /*kBT/volume*/, + .V_t = red_vol * sphere_vol(R), + .A_t = sphere_area(R)}; + fp::Real linear_displ = l_min / 18.; // side length of a voxel from which the displacement of the node is drawn + int max_mc_steps = 2e5; // max number of iteration steps (depending on the strength of your CPU, this should take + // anywhere from a couple of seconds to a couple of minutes std::random_device random_number_generator_seed; - std::mt19937 rng(random_number_generator_seed()); // create a random number generator and seed it with the current time + std::mt19937 rng( + random_number_generator_seed()); // create a random number generator and seed it with the current time // All the flippy magic is happening on the following two lines - fp::Triangulation guv(n_triang, R, r_Verlet); - fp::MonteCarloUpdater mc_updater(guv, prms, surface_energy, rng, l_min, l_max); + fp::Triangulation guv(n_triang, R, r_Verlet); + fp::MonteCarloUpdater mc_updater(guv, prms, surface_energy, rng, l_min, l_max); - fp::vec3 displ{}; // declaring a 3d vector (using flippy's built in vec3 type) for later use as a random direction vector - std::uniform_real_distribution displ_distr(-linear_displ, linear_displ); //define a distribution from which the small displacements in x y and z directions will be drawn + fp::vec3 displ{}; // declaring a 3d vector (using flippy's built in vec3 type) for later use as a random + // direction vector + std::uniform_real_distribution displ_distr(-linear_displ, linear_displ); // define a distribution from + // which the small displacements in x y and z directions will be drawn - guv.scale_node_coordinates(1, 1, 0.8); // squish the sphere in the z-direction to break the initial symmetry. This speeds up the convergence to a biconcave shape greatly. + guv.scale_node_coordinates(1, 1, 0.85); // squish the sphere in the + // z-direction to break the initial symmetry. This speeds up the convergence to a biconcave shape greatly. fp::Json data_init = guv.make_egg_data(); - fp::json_dump("test_run_init", data_init); // ATTENTION!!! this file will be saved in the same folder as the executable + fp::json_dump("test_run_init", + data_init); // ATTENTION!!! this file will be saved in the same folder as the executable std::vector shuffled_ids; shuffled_ids.reserve(guv.size()); - for(auto const& node: guv.nodes()){ shuffled_ids.push_back(node.id);} //create a vector that contains all node ids. We can shuffle this vector in each MC step to iterate randomly through the nodes + for (const auto &node : guv.nodes()) { + shuffled_ids.push_back(node.id); + } // create a vector that contains all node ids. We can shuffle this vector in each MC step to iterate randomly + // through the nodes - for(int mc_step=0; mc_step const& node, - fp::Triangulation const& trg, - EnergyParameters const& prms) -``` -The first argument of the function is the constant reference to the node (that is being updated), the second argument is a constant reference to the triangulation that the node is part of, and the first argument can be anything as long as we specify that in the `MonteCarloUpdater` declaration [later](#monte-carlo-updater-declaration). In this case, we want to pass a `struct` with all the parameters necessary for the energy function. We call this custom struct `EnergyParameters`, which is defined as follows: -```c++ -struct EnergyParameters{double kappa, K_A, A_t;}; -``` -And later initialized as: -```c++ -EnergyParameters prms{.kappa=2 /*kBT*/, .K_A=1000 /*kBT/volume*/, .A_t=l_x*l_y}; -``` -where -- `l_x` and 'l_y' are the initial widths of the triangulation. -- `A_t` is the target area of the triangulation. - -The value for the area target is given in arbitrary units since this simulation does not have a physical length scale. - -The actual body of the energy function then looks as follows: -```c++ -double surface_energy([[maybe_unused]]fp::Node const& node, - fp::Triangulation const& trg, - EnergyParameters const& prms){ - double A = trg.global_geometry().area; - double dA = A-prms.A_t; - double energy = prms.kappa*trg.global_geometry().unit_bending_energy + prms.K_A*dA*dA/prms.A_t; - return energy; -} -``` -The input argument node has the compiler directive `[[maybe_unused]]` prepended, which tells the compiler that this variable is not used in the function body. - -### Triangulation declaration -To create a spherical triangulation, we can initiate a `Triangulation` class: -```c++ -fp::Triangulation planar_trg(n_x, n_y, l_x, l_y, r_Verlet); -``` -here `fp` is *flippy*'s namespace. The first two template arguments specify the types of floating point and positive integer numbers the triangulation should use. One could have specified `float` and `unsigned short` instead. The third argument specifies the type of triangulation. In this case, we want to use a planar one. - -The arguments of the triangulation instantiation are `n_x` and `n_y`, which specify the number of nodes in the `x` and `y` directions. The total number of points is then `n_x*n_y`. The next two arguments, `l_x` and `l_y`, specify the width of the triangulation in the `x` and `y` directions. The last argument, `r_Verlet`, specifies the Verlet radius for the nodes of the triangulation. This sets the radius of the [Verlet list](https://en.wikipedia.org/wiki/Verlet_list), which lists spatially close nodes. This information is necessary to implement the non-self-intersection property of the membrane efficiently. - -After the above declaration, we will access the triangulation via the declared variable `planar_trg`. - -### Monte Carlo updater declaration -The Monte Carlo updater needs information about the triangulation, the energy function, and the parameter struct, all of which we have already defined and initiated. Additionally, we also need a random number generator. - -The declaration can be made as follows: -```c++ -fp::MonteCarloUpdater - mc_updater(planar_trg, prms, surface_energy, rng, l_min, l_max); -``` -The template arguments again specify what type of updater we want. -- `double` and `unsigned int` specify types of floating point and integral numbers used in updating (same as in triangulation). We must use the same floating point type here as in the triangulation and the energy function's return value. -- `EnergyParameters` specifies the type of the third argument of the energy function. -- `std::mt19937` specifies the type of the random number generator. The provided value is a Mersenne Twister random number generator, part of the `c++` standard library. -- `fp::EXPERIMENTAL_PLANAR_TRIANGULATION` specifies the triangulation type (not optional in this case), which has to match the triangulation type of the `Triangulation` class. - -The instantiation parameters have the following meaning: - - `planar_trg` name of the `Triangulation` class instance we declared. - - `prms` name of the `EnergyParameters` struct instance we declared. - - `surface_energy` is the name of the energy function we defined. - - `rng` is the name of the random number generator instance. This generator needs to be declared before the `mc_updater` in the code as -```c++ -std::random_device random_number_generator_seed; -std::mt19937 rng(random_number_generator_seed()); -``` - - `l_min` minimum distance between the triangulation nodes allowed during updating. - - `l_max` maximum distance between connected triangulation nodes allowed during updating. - -The instance `mc_updater` now provides access to functions that can attempt an update of the triangulation. - -- `move_MC_updater` expects a node and a displacement vector and will attempt to update that node's position by the displacement vector -- `flip_MC_updater` expects a node and will randomly choose one of the neighbors of that node and attempt to flip the bond between the two nodes. - - -### The update loop -A straightforward update loop would be one where we loop through all nodes and use the `MonteCarloUpdater` to attempt an update, then repeat this for a set number of times specified by `max_mc_steps`. This would look like this: - -```c++ -for(int mc_step=0; mc_step=max_mc_steps/2){ - mc_updater.reset_kBT((1.-2.*(static_cast(mc_step)/static_cast(max_mc_steps)-0.5))); // this is a simple way to decrease the temperature of the system. We could also have used a more sophisticated annealing schedule, where we cycle the temperature. - } - if(mc_step%300==0){ - xyzStream.append_XYZ_stream(); - xyzStream.streamXYZ(); // ATTENTION!!! this file will be saved in the same folder as the executable - std::cout<<"mc_step: "<`, which is a *flippy* builtin type. -- `displ_distr` is a uniform distribution from which displacements are drawn. - -We use the `reset_kBT` method of the `MonteCarloUpdater` to decrease the system's temperature. The final if statement saves the triangulation to a file every 300 steps. This is a sloppy way to implement saving, but this example does not need something more complex. - -### Data saving -The least effort way to save a snapshot of the triangulation is to use the built-in `make_egg` method. Which serializes every node of the triangulation to a `JSON` object. -```c++ -fp::Json data_final = guv.make_egg_data(); -``` -And then we can use one of *flippy*'s helper functions, `dump_json` to save the data to a file: -```c++ -fp::json_dump("test_run_final", data_final); -``` -The above command will save the data to a `test_run_final.json` file in the same folder where the executable was executed. - -If one wants to continue the simulation after the final configuration, then the saved data can be used to initialize a triangulation: -```c++ -fp::Json loaded_data = fp::json_read("test_run_final.json"); -fp::Triangulation loaded_guv(loaded_data, r_Verlet); -``` -DISCLAIMER! This method is currently not implemented for planar triangulation and only works for spherical triangulation. - -At the top of the main file, we also defined an `exyzStream` class. This class saves the triangulation to a file in the `xyz` format. This simple text format can be used to visualize the triangulation in various visualization programs. The `exyzStream` class has an `append_XYZ_stream` method that appends the current triangulation to a `std::stringstream` object. The `streamXYZ` method then saves the contents of the `std::stringstream` to a `data.xyz` file. - -## Data visualization - -This folder also provides a `data_vizualization.py` python file. If this file is run in the same folder, where -`test_run_init.json` and `test_run_final.json` JSON files are saved (the executable output files), then the python file will generate two plots. -That of the initial and final configurations of a run. - -The `data.xyz` file contains snapshots of the membrane at different times. One can visualize the whole simulation by simply opening the file in visualization software like [Ovito](https://www.ovito.org/). -And then rendered to an animation like this: - -![planar_membrane_cooldown](https://user-images.githubusercontent.com/25377791/226763587-9c76ba66-776a-4201-90c6-6bfa6581b6d6.gif) - diff --git a/demo/planar_membrane_sheet_fluctuation_MC/data_visualisation.py b/demo/planar_membrane_sheet_fluctuation_MC/data_visualisation.py deleted file mode 100755 index 8b13d40..0000000 --- a/demo/planar_membrane_sheet_fluctuation_MC/data_visualisation.py +++ /dev/null @@ -1,318 +0,0 @@ -import json -from typing import Union, List - -import numpy as np -import matplotlib.pyplot as plt -from matplotlib import cm -from matplotlib import gridspec -from mpl_toolkits.mplot3d import Axes3D -from mpl_toolkits.mplot3d.art3d import Poly3DCollection -from itertools import product -from matplotlib.colors import LogNorm - - -def _normed_vec(vec: np.ndarray): - norm = vec.dot(vec) - if norm > 0: - return vec/np.sqrt(norm) - else: - return np.zeros(vec.size) - - -def _face_name_splitter(face_name: str): - return np.array(list(map(int, face_name.split('_')))) - - -def _edge_namer(id1: int, id2: int) -> str: - if id1 < id2: - edge_list = [id1, id2] - else: - edge_list = [id2, id1] - return ''.join(map(str, edge_list)) - - -def find_two_neighbours(node_nns: List[int], nn_nns: List[int]): - return list(set(node_nns).intersection(nn_nns)) - - -def triangle_id_maker(node_id:int, nn_id:int, cnn_id:int): - ids = [node_id, nn_id, cnn_id] - ids.sort() - return '_'.join(list(map(str,ids))) - - -class SingleTimeFrameImporter(object): - - def __init__(self, file_name: str): - with open(file_name, "r") as f: - self.data_dict: dict = json.load(f) - - @classmethod - def load_data(cls, file_name: str): - instance = cls(file_name) - instance._load_egg() - instance._load_energy_data() - instance._make_geometry() - return instance - - @classmethod - def egg_import(cls, file_name: str): - instance =cls(file_name) - instance._load_egg() - instance._make_geometry() - return instance - - def _load_egg(self): - node_dict = self.data_dict - self.node_dict = dict(sorted(zip(list(map(int, node_dict.keys())), node_dict.values()))) - self.no_cell = True - - def _load_energy_data(self): - pass - - def _make_geometry(self): - self.overlapers = [] - self._make_positions() - self._make_edges() - self._build_triangles() - self._make_faces() - - def xyz_export_data(self) -> str: - - data_array = np.array([np.array(self.xs, dtype=str), - np.array(self.ys, dtype=str), - np.array(self.zs, dtype=str)]).T - if self.no_cell: - n = len(self.xs) - text: str = f'{n}\nAtoms {self._out_stream_constructor("1", data_array)}' - else: - cell_data_array = np.array([np.array(self.cell_xs, dtype=str), - np.array(self.cell_ys, dtype=str), - np.array(self.cell_zs, dtype=str)]).T - n = len(self.xs) + len(self.cell_xs) - text: str = f'{n}\nAtoms {self._out_stream_constructor("1", data_array)}' - return text - - @staticmethod - def _out_stream_constructor(name_stream: Union[str, List[str]], xyz_matrix): - text = '' - if type(name_stream) is str: - name_stream = [name_stream for _ in range(len(xyz_matrix))] - for name, row in zip(name_stream, xyz_matrix): - line: str = f"{name} {' '.join(list(map(str, row)))}" - text = '\n'.join([text, line]) - return text - - def xyz_save_to_file(self, file_name): - with open(file_name, 'a') as f: - f.write(self.xyz_export_data()) - return f - - def xyz_append_to_file(self, f): - f.write(self.xyz_export_data()) - return f - - def exyz_save_to_file(self, file_name): - with open(file_name, 'a') as f: - f.write(self.exyz_export_data()) - return f - - def exyz_append_to_file(self, f): - f.write(self.exyz_export_data()) - return f - - def _make_positions(self): - xs = [] - ys = [] - zs = [] - cvs = [] - - for (k, v) in sorted(self.node_dict.items()): - xs.append(v['pos'][0]) - ys.append(v['pos'][1]) - zs.append(v['pos'][2]) - curv = np.array(v['curvature_vec']) - if curv[0] is not None: - norm = np.sqrt(curv.dot(curv)) - else: - norm = 0 - cvs.append(norm) - - self.xs = np.array(xs) - self.ys = np.array(ys) - self.zs = np.array(zs) - self.node_curvatures = np.array(cvs) - - if not self.no_cell: - for (k, v) in sorted(self.cell_node_dict.items()): - xs.append(v['pos'][0]) - ys.append(v['pos'][1]) - zs.append(v['pos'][2]) - curv = np.array(v['curvature_vec']) - norm = np.sqrt(curv.dot(curv)) - cvs.append(norm) - - self.cell_xs = np.array(xs) - self.cell_ys = np.array(ys) - self.cell_zs = np.array(zs) - self.cell_node_curvatures = np.array(cvs) - - def _make_edges(self): - self.edge_dict = {} - lines = [] - for node_id, node in self.node_dict.items(): - for nn_id in node['nn_ids']: - edge_id = _edge_namer(node_id, nn_id) - if edge_id not in self.edge_dict: - line = np.array([self.node_dict[node_id]['pos'], self.node_dict[nn_id]['pos']]) - lines.append(line) - self.edge_dict[edge_id] = {'nodes': [node_id, nn_id], 'line': line} - self.lines = np.array(lines) - - def _build_triangles(self): - for node_id, node in self.node_dict.items(): - node["triangle_ids"] = set() - nn_ids = node["nn_ids"] - for nn_id in nn_ids: - two_neighbours = find_two_neighbours(node["nn_ids"], self.node_dict[nn_id]["nn_ids"]) - # assert len(two_neighbours)==2 - if len(two_neighbours) == 2: - node["triangle_ids"].add(triangle_id_maker(node_id, nn_id, two_neighbours[0])) - node["triangle_ids"].add(triangle_id_maker(node_id, nn_id, two_neighbours[1])) - - node["triangle_ids"] = list(node["triangle_ids"]) - - def _make_faces(self): - faces = [] - face_curves = [] - face_names = {} - face_curve_max = 0 - face_curve_min = 1e5 - - for _faces in self.node_dict.values(): - for _face in _faces['triangle_ids']: - if _face not in face_names: - face_names[_face] = 1 - n0, n1, n2 = _face_name_splitter(_face) - p0 = np.array(self.node_dict[n0]['pos']) - p1 = np.array(self.node_dict[n1]['pos']) - p2 = np.array(self.node_dict[n2]['pos']) - - faces.append([p0, p1, p2]) - - try: - k0 = np.array(self.node_dict[n0]['curvature_vec']) - k1 = np.array(self.node_dict[n1]['curvature_vec']) - k2 = np.array(self.node_dict[n2]['curvature_vec']) - face_norm = (k0+k1+k2)/3 - face_curve = np.sqrt(face_norm.dot(face_norm)) - - except: - face_curve = 0 - - if face_curve < face_curve_min: - face_curve_min=face_curve - if face_curve > face_curve_max: - face_curve_max = face_curve - face_curves.append(face_curve) - - self.faces = np.array(faces) - self.face_curve_max = face_curve_max - self.face_curve_min = face_curve_min - if face_curve_max!=0: - self.face_curves = np.array(face_curves)/face_curve_max - else: - self.face_curves = np.array(face_curves) - - def build_polygon(self, alpha): - cmap = [cm.get_cmap('Reds')(c) for c in self.face_curves] - return Poly3DCollection(self.faces, - edgecolors='k', linewidths=0.5, facecolors=cmap, alpha=alpha, - norm=LogNorm(vmin=self.face_curve_min, vmax=self.face_curve_max) - ), cmap - - - def make_polygon(self, stretch=1.1, **kwargs): - no_box = kwargs.get("no_box", True) - alpha = kwargs.get("alpha", 1) - self._make_empty_figure() - polygons, cmap = self.build_polygon(alpha=alpha) - self.ax.add_collection3d(polygons) - - if no_box: - self.ax.set_axis_off() - - cmp = np.round(np.linspace(self.face_curve_min, self.face_curve_max, 20), 3) - z = cmp[:, None] - self.cax.tick_params(axis='y', labelright=True, right=True, labelleft=False, left=False) - self.cax.imshow(z, cmap="Reds", origin='lower') - self.cax.set_label('local mean curv.') - self.cax.set_yticks(np.arange(0, cmp.size)) - self.cax.set_yticklabels([str(tick) for tick in cmp]) - self.cax.set_xticks([]) - all_min = np.min([self.xs, self.ys, self.zs]) - all_max = np.max([self.xs, self.ys, self.zs]) - self.ax.set_xlim(all_min, all_max) - self.ax.set_ylim(all_min, all_max) - self.ax.set_zlim(all_min, all_max) - - return self - - - def _make_empty_figure(self): - spec = gridspec.GridSpec(ncols=2, nrows=1, - width_ratios=[10, 1], wspace=0.1, - hspace=0.1) - self.fig: plt.Figure = plt.figure() - self.ax: plt.Axes = self.fig.add_subplot(spec[0], projection='3d') - self.cax: plt.Axes = self.fig.add_subplot(spec[1]) - - def save_plot(self, save_path: str, **kwargs): - self.fig.savefig(save_path, **kwargs) - - def show_plot(self): - self.fig.show() - - -class TopologyChecks(object): - def __init__(self, single_tf_data_set: SingleTimeFrameImporter, n_it): - self.n_it = n_it - self.local_dataset: SingleTimeFrameImporter = single_tf_data_set - self.n_nodes = len(self.local_dataset.node_dict) - self.n_edges = len(self.local_dataset.lines) - self.n_edges2 = sum([len(self.local_dataset.node_dict[i]["nn_ids"]) for i in range(self.n_nodes)])/2 - self.n_faces = len(self.local_dataset.faces) - self.n_nodes_exp = 12 + 30 * (2 ** self.n_it - 1) + 20 * (2 ** (self.n_it - 1) * (2 ** self.n_it - 3) + 1) - self.n_edges_exp = 30 * (4 ** self.n_it) - self.n_faces_exp = 20 * (4 ** self.n_it) - - def check_euler_characteristic(self): - print("N_NODES: ", self.n_nodes, "N_EDGES:", self.n_edges, "or:", self.n_edges2, "N_FACES: ", self.n_faces) - print("expected") - print("N_NODES: ", self.n_nodes_exp, "N_EDGES: ", self.n_edges_exp, "N_FACES: ", self.n_faces_exp) - print("Euler Characteristic: ", self.n_nodes - self.n_edges + self.n_faces) - - def check_node_name_contiguity(self): - k_max = max(self.local_dataset.node_dict.keys()) - print("N_IT:", self.n_it, "\n Max_id + 1 - N_NODES: \n", - "counter mismatch: ", k_max + 1 - self.n_nodes, '\n') - - def check_all(self): - print("checking") - self.check_euler_characteristic() - self.check_node_name_contiguity() - print(80*'=') - - -if __name__ == '__main__': - import matplotlib.pyplot as plt - import numpy as np - import json - - egg_init = SingleTimeFrameImporter.egg_import(f'test_run_init.json') - egg_init.make_polygon() - egg_final = SingleTimeFrameImporter.egg_import(f'test_run_.json') - egg_final.make_polygon(alpha=0.5) - egg_final = SingleTimeFrameImporter.egg_import(f'test_run_final.json') - egg_final.make_polygon(alpha=0.8) - plt.show() diff --git a/demo/planar_membrane_sheet_fluctuation_MC/main.cpp b/demo/planar_membrane_sheet_fluctuation_MC/main.cpp deleted file mode 100755 index 5288d87..0000000 --- a/demo/planar_membrane_sheet_fluctuation_MC/main.cpp +++ /dev/null @@ -1,151 +0,0 @@ -#include // needed for random displacement generation -#include // need for std::vector -#include // needed for std::cout -#include "flippy.hpp" - -// exyzStream is a class that can be used to stream data to a file in extended xyz format -// (see https://docs.ovito.org/reference/file_formats/input/xyz.html) -// Then the file can be read by ovito to visualize the data. -template -class exyzStream -{ - std::string xyzStream; - std::vector* shuffled_ids_p; - fp::Triangulation* triangulation; - std::string size_string{}; - std::string properties_string{"Properties=species:S:1:pos:R:3\n"}; -public: - exyzStream()=default; - exyzStream(std::vector* shuffled_ids_p_inp , - fp::Triangulation* guv_p_inp) - : shuffled_ids_p(shuffled_ids_p_inp), - triangulation(guv_p_inp), - size_string(std::to_string(shuffled_ids_p->size())+'\n'){} - - - void append_XYZ_stream_with_test_node(Index test_node_id){ - xyzStream.append(size_string); - xyzStream.append(properties_string); - auto test_node_neighbours = (*triangulation)[test_node_id].nn_ids; - for(Index node_id: *shuffled_ids_p){ - if(node_id==test_node_id){ - xyzStream.append(stream_particle("11", (*triangulation)[node_id].pos)); - } - else if(fp::is_member(test_node_neighbours, node_id)){ - xyzStream.append(stream_particle("12", (*triangulation)[node_id].pos)); - } - else{ - xyzStream.append(stream_particle("1", (*triangulation)[node_id].pos)); - } - } - } - void append_XYZ_stream(){ - xyzStream.append(size_string); - xyzStream.append(properties_string); - for(Index node_id: *shuffled_ids_p){ - xyzStream.append(stream_particle("1", (*triangulation)[node_id].pos)); - } - } - - void streamXYZ(){ - std::ofstream data_file; - data_file.open("data.xyz"); - data_file< const& node, - fp::Triangulation const& trg, - EnergyParameters const& prms){ - double A = trg.global_geometry().area; - double dA = A-prms.A_t; - double energy = prms.kappa*trg.global_geometry().unit_bending_energy + prms.K_A*dA*dA/prms.A_t; - return energy; -} - -int main(){ - double l_min = 2; - unsigned int n_x = 30; - unsigned int n_y = 30; - double non_overlap_stretch = 1.05 ; //This stretch factor makes sure that the nodes do not overlap and the bonds are long enouth, s.t. the triangles are not degenerate (i.e. all nodes are on the same line) - double l_x = non_overlap_stretch *(n_x-1)*l_min; - double l_y = non_overlap_stretch *(n_x-1)*l_min; - double l_max = 2.*l_min; // if you make l_max closer to l_min bond_flip acceptance rate will go down. However if l_max is large enough that degenerate triangles can forme, then the simulation will give wrong results. - double r_Verlet = 2*l_max; - EnergyParameters prms{.kappa=2 /*kBT*/, .K_A=1000 /*kBT/volume*/, .A_t=l_x*l_y}; - double linear_displ=l_min/10.; // side length of a voxel from which the displacement of the node is drawn - int max_mc_steps=2e5; // max number of iteration steps (depending on the strength of your CPU, this should take anywhere from a couple of seconds to a couple of minutes - - std::random_device random_number_generator_seed; - auto seed = random_number_generator_seed(); - std::cout<<"Seed: "< planar_trg(n_x, n_y, l_x, l_y, r_Verlet); - fp::MonteCarloUpdater mc_updater(planar_trg, prms, surface_energy, rng, l_min, l_max); - - fp::vec3 displ{}; // declaring a 3d vector (using flippy's built in vec3 type) for later use as a random direction vector - std::uniform_real_distribution displ_distr(-linear_displ, linear_displ); //define a distribution from which the small displacements in x y and z directions will be drawn - - fp::Json data_init = planar_trg.make_egg_data(); - fp::json_dump("test_run_init", data_init); // ATTENTION!!! this file will be saved in the same folder as the executable - - std::vector shuffled_ids; - shuffled_ids.reserve(planar_trg.size()); - for(auto const& node: planar_trg.nodes()){ shuffled_ids.push_back(node.id);} //create a vector that contains all node ids. We can shuffle this vector in each MC step to iterate randomly through the nodes - exyzStream xyzStream(&shuffled_ids, &planar_trg); - xyzStream.append_XYZ_stream(); - xyzStream.streamXYZ(); - - - - for(int mc_step=0; mc_step=max_mc_steps/2){ - mc_updater.reset_kBT((1.-2.*(static_cast(mc_step)/static_cast(max_mc_steps)-0.5))); // this is a simple way to decrease the temperature of the system. We could also have used a more sophisticated annealing schedule, where we cycle the temperature. - } - if(mc_step%300==0){ - xyzStream.append_XYZ_stream(); - xyzStream.streamXYZ(); // ATTENTION!!! this file will be saved in the same folder as the executable - std::cout<<"mc_step: "< + + + + + + +flippy: flippy/utilities/DataIO.hpp Source File + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
DataIO.hpp
+
+
+
1#ifndef FLIPPY_HPP_DATASAVER_H
+
2#define FLIPPY_HPP_DATASAVER_H
+
3
+
4#include "custom_concepts.hpp"
+
5#include "Triangulation.hpp"
+
6#include <filesystem>
+
7#include <iostream>
+
8#include <utility>
+
9
+
10namespace fp::experimental{
+
+
11 class DataSaver {
+
12 public:
+
13 virtual void reset_memory() = 0;
+
14 virtual void stream_data_to_file() = 0;
+
15 void flush_data_to_file(){
+
16 stream_data_to_file();
+
17 reset_memory();
+
18 }
+
19
+
20 };
+
+
21
+
+
22 class jsonDataSaver: public DataSaver{
+
23 std::string data_;
+
24 std::ofstream data_file_;
+
25 public:
+
26
+
27 explicit jsonDataSaver(std::filesystem::path const& save_file_path): data_(), data_file_(save_file_path) { }
+
28
+
29 void reset_memory() override { data_.clear(); }
+
30 void save_current_state_in_memory(Triangulation const & triangulation) {
+
31
+
32 data_ += triangulation.nodes().make_data().dump();
+
33 }
+
34 void stream_data_to_file() override { data_file_ << data_; }
+
35 };
+
+
36
+
37 enum XYZ_TYPE {S, R, I};
+
38
+
39 static std::string xyz_to_string(XYZ_TYPE const& xyz_type) noexcept(false){
+
40 switch(xyz_type){
+
41 case S: return "S";
+
42 case R: return "R";
+
43 case I: return "I";
+
44 default: throw std::runtime_error("XYZ_TYPE not recognized, it must be S, R or I");
+
45 }
+
46 }
+
47
+
+ +
49 {
+
50 std::string name;
+
51 XYZ_TYPE xyz_type;
+
52 short column_count;
+
53 };
+
+
54
+
+
55 class xyzDataSaver :public DataSaver{
+
56 std::string data_;
+
57 std::ofstream data_file_;
+
58
+
59 std::string size_string{};
+
60 std::string properties_string;
+
61
+
62 using StreamParticleFuncType = std::function<std::string(Node const&, Triangulation const&)>;
+
63 StreamParticleFuncType stream_particle;
+
64 using GlobalsMakerFuncType = std::function<std::unordered_map<std::string, std::string>(Triangulation const&)>;
+
65
+
66 void set_up_property_string(std::vector<xyzProperty> const& properties)
+
67 {
+
68 properties_string.append("Lattice=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\" Properties=");
+
69 for (auto const &property : properties) {
+
70 properties_string.append(property.name + ":" + xyz_to_string(property.xyz_type) + ":" + std::to_string(property.column_count) + ":");
+
71 }
+
72 properties_string.pop_back();
+
73 properties_string.append("\n");
+
74 }
+
75 public:
+
76
+
77 explicit xyzDataSaver(std::filesystem::path const& save_file_path,
+
78 std::vector<xyzProperty> const& properties_inp,
+
79 StreamParticleFuncType stream_particle_inp
+
80 ): data_(), data_file_(save_file_path), stream_particle(std::move(stream_particle_inp)){
+
81 set_up_property_string(properties_inp);
+
82 }
+
83
+
84 void reset_memory() override { data_.clear(); }
+
85
+
86 void save_current_state_in_memory(Triangulation const & triangulation,
+
87 GlobalsMakerFuncType const& globals_maker ) {
+
88 size_string = std::to_string(triangulation.size());
+
89 data_.append(size_string);
+
90 data_.append("\n");
+
91 std::string prop{properties_string};
+
92 prop.reserve(500);
+
93 for(auto & [key, val]: globals_maker(triangulation)){
+
94 prop.append(" ");
+
95 prop.append(key);
+
96 prop.append("=");
+
97 prop.append(val);
+
98 }
+
99 data_.append(prop);
+
100 data_.append("\n");
+
101
+
102 for(const auto& node: triangulation.nodes()){ data_.append(stream_particle(node, triangulation)); }
+
103 }
+
104
+
105 void stream_data_to_file() override { data_file_ << data_; }
+
106 };
+
+
107
+
+ +
109 {
+
110 std::ofstream file;
+
111 std::string data;
+
112 std::string filename;
+
113 std::vector<std::string> names;
+
114 std::vector<std::string> values;
+
115 std::string header;
+
116 std::string sep;
+
117 bool header_written = false;
+
118
+
119 public:
+
120 csvGlobalsSaver(std::string filename_inp, std::vector<std::string> names_inp, std::string sep_inp=",")
+
121 : filename(std::move(filename_inp)), names(std::move(names_inp)), sep(std::move(sep_inp))
+
122 {
+
123 file.open(filename);
+
124 header = names[0];
+
125 for(size_t i=1; i<names.size(); ++i){
+
126 header += sep + names[i];
+
127 }
+
128 header_written = false;
+
129 }
+
130
+
131 void reset_memory() override { data.clear(); }
+
132
+
133 void save_current_state_in_memory(std::vector<double>const& values_inp){
+
134 if(!header_written){
+
135 data.append(header).append("\n");
+
136 header_written = true;
+
137 }
+
138 std::string row = std::to_string(values_inp[0]);
+
139 for(size_t i=1; i<values_inp.size(); ++i){
+
140 row += sep + std::to_string(values_inp[i]);
+
141 }
+
142 data.append(row).append("\n");
+
143 }
+
144
+
145 void stream_data_to_file() override { file << data; }
+
146
+ +
148 file.close();
+
149 }
+
150 };
+
+
151
+
152}
+
153#endif
+
This file contains the fp::Triangulation class and several related helper classes....
+
Implementation of Triangulation of two-dimensional surfaces in 3D.
Definition Triangulation.hpp:289
+
const Nodes & nodes() const
Returns a constant reference to the underlying Nodes container.
Definition Triangulation.hpp:841
+
Index size() const
Returns the number of nodes in the triangulation.
Definition Triangulation.hpp:827
+
Definition DataIO.hpp:11
+
Definition DataIO.hpp:109
+
Definition DataIO.hpp:22
+
Definition DataIO.hpp:55
+
This file contains the concepts that are costomly defined for the flippy class templates.
+
A data structure containing all geometric and topological information associated with a node.
Definition Nodes.hpp:30
+
Json make_data() const
Serialize the Nodes struct to a JSON object.
Definition Nodes.hpp:357
+
Definition DataIO.hpp:49
+
+
+ + + + diff --git a/docs/_monte_carlo_updater_8hpp.html b/docs/_monte_carlo_updater_8hpp.html old mode 100644 new mode 100755 index 49f038c..df76a6c --- a/docs/_monte_carlo_updater_8hpp.html +++ b/docs/_monte_carlo_updater_8hpp.html @@ -3,16 +3,18 @@ - + flippy: flippy/MonteCarloUpdater.hpp File Reference + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
@@ -110,25 +117,108 @@ More...

#include "custom_concepts.hpp"
#include <random>
+#include <variant>
#include "Nodes.hpp"
#include "Triangulation.hpp"
Include dependency graph for MonteCarloUpdater.hpp:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+This graph shows which files directly or indirectly include this file:
+
+
+ + + + +

Go to the source code of this file.

- +

Classes

class  fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >
class  fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >
 A helper class for updating the triangulation, using Metropolis–Hastings algorithm. This is a high-level interface intended to implement a basic Monte-Carlo updating scheme, which should be sufficient for a lot of simple situations. More...
 
- +

Namespaces

namespace  fp
namespace  fp
 

Detailed Description

@@ -139,7 +229,7 @@ diff --git a/docs/_monte_carlo_updater_8hpp.js b/docs/_monte_carlo_updater_8hpp.js old mode 100644 new mode 100755 index a2267d8..f108d28 --- a/docs/_monte_carlo_updater_8hpp.js +++ b/docs/_monte_carlo_updater_8hpp.js @@ -1,4 +1,4 @@ var _monte_carlo_updater_8hpp = [ - [ "fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >", "classfp_1_1_monte_carlo_updater.html", "classfp_1_1_monte_carlo_updater" ] + [ "fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >", "classfp_1_1_monte_carlo_updater.html", "classfp_1_1_monte_carlo_updater" ] ]; \ No newline at end of file diff --git a/docs/_monte_carlo_updater_8hpp__dep__incl.map b/docs/_monte_carlo_updater_8hpp__dep__incl.map new file mode 100755 index 0000000..fb33621 --- /dev/null +++ b/docs/_monte_carlo_updater_8hpp__dep__incl.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/_monte_carlo_updater_8hpp__dep__incl.md5 b/docs/_monte_carlo_updater_8hpp__dep__incl.md5 new file mode 100755 index 0000000..4b9365b --- /dev/null +++ b/docs/_monte_carlo_updater_8hpp__dep__incl.md5 @@ -0,0 +1 @@ +38c7b900756c58f95a4303f3e0550b1d \ No newline at end of file diff --git a/docs/_monte_carlo_updater_8hpp__dep__incl.png b/docs/_monte_carlo_updater_8hpp__dep__incl.png new file mode 100755 index 0000000..3459950 Binary files /dev/null and b/docs/_monte_carlo_updater_8hpp__dep__incl.png differ diff --git a/docs/_monte_carlo_updater_8hpp__incl.dot b/docs/_monte_carlo_updater_8hpp__incl.dot deleted file mode 100644 index 5285003..0000000 --- a/docs/_monte_carlo_updater_8hpp__incl.dot +++ /dev/null @@ -1,65 +0,0 @@ -digraph "flippy/MonteCarloUpdater.hpp" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="flippy/MonteCarloUpdater.hpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="This file contains the MonteCarloUpdater class template. Together with Triangulation...."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="custom_concepts.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$custom__concepts_8hpp.html",tooltip="This file contains the concepts that are costomly defined for the flippy class templates."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="concepts",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="random",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node5 [id="edge4_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="Nodes.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_nodes_8hpp.html",tooltip="This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node o..."]; - Node5 -> Node6 [id="edge5_Node000005_Node000006",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="vector",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node5 -> Node7 [id="edge6_Node000005_Node000007",color="steelblue1",style="solid",tooltip=" "]; - Node7 [id="Node000007",label="unordered_set",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node5 -> Node8 [id="edge7_Node000005_Node000008",color="steelblue1",style="solid",tooltip=" "]; - Node8 [id="Node000008",label="external/json.hpp",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node5 -> Node9 [id="edge8_Node000005_Node000009",color="steelblue1",style="solid",tooltip=" "]; - Node9 [id="Node000009",label="vec3.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$vec3_8hpp.html",tooltip="Header file containing the definition and implementation a 3 dimensional vector class,..."]; - Node9 -> Node10 [id="edge9_Node000009_Node000010",color="steelblue1",style="solid",tooltip=" "]; - Node10 [id="Node000010",label="ostream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node9 -> Node11 [id="edge10_Node000009_Node000011",color="steelblue1",style="solid",tooltip=" "]; - Node11 [id="Node000011",label="iostream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node9 -> Node12 [id="edge11_Node000009_Node000012",color="steelblue1",style="solid",tooltip=" "]; - Node12 [id="Node000012",label="cmath",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node9 -> Node2 [id="edge12_Node000009_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node1 -> Node13 [id="edge13_Node000001_Node000013",color="steelblue1",style="solid",tooltip=" "]; - Node13 [id="Node000013",label="Triangulation.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_triangulation_8hpp.html",tooltip="This file contains the fp::Triangulation class and several related helper classes...."]; - Node13 -> Node14 [id="edge14_Node000013_Node000014",color="steelblue1",style="solid",tooltip=" "]; - Node14 [id="Node000014",label="optional",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node13 -> Node15 [id="edge15_Node000013_Node000015",color="steelblue1",style="solid",tooltip=" "]; - Node15 [id="Node000015",label="set",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node13 -> Node5 [id="edge16_Node000013_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node13 -> Node9 [id="edge17_Node000013_Node000009",color="steelblue1",style="solid",tooltip=" "]; - Node13 -> Node16 [id="edge18_Node000013_Node000016",color="steelblue1",style="solid",tooltip=" "]; - Node16 [id="Node000016",label="utilities/utils.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$utils_8hpp.html",tooltip="This file contains helper functions that are used throughout flippy, but are not specific to any give..."]; - Node16 -> Node11 [id="edge19_Node000016_Node000011",color="steelblue1",style="solid",tooltip=" "]; - Node16 -> Node17 [id="edge20_Node000016_Node000017",color="steelblue1",style="solid",tooltip=" "]; - Node17 [id="Node000017",label="fstream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node16 -> Node18 [id="edge21_Node000016_Node000018",color="steelblue1",style="solid",tooltip=" "]; - Node18 [id="Node000018",label="utility",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node16 -> Node19 [id="edge22_Node000016_Node000019",color="steelblue1",style="solid",tooltip=" "]; - Node19 [id="Node000019",label="filesystem",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node16 -> Node20 [id="edge23_Node000016_Node000020",color="steelblue1",style="solid",tooltip=" "]; - Node20 [id="Node000020",label="type_traits",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node13 -> Node21 [id="edge24_Node000013_Node000021",color="steelblue1",style="solid",tooltip=" "]; - Node21 [id="Node000021",label="Triangulator.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_triangulator_8hpp.html",tooltip="This file contains internal implementation details and is not part of the stable public api...."]; - Node21 -> Node22 [id="edge25_Node000021_Node000022",color="steelblue1",style="solid",tooltip=" "]; - Node22 [id="Node000022",label="array",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node21 -> Node6 [id="edge26_Node000021_Node000006",color="steelblue1",style="solid",tooltip=" "]; - Node21 -> Node7 [id="edge27_Node000021_Node000007",color="steelblue1",style="solid",tooltip=" "]; - Node21 -> Node23 [id="edge28_Node000021_Node000023",color="steelblue1",style="solid",tooltip=" "]; - Node23 [id="Node000023",label="unordered_map",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node21 -> Node2 [id="edge29_Node000021_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node21 -> Node9 [id="edge30_Node000021_Node000009",color="steelblue1",style="solid",tooltip=" "]; - Node13 -> Node24 [id="edge31_Node000013_Node000024",color="steelblue1",style="solid",tooltip=" "]; - Node24 [id="Node000024",label="stlSerializer.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$stl_serializer_8hpp_source.html",tooltip=" "]; - Node24 -> Node17 [id="edge32_Node000024_Node000017",color="steelblue1",style="solid",tooltip=" "]; - Node24 -> Node6 [id="edge33_Node000024_Node000006",color="steelblue1",style="solid",tooltip=" "]; - Node24 -> Node9 [id="edge34_Node000024_Node000009",color="steelblue1",style="solid",tooltip=" "]; -} diff --git a/docs/_monte_carlo_updater_8hpp__incl.map b/docs/_monte_carlo_updater_8hpp__incl.map new file mode 100755 index 0000000..d2d64b0 --- /dev/null +++ b/docs/_monte_carlo_updater_8hpp__incl.map @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/_monte_carlo_updater_8hpp__incl.md5 b/docs/_monte_carlo_updater_8hpp__incl.md5 new file mode 100755 index 0000000..a69339c --- /dev/null +++ b/docs/_monte_carlo_updater_8hpp__incl.md5 @@ -0,0 +1 @@ +bebab65f683b9510cc87c63e692669de \ No newline at end of file diff --git a/docs/_monte_carlo_updater_8hpp__incl.png b/docs/_monte_carlo_updater_8hpp__incl.png new file mode 100755 index 0000000..01c09a2 Binary files /dev/null and b/docs/_monte_carlo_updater_8hpp__incl.png differ diff --git a/docs/_monte_carlo_updater_8hpp_source.html b/docs/_monte_carlo_updater_8hpp_source.html old mode 100644 new mode 100755 index 36c05ca..4e64a2c --- a/docs/_monte_carlo_updater_8hpp_source.html +++ b/docs/_monte_carlo_updater_8hpp_source.html @@ -3,16 +3,18 @@ - + flippy: flippy/MonteCarloUpdater.hpp Source File + - + + @@ -43,28 +45,28 @@
- + + -
@@ -111,240 +113,254 @@
2#define FLIPPY_MONTECARLOUPDATER_HPP
9#include "custom_concepts.hpp"
10#include <random>
-
11#include "Nodes.hpp"
-
12#include "Triangulation.hpp"
-
13
-
14namespace fp {
-
15
-
31template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters, typename RandomNumberEngine, TriangulationType triangulation_type>
-
- -
33{
-
34private:
-
35 static constexpr Real max_float = 3.40282347e+38;
-
36 Real e_old{}, e_new{}, e_diff{};
- +
11#include <variant>
+
12#include "Nodes.hpp"
+
13#include "Triangulation.hpp"
+
14
+
15namespace fp {
+
16
+
32template<typename EnergyFunctionParameters, typename RandomNumberEngine>
+
+ +
34{
+
35private:
+
36 static constexpr Real max_float = 3.40282347e+38f;
+
37 fp::Triangulation& triangulation;
38 EnergyFunctionParameters const& prms;
-
39 std::function<Real(fp::Node<Real, Index> const&, fp::Triangulation<Real, Index, triangulation_type> const&, EnergyFunctionParameters const&)> energy_function;
-
40 RandomNumberEngine& rng;
-
41 std::uniform_real_distribution<Real> unif_distr_on_01;
-
42 Real kBT_{1};
-
43 Real min_bond_length_square{0.}, max_bond_length_square{max_float};
-
44 unsigned long move_attempt{0}, bond_length_move_rejection{0},move_back{0};
-
45 unsigned long flip_attempt{0}, bond_length_flip_rejection{0}, flip_back{0};
-
46
-
47public:
+
39 using EnergyFunctionType = std::function<Real(fp::Node const&, fp::Triangulation const&,
+
40 EnergyFunctionParameters const&, std::vector<Index> const&)> ;
+
41 EnergyFunctionType energy_function;
+
42 RandomNumberEngine& rng;
+
43 std::uniform_real_distribution<Real> unif_distr_on_01;
+
44 Real kBT_{1};
+
45 Real min_bond_length_square{0.}, max_bond_length_square{max_float};
+
46 unsigned long move_attempt{0}, bond_length_move_rejection{0},move_back{0};
+
47 unsigned long flip_attempt{0}, bond_length_flip_rejection{0}, flip_back{0};
48
-
- -
61 EnergyFunctionParameters const& prms_inp,
-
62 std::function<Real(fp::Node<Real, Index> const&, fp::Triangulation<Real, Index, triangulation_type> const&, EnergyFunctionParameters const&)> energy_function_inp,
-
63 RandomNumberEngine& rng_inp, Real min_bond_length, Real max_bond_length)
-
64 :triangulation(triangulation_inp), prms(prms_inp), energy_function(energy_function_inp), rng(rng_inp),
-
65 unif_distr_on_01(std::uniform_real_distribution<Real>(0, 1)),
-
66 min_bond_length_square(min_bond_length*min_bond_length), max_bond_length_square(max_bond_length*max_bond_length)
-
67 {
-
68
-
69 }
+
49public:
+
50
+
+ +
63 EnergyFunctionParameters const& prms_inp,
+
64 EnergyFunctionType energy_function_inp,
+
65 RandomNumberEngine& rng_inp, Real min_bond_length, Real max_bond_length)
+
66 :triangulation(triangulation_inp), prms(prms_inp), energy_function(energy_function_inp), rng(rng_inp),
+
67 unif_distr_on_01(std::uniform_real_distribution<Real>(0, 1)),
+
68 min_bond_length_square(min_bond_length*min_bond_length), max_bond_length_square(max_bond_length*max_bond_length) { }
-
70
-
72
-
- -
79 {
-
80 e_diff = e_old - e_new;
-
81 if(kBT_>0){ //temperature can safely be put to 0, this will make the algorithm greedy
-
82 return (e_diff<0) && (unif_distr_on_01(rng)>std::exp(e_diff/kBT_));
-
83 }else{
-
84 return (e_diff<0);
-
85 }
-
86 }
+
69
+
71
+
+
77 bool move_needs_undoing(Real e_diff)
+
78 {
+
79 if(kBT_>0){ //temperature can safely be put to 0, this will make the algorithm greedy
+
80 return (e_diff<0) && (unif_distr_on_01(rng)>std::exp(e_diff/kBT_));
+
81 }else{
+
82 return (e_diff<0);
+
83 }
+
84 }
+
85
87
-
89
-
- -
101 fp::vec3<Real> const& displacement)
-
102
-
103 {
- - -
106
-
107 }
+
+ +
99 fp::vec3<Real> const& displacement)
+
100
+
101 {
+ + +
104
+
105 }
+
106
108
-
110
-
- -
121 fp::vec3<Real> const& displacement)
-
122
-
123 {
-
124 Real distance_square_new, distance_square_old;
-
125 for (auto const& nn_dist: node.nn_distances){
-
126 distance_square_new=(nn_dist - displacement).norm_square();
-
127 distance_square_old=nn_dist.norm_square();
-
128 if ((distance_square_new>max_bond_length_square) && (distance_square_old < max_bond_length_square)) {
-
129 return false;
-
130 }
-
131 if ((distance_square_old>min_bond_length_square) && (distance_square_new<min_bond_length_square)) {
-
132 return false;
-
133 }
-
134 }
-
135
-
136 return true;
-
137 }
+
+ +
119 fp::vec3<Real> const& displacement)
+
120
+
121 {
+
122 Real distance_square_new, distance_square_old;
+
123 for (auto const& nn_dist: node.nn_distances){
+
124 distance_square_new=(nn_dist - displacement).norm_square();
+
125 distance_square_old=nn_dist.norm_square();
+
126 if ((distance_square_new>max_bond_length_square) && (distance_square_old < max_bond_length_square)) {
+
127 return false;
+
128 }
+
129 if ((distance_square_old>min_bond_length_square) && (distance_square_new<min_bond_length_square)) {
+
130 return false;
+
131 }
+
132 }
+
133
+
134 return true;
+
135 }
-
138
+
136
+
137
139
-
141
-
- -
151 fp::vec3<Real> const& displacement)
+
+ +
149 fp::vec3<Real> const& displacement)
+
150
+
151 {
152
-
153 {
-
154
-
155 Real distance_square_new, distance_square_old;
-
156 for (auto const& verlet_neighbour_id: node.verlet_list)
-
157 {
-
158 distance_square_new=(triangulation[verlet_neighbour_id].pos - node.pos - displacement).norm_square();
-
159 distance_square_old=(triangulation[verlet_neighbour_id].pos - node.pos).norm_square();
-
160 if ((distance_square_new<min_bond_length_square)&&(distance_square_old>min_bond_length_square)) { return false; }
-
161 }
-
162 return true;
-
163 }
+
153 Real distance_square_new, distance_square_old;
+
154 for (auto const& verlet_neighbour_id: node.verlet_list)
+
155 {
+
156 distance_square_new=(triangulation[verlet_neighbour_id].pos - node.pos - displacement).norm_square();
+
157 distance_square_old=(triangulation[verlet_neighbour_id].pos - node.pos).norm_square();
+
158 if ((distance_square_new<min_bond_length_square)&&(distance_square_old>min_bond_length_square)) { return false; }
+
159 }
+
160 return true;
+
161 }
+
162
164
-
166
-
-
173 void move_MC_updater(fp::Node<Real, Index> const& node, fp::vec3<Real> const& displacement)
-
174 {
-
175 ++move_attempt;
- -
177 e_old = energy_function(node, triangulation, prms);
-
178 triangulation.move_node(node.id, displacement);
-
179 e_new = energy_function(node, triangulation, prms);
-
180 if (move_needs_undoing()) {triangulation.move_node(node.id, -displacement); ++move_back;}
-
181 }else{++bond_length_move_rejection;}
-
182 }
-
-
183
-
185
-
- -
195 {
-
196 ++flip_attempt;
-
197 e_old = energy_function(node, triangulation, prms);
-
198 Index number_nn_ids = node.nn_ids.size();
-
199 Index nn_id = node.nn_ids[std::uniform_int_distribution<Index>(0, number_nn_ids-1)(rng)];
-
200 auto bfd = triangulation.flip_bond(node.id, nn_id, min_bond_length_square, max_bond_length_square);
-
201 if (bfd.flipped) {
-
202 e_new = energy_function(node, triangulation, prms);
-
203 if (move_needs_undoing()) { triangulation.unflip_bond(node.id, nn_id, bfd); ++flip_back;}
-
204 }else{++bond_length_flip_rejection;}
-
205 }
+
+
172 std::optional<Real> move_MC_updater(fp::Node const& node, fp::vec3<Real> const& displacement)
+
173 {
+
174 ++move_attempt;
+ +
176 Real e_old = energy_function(node, triangulation, prms, node.nn_ids);
+
177 triangulation.move_node(node.id, displacement);
+
178 Real e_new = energy_function(node, triangulation, prms, node.nn_ids);
+
179 Real e_diff = e_old - e_new;
+
180 if (move_needs_undoing(e_diff)) {
+
181 triangulation.move_node(node.id, -displacement);
+
182 ++move_back;
+
183 }
+
184 return e_diff;
+
185 }else{
+
186 ++bond_length_move_rejection;
+
187 return {};
+
188 }
+
189 }
-
206
-
208
-
-
218 void flip_MC_updater(fp::Node<Real, Index> const& node, Index id_in_nn_ids)
-
219 {
-
220 ++flip_attempt;
-
221 e_old = energy_function(node, triangulation, prms);
-
222 Index number_nn_ids = node.nn_ids.size();
-
223// Index nn_id = index_in_nn_ids;//node.nn_ids[std::uniform_int_distribution<Index>(0, number_nn_ids-1)(rng)];
-
224 auto bfd = triangulation.flip_bond(node.id, id_in_nn_ids, min_bond_length_square, max_bond_length_square);
-
225 if (bfd.flipped) {
-
226 e_new = energy_function(node, triangulation, prms);
-
227 if (move_needs_undoing()) { triangulation.unflip_bond(node.id, id_in_nn_ids, bfd); ++flip_back;}
-
228 }else{++bond_length_flip_rejection;}
-
229 }
+
190
+
192
+
+
201 void flip_MC_updater(fp::Node const& node)
+
202 {
+
203 Index number_nn_ids = static_cast<Index>(node.nn_ids.size());
+
204 Index nn_id = node.nn_ids[std::uniform_int_distribution<Index>(0, number_nn_ids-1)(rng)];
+
205 flip_MC_updater(node, nn_id);
+
206 }
-
230
-
-
232 void reset_kBT(Real kBT){
-
238 kBT_=kBT;
-
239 }
+
207
+
209
+
+
219 void flip_MC_updater(fp::Node const& node, Index id_in_nn_ids)
+
220 {
+
221 ++flip_attempt;
+
222 Neighbors cns = triangulation.previous_and_next_neighbour_global_ids(node.id, id_in_nn_ids);
+
223 //This one line leads to an allocation each MC step for each node, which can easily number in billions
+
224 // for even small simulations. This can not be deploied to production! For even single flip per move, this
+
225 // leads to a 10% regression in banchmarks.
+
226 const auto changed_neighborhood = std::vector{id_in_nn_ids, cns.j_m_1, cns.j_p_1};
+
227 Real e_old = energy_function(node, triangulation, prms, changed_neighborhood);
+
228 BondFlipData bfd = triangulation.flip_bond(node.id, id_in_nn_ids, min_bond_length_square, max_bond_length_square);
+
229 if (bfd.flipped) {
+
230 Real e_new = energy_function(node, triangulation, prms, changed_neighborhood);
+
231 Real e_diff = e_old - e_new;
+
232 if (move_needs_undoing(e_diff)) {
+
233 triangulation.unflip_bond(node.id, id_in_nn_ids, bfd);
+
234 ++flip_back;
+
235
+
236 }
+
237 }else{++bond_length_flip_rejection;}
+
238 }
-
240
-
-
242 [[nodiscard]] Real kBT(){
-
248 return kBT_;
-
249 }
+
239
+
+
241 void reset_kBT(Real kBT){
+
247 kBT_=kBT;
+
248 }
+
249
-
251 [[nodiscard]] unsigned long move_attempt_count() const {
-
258 return move_attempt;
-
259 }
+
251 [[nodiscard]] Real kBT(){
+
257 return kBT_;
+
258 }
-
-
261 [[nodiscard]] unsigned long bond_length_move_rejection_count() const {
-
270 return bond_length_move_rejection;
-
271 }
+
+
260 [[nodiscard]] unsigned long move_attempt_count() const {
+
267 return move_attempt;
+
268 }
-
-
273 [[nodiscard]] unsigned long move_back_count() const {
-
281 return move_back;
-
282 }
+
+
270 [[nodiscard]] unsigned long bond_length_move_rejection_count() const {
+
279 return bond_length_move_rejection;
+
280 }
-
-
284 [[nodiscard]] unsigned long flip_attempt_count() const {
-
290 return flip_attempt;
+
+
282 [[nodiscard]] unsigned long move_back_count() const {
+
290 return move_back;
291 }
-
293 [[nodiscard]] unsigned long bond_length_flip_rejection_count() const {
-
301 return bond_length_flip_rejection;
-
302 }
+
293 [[nodiscard]] unsigned long flip_attempt_count() const {
+
299 return flip_attempt;
+
300 }
+
+
+
302 [[nodiscard]] unsigned long bond_length_flip_rejection_count() const {
+
310 return bond_length_flip_rejection;
+
311 }
-
-
304 [[nodiscard]] unsigned long flip_back_count() const {
-
313 return flip_back;
-
314 }
+
+
313 [[nodiscard]] unsigned long flip_back_count() const {
+
322 return flip_back;
+
323 }
-
315
-
316};
+
324
+
325};
-
317}
-
318#endif //FLIPPY_MONTECARLOUPDATER_HPP
+
326}
+
327#endif //FLIPPY_MONTECARLOUPDATER_HPP
This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node o...
This file contains the fp::Triangulation class and several related helper classes....
-
A helper class for updating the triangulation, using Metropolis–Hastings algorithm....
Definition MonteCarloUpdater.hpp:33
-
unsigned long move_back_count() const
A getter function that returns a value of a state variable.
Definition MonteCarloUpdater.hpp:273
-
unsigned long flip_attempt_count() const
A getter function that returns a value of a state variable.
Definition MonteCarloUpdater.hpp:284
-
unsigned long move_attempt_count() const
A getter function that returns a value of a state variable.
Definition MonteCarloUpdater.hpp:251
-
unsigned long bond_length_flip_rejection_count() const
A getter function that returns a value of a state variable.
Definition MonteCarloUpdater.hpp:293
-
Real kBT()
A getter function that returns a value of a state variable.
Definition MonteCarloUpdater.hpp:242
-
bool new_verlet_neighbour_distances_are_between_min_and_max_length(fp::Node< Real, Index > const &node, fp::vec3< Real > const &displacement)
Pre-update check to test that the update step will not result in an unphysical configuration.
Definition MonteCarloUpdater.hpp:150
-
bool move_needs_undoing()
Implementation of the Metropolis algorithm.
Definition MonteCarloUpdater.hpp:78
-
void flip_MC_updater(fp::Node< Real, Index > const &node)
Attempt a flip Monte Carlo Step.
Definition MonteCarloUpdater.hpp:194
-
void reset_kBT(Real kBT)
Reset the temperature of the Monte Carlo updater, at which the Boltzmann weights are evaluated.
Definition MonteCarloUpdater.hpp:232
-
void move_MC_updater(fp::Node< Real, Index > const &node, fp::vec3< Real > const &displacement)
Attempt a move Monte Carlo Step.
Definition MonteCarloUpdater.hpp:173
-
MonteCarloUpdater(fp::Triangulation< Real, Index, triangulation_type > &triangulation_inp, EnergyFunctionParameters const &prms_inp, std::function< Real(fp::Node< Real, Index > const &, fp::Triangulation< Real, Index, triangulation_type > const &, EnergyFunctionParameters const &)> energy_function_inp, RandomNumberEngine &rng_inp, Real min_bond_length, Real max_bond_length)
Definition MonteCarloUpdater.hpp:60
-
void flip_MC_updater(fp::Node< Real, Index > const &node, Index id_in_nn_ids)
Attempt a flip Monte Carlo Step.
Definition MonteCarloUpdater.hpp:218
-
bool new_next_neighbour_distances_are_between_min_and_max_length(fp::Node< Real, Index > const &node, fp::vec3< Real > const &displacement)
Pre-update check to test that the update step will not result in an unphysical configuration.
Definition MonteCarloUpdater.hpp:120
-
unsigned long flip_back_count() const
A getter function that returns a value of a state variable.
Definition MonteCarloUpdater.hpp:304
-
bool new_neighbour_distances_are_between_min_and_max_length(fp::Node< Real, Index > const &node, fp::vec3< Real > const &displacement)
Pre-update check to test that the update step will not result in an unphysical configuration.
Definition MonteCarloUpdater.hpp:100
-
unsigned long bond_length_move_rejection_count() const
A getter function that returns a value of a state variable.
Definition MonteCarloUpdater.hpp:261
-
Implementation of Triangulation of two-dimensional surfaces in 3D.
Definition Triangulation.hpp:297
-
void unflip_bond(Index node_id, Index nn_id, BondFlipData< Index > const &common_nns)
Un-flip a bond that was just flipped.
Definition Triangulation.hpp:615
-
BondFlipData< Index > flip_bond(Index node_id, Index nn_id, Real min_bond_length_square, Real max_bond_length_square)
Securely flip the bond inside a quadrilateral formed by the nodes given by node_id,...
Definition Triangulation.hpp:528
-
void move_node(Index node_id, vec3< Real > const &displacement_vector)
Move an individual node of the triangulation and update all the geometric quantities of the triangula...
Definition Triangulation.hpp:493
+
A helper class for updating the triangulation, using Metropolis–Hastings algorithm....
Definition MonteCarloUpdater.hpp:34
+
bool new_neighbour_distances_are_between_min_and_max_length(fp::Node const &node, fp::vec3< Real > const &displacement)
Pre-update check to test that the update step will not result in an unphysical configuration.
Definition MonteCarloUpdater.hpp:98
+
void flip_MC_updater(fp::Node const &node)
Attempt a flip Monte Carlo Step.
Definition MonteCarloUpdater.hpp:201
+
unsigned long bond_length_flip_rejection_count() const
A getter function that returns a value of a state variable.
Definition MonteCarloUpdater.hpp:302
+
void reset_kBT(Real kBT)
Reset the temperature of the Monte Carlo updater, at which the Boltzmann weights are evaluated.
Definition MonteCarloUpdater.hpp:241
+
std::optional< Real > move_MC_updater(fp::Node const &node, fp::vec3< Real > const &displacement)
Attempt a move Monte Carlo Step.
Definition MonteCarloUpdater.hpp:172
+
bool new_verlet_neighbour_distances_are_between_min_and_max_length(fp::Node const &node, fp::vec3< Real > const &displacement)
Pre-update check to test that the update step will not result in an unphysical configuration.
Definition MonteCarloUpdater.hpp:148
+
unsigned long move_back_count() const
A getter function that returns a value of a state variable.
Definition MonteCarloUpdater.hpp:282
+
unsigned long move_attempt_count() const
A getter function that returns a value of a state variable.
Definition MonteCarloUpdater.hpp:260
+
void flip_MC_updater(fp::Node const &node, Index id_in_nn_ids)
Attempt a flip Monte Carlo Step.
Definition MonteCarloUpdater.hpp:219
+
unsigned long bond_length_move_rejection_count() const
A getter function that returns a value of a state variable.
Definition MonteCarloUpdater.hpp:270
+
unsigned long flip_attempt_count() const
A getter function that returns a value of a state variable.
Definition MonteCarloUpdater.hpp:293
+
Real kBT()
A getter function that returns a value of a state variable.
Definition MonteCarloUpdater.hpp:251
+
unsigned long flip_back_count() const
A getter function that returns a value of a state variable.
Definition MonteCarloUpdater.hpp:313
+
bool new_next_neighbour_distances_are_between_min_and_max_length(fp::Node const &node, fp::vec3< Real > const &displacement)
Pre-update check to test that the update step will not result in an unphysical configuration.
Definition MonteCarloUpdater.hpp:118
+
bool move_needs_undoing(Real e_diff)
Implementation of the Metropolis algorithm.
Definition MonteCarloUpdater.hpp:77
+
MonteCarloUpdater(fp::Triangulation &triangulation_inp, EnergyFunctionParameters const &prms_inp, EnergyFunctionType energy_function_inp, RandomNumberEngine &rng_inp, Real min_bond_length, Real max_bond_length)
Definition MonteCarloUpdater.hpp:62
+
Implementation of Triangulation of two-dimensional surfaces in 3D.
Definition Triangulation.hpp:289
+
void unflip_bond(Index node_id, Index nn_id, BondFlipData const &common_nns)
Un-flip a bond that was just flipped.
Definition Triangulation.hpp:576
+
void move_node(Index node_id, vec3< Real > const &displacement_vector)
Move an individual node of the triangulation and update all the geometric quantities of the triangula...
Definition Triangulation.hpp:450
+
Neighbors previous_and_next_neighbour_global_ids(Index node_id, Index nn_id) const
Definition Triangulation.hpp:1041
+
BondFlipData flip_bond(Index node_id, Index nn_id, Real min_bond_length_square, Real max_bond_length_square)
Securely flip the bond inside a quadrilateral formed by the nodes given by node_id,...
Definition Triangulation.hpp:485
Internal implementation of a 3D vector.
Definition vec3.hpp:43
This file contains the concepts that are costomly defined for the flippy class templates.
Definition custom_concepts.hpp:8
+
A helper struct; keeps track of bond flips.
Definition Triangulation.hpp:86
+
bool flipped
track if the bond was flipped.
Definition Triangulation.hpp:87
+
Definition Triangulation.hpp:101
+
Index j_m_1
neighbor j+1
Definition Triangulation.hpp:103
+
Index j_p_1
neighbor j-1
Definition Triangulation.hpp:105
A data structure containing all geometric and topological information associated with a node.
Definition Nodes.hpp:30
-
vec3< Real > pos
Position of the node in the lab frame.
Definition Nodes.hpp:73
-
Index id
Global id of the Node, which is a number between 0 and max_number_of_nodes - 1.
Definition Nodes.hpp:32
-
std::vector< vec3< Real > > nn_distances
Distance vectors pointing from the node to its next neighbors.
Definition Nodes.hpp:95
-
std::vector< Index > nn_ids
A vector containing the global ids of the current node's next neighbors.
Definition Nodes.hpp:93
-
std::vector< Index > verlet_list
The Verlet list contains the ids of nodes that are close to this node.
Definition Nodes.hpp:97
+
vec3< Real > pos
Position of the node in the lab frame.
Definition Nodes.hpp:61
+
std::vector< Index > verlet_list
The Verlet list contains the ids of nodes that are close to this node.
Definition Nodes.hpp:85
+
std::vector< vec3< Real > > nn_distances
Distance vectors pointing from the node to its next neighbors.
Definition Nodes.hpp:83
+
Index id
Global id of the Node, which is a number between 0 and max_number_of_nodes - 1.
Definition Nodes.hpp:32
+
std::vector< Index > nn_ids
A vector containing the global ids of the current node's next neighbors.
Definition Nodes.hpp:81
diff --git a/docs/_nodes_8hpp.html b/docs/_nodes_8hpp.html old mode 100644 new mode 100755 index 1d1a832..2de6df8 --- a/docs/_nodes_8hpp.html +++ b/docs/_nodes_8hpp.html @@ -3,16 +3,18 @@ - + flippy: flippy/Nodes.hpp File Reference + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -109,7 +116,8 @@

This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node of the triangulation and the collection of all nodes of the triangulation, respectively. More...

-
#include <vector>
+
#include <utility>
+#include <vector>
#include <unordered_set>
#include "external/json.hpp"
#include "vec3.hpp"
@@ -117,35 +125,77 @@ Include dependency graph for Nodes.hpp:
+ + + + + + + + + + + + + + + + + + + + + + +
This graph shows which files directly or indirectly include this file:
+ + + + + + + + + + + + + + + + + + +

Go to the source code of this file.

- + - +

Classes

struct  fp::Node< Real, Index >
struct  fp::Node
 A data structure containing all geometric and topological information associated with a node. More...
 
struct  fp::Nodes< Real, Index >
struct  fp::Nodes
 Data structure containing all nodes of the Triangulation. More...
 
- +

Namespaces

namespace  fp
namespace  fp
 
- - - + + +

Typedefs

-using fp::Json = nlohmann::json
 shortening of the nlohmann::json namespace, which is an external open source library bundled by flippy.
 
+using fp::Json = nlohmann::json
 shortening of the nlohmann::json namespace, which is an external open source library bundled by flippy.
 

Detailed Description

This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node of the triangulation and the collection of all nodes of the triangulation, respectively.

@@ -155,7 +205,7 @@ diff --git a/docs/_nodes_8hpp.js b/docs/_nodes_8hpp.js old mode 100644 new mode 100755 index d9a1bdf..af07b65 --- a/docs/_nodes_8hpp.js +++ b/docs/_nodes_8hpp.js @@ -1,6 +1,6 @@ var _nodes_8hpp = [ - [ "fp::Node< Real, Index >", "structfp_1_1_node.html", "structfp_1_1_node" ], - [ "fp::Nodes< Real, Index >", "structfp_1_1_nodes.html", "structfp_1_1_nodes" ], - [ "Json", "_nodes_8hpp.html#ga0527b166a9415a6e07381ef4e11ed318", null ] + [ "fp::Node", "structfp_1_1_node.html", "structfp_1_1_node" ], + [ "fp::Nodes", "structfp_1_1_nodes.html", "structfp_1_1_nodes" ], + [ "Json", "_nodes_8hpp.html#ga7bd3848f67a3e8464cd2db3d7b255c04", null ] ]; \ No newline at end of file diff --git a/docs/_nodes_8hpp__dep__incl.dot b/docs/_nodes_8hpp__dep__incl.dot deleted file mode 100644 index 2faddf4..0000000 --- a/docs/_nodes_8hpp__dep__incl.dot +++ /dev/null @@ -1,16 +0,0 @@ -digraph "flippy/Nodes.hpp" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="flippy/Nodes.hpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node o..."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="flippy/MonteCarloUpdater.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_monte_carlo_updater_8hpp.html",tooltip="This file contains the MonteCarloUpdater class template. Together with Triangulation...."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="flippy/Triangulation.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_triangulation_8hpp.html",tooltip="This file contains the fp::Triangulation class and several related helper classes...."]; - Node3 -> Node2 [id="edge3_Node000003_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 -> Node4 [id="edge4_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="flippy/flippy.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$flippy_8hpp.html",tooltip="This header file exists for convenience. Including this header will automatically include all parts o..."]; - Node1 -> Node4 [id="edge5_Node000001_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; -} diff --git a/docs/_nodes_8hpp__dep__incl.map b/docs/_nodes_8hpp__dep__incl.map new file mode 100755 index 0000000..4c12de2 --- /dev/null +++ b/docs/_nodes_8hpp__dep__incl.map @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/docs/_nodes_8hpp__dep__incl.md5 b/docs/_nodes_8hpp__dep__incl.md5 new file mode 100755 index 0000000..67aaed3 --- /dev/null +++ b/docs/_nodes_8hpp__dep__incl.md5 @@ -0,0 +1 @@ +081479b337c91d050eadd09f8bcb01ef \ No newline at end of file diff --git a/docs/_nodes_8hpp__dep__incl.png b/docs/_nodes_8hpp__dep__incl.png new file mode 100755 index 0000000..f93049c Binary files /dev/null and b/docs/_nodes_8hpp__dep__incl.png differ diff --git a/docs/_nodes_8hpp__incl.dot b/docs/_nodes_8hpp__incl.dot deleted file mode 100644 index 1d29b22..0000000 --- a/docs/_nodes_8hpp__incl.dot +++ /dev/null @@ -1,26 +0,0 @@ -digraph "flippy/Nodes.hpp" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="flippy/Nodes.hpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node o..."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="vector",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="unordered_set",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="external/json.hpp",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node5 [id="edge4_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="vec3.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$vec3_8hpp.html",tooltip="Header file containing the definition and implementation a 3 dimensional vector class,..."]; - Node5 -> Node6 [id="edge5_Node000005_Node000006",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="ostream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node5 -> Node7 [id="edge6_Node000005_Node000007",color="steelblue1",style="solid",tooltip=" "]; - Node7 [id="Node000007",label="iostream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node5 -> Node8 [id="edge7_Node000005_Node000008",color="steelblue1",style="solid",tooltip=" "]; - Node8 [id="Node000008",label="cmath",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node5 -> Node9 [id="edge8_Node000005_Node000009",color="steelblue1",style="solid",tooltip=" "]; - Node9 [id="Node000009",label="custom_concepts.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$custom__concepts_8hpp.html",tooltip="This file contains the concepts that are costomly defined for the flippy class templates."]; - Node9 -> Node10 [id="edge9_Node000009_Node000010",color="steelblue1",style="solid",tooltip=" "]; - Node10 [id="Node000010",label="concepts",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; -} diff --git a/docs/_nodes_8hpp__incl.map b/docs/_nodes_8hpp__incl.map new file mode 100755 index 0000000..745e7b7 --- /dev/null +++ b/docs/_nodes_8hpp__incl.map @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/_nodes_8hpp__incl.md5 b/docs/_nodes_8hpp__incl.md5 new file mode 100755 index 0000000..e25062c --- /dev/null +++ b/docs/_nodes_8hpp__incl.md5 @@ -0,0 +1 @@ +7bfd23e86f77b20a741980f46c41d786 \ No newline at end of file diff --git a/docs/_nodes_8hpp__incl.png b/docs/_nodes_8hpp__incl.png new file mode 100755 index 0000000..63dbb9d Binary files /dev/null and b/docs/_nodes_8hpp__incl.png differ diff --git a/docs/_nodes_8hpp_source.html b/docs/_nodes_8hpp_source.html old mode 100644 new mode 100755 index c73ae6f..b296403 --- a/docs/_nodes_8hpp_source.html +++ b/docs/_nodes_8hpp_source.html @@ -3,16 +3,18 @@ - + flippy: flippy/Nodes.hpp Source File + - + + @@ -43,28 +45,28 @@
- + + -
@@ -109,344 +111,226 @@
Go to the documentation of this file.
1#ifndef FLIPPY_NODES_HPP
2#define FLIPPY_NODES_HPP
-
8#include <vector>
-
9#include <unordered_set>
-
10
-
11#include "external/json.hpp"
-
12
-
13#include "vec3.hpp"
-
14
-
15namespace fp {
-
16using Json = nlohmann::json;
-
18
-
28template<floating_point_number Real, indexing_number Index>
+
8#include <utility>
+
9#include <vector>
+
10#include <unordered_set>
+
11
+
12#include "external/json.hpp"
+
13
+
14#include "vec3.hpp"
+
15
+
16namespace fp {
+
17using Json = nlohmann::json;
+
19
29struct Node
30{
-
32 Index id;
+
32 Index id;
34
-
45 Real area;
+
45 Real area;
47
-
58 Real volume;
-
60
- - -
75
- -
85
-
93 std::vector<Index> nn_ids;
-
95 std::vector<vec3<Real>> nn_distances;
-
97 std::vector<Index> verlet_list;
-
98
-
99 // unit-tested
-
-
101 void pop_nn(Index to_pop_nn_id)
-
102 {
-
110 auto pop_pos = find_nns_loc_pointer(to_pop_nn_id);
-
111 auto dist = pop_pos - nn_ids.begin();
-
112
-
113 if (pop_pos!=nn_ids.end()) {
-
114 // I checked that this would work on example code on cppreference https://godbolt.org/z/6qf8c9nTz
-
115 nn_ids.erase(pop_pos);
-
116 nn_distances.erase(nn_distances.begin() + dist);
-
117 }
-
118 }
-
-
119
-
-
120 auto find_nns_loc_pointer(Index nn_id){
-
135 return std::find(nn_ids.begin(), nn_ids.end(), nn_id);
-
136 }
-
-
137
-
138 // unit-tested
-
-
139 void emplace_nn_id(Index to_emplace_nn_id, vec3<Real> const& to_emplace_nn_pos, Index loc_idx)
-
140 {
-
156 if (loc_idx<nn_ids.size()) {
-
157 auto signed_loc_idx = static_cast<long long >(loc_idx);
-
158 nn_ids.emplace(nn_ids.begin() + signed_loc_idx, to_emplace_nn_id);
-
159 nn_distances.emplace(nn_distances.begin() + signed_loc_idx, to_emplace_nn_pos - pos);
-
160 }
-
161 }
-
-
162
-
163 //unit-tested
-
-
165 vec3<Real> const& get_distance_vector_to(Index nn_id) const
-
166 {
-
174 auto id_pos = std::find(nn_ids.begin(), nn_ids.end(), nn_id);
-
175 if (id_pos!=nn_ids.end()) {
-
176 return nn_distances[static_cast<Index>(id_pos - nn_ids.begin())];
-
177 }
-
178 else {
-
179 std::cerr << "nn_id:" << nn_id << " provided to `get_distance_vector_to` is not a next neighbour of the node "
-
180 << id;
-
181 exit(12);
-
182 }
-
183 }
-
-
184
-
185 //defaulted operators are not explicitly unit-tested
-
192 bool operator==(Node<Real, Index> const& other_node) const = default;
+
58 Real volume;
+
59
+ +
63
+ +
73
+
81 std::vector<Index> nn_ids;
+
83 std::vector<vec3<Real>> nn_distances;
+
85 std::vector<Index> verlet_list;
+
86
+
+
87 auto find_nns_loc_pointer(Index nn_id){
+
102 return std::find(nn_ids.begin(), nn_ids.end(), nn_id);
+
103 }
+
+
104
+
105 // unit-tested
+
+
107 void pop_nn(Index to_pop_nn_id)
+
108 {
+
116 auto pop_pos = find_nns_loc_pointer(to_pop_nn_id);
+
117 auto dist = pop_pos - nn_ids.begin();
+
118
+
119 if (pop_pos!=nn_ids.end()) {
+
120 // I checked that this would work on example code on cppreference https://godbolt.org/z/6qf8c9nTz
+
121 nn_ids.erase(pop_pos);
+
122 nn_distances.erase(nn_distances.begin() + dist);
+
123 }
+
124 }
+
+
125
+
126
+
127
+
128 // unit-tested
+
+
129 void emplace_nn_id(Index to_emplace_nn_id, vec3<Real> const& to_emplace_nn_pos, Index loc_idx)
+
130 {
+
146 if (loc_idx<nn_ids.size()) {
+
147 auto signed_loc_idx = static_cast<long long >(loc_idx);
+
148 nn_ids.emplace(nn_ids.begin() + signed_loc_idx, to_emplace_nn_id);
+
149 nn_distances.emplace(nn_distances.begin() + signed_loc_idx, to_emplace_nn_pos - pos);
+
150 }
+
151 }
+
+
152
+
153 //unit-tested
+
+
155 vec3<Real> const& get_distance_vector_to(Index nn_id) const
+
156 {
+
164 auto id_pos = std::find(nn_ids.begin(), nn_ids.end(), nn_id);
+
165 if (id_pos!=nn_ids.end()) {
+
166 return nn_distances[static_cast<Index>(id_pos - nn_ids.begin())];
+
167 }
+
168 else {
+
169 std::cerr << "nn_id:" << nn_id << " provided to `get_distance_vector_to` is not a next neighbour of the node "
+
170 << id;
+
171 exit(12);
+
172 }
+
173 }
+
+
174
+
175 //defaulted operators are not explicitly unit-tested
+
182 bool operator==(Node const& other_node) const = default;
+
183
+
+
191 friend std::ostream& operator<<(std::ostream& os, Node const& node)
+
192 {
193
-
-
201 friend std::ostream& operator<<(std::ostream& os, Node<Real, Index> const& node)
-
202 {
-
203
-
204 os << "node: " << node.id << '\n'
-
205 << "area: " << node.area << '\n'
-
206 << "volume: " << node.volume << '\n'
-
207 << "unit_bending_energy: " << node.unit_bending_energy << '\n'
-
208 << "curvature_vec: " << node.curvature_vec << '\n'
-
209 << "pos: " << node.pos << '\n'
-
210 << "nn_ids: ";
-
211 for (auto const& nn_id: node.nn_ids) {
-
212 os << nn_id << ' ';
-
213 }
-
214 os << '\n'
-
215 << "nn_distances: ";
-
216 for (auto const& nn_dist: node.nn_distances) {
-
217 os << nn_dist << '\n';
-
218 }
-
219 os << '\n';
-
220
-
221 return os;
-
222 }
-
-
223
-
224};
-
-
225
-
235template<floating_point_number Real, indexing_number Index>
-
-
236struct Nodes
-
237{
-
238 std::vector<Node<Real, Index>> data;
-
239
-
240 Nodes() = default;
-
241 explicit Nodes(std::vector<Node<Real, Index> > data_inp):data(data_inp)
-
242 {
-
247 }
-
-
248 explicit Nodes(Json const& node_dict)
-
249 {
-
256 std::vector<Index> nn_ids_temp, verlet_list_temp;
-
257 data.resize((node_dict.size()));
-
258 for (auto const& node: node_dict.items()) {
-
259 auto const& node_id = node.key();
-
260 fp::indexing_number auto node_index = static_cast<Index>(std::stol(node_id));
-
261 auto const& raw_pos = node.value()["pos"];
-
262 vec3<Real> pos{(Real) raw_pos[0], (Real) raw_pos[1], (Real) raw_pos[2]};
-
263
-
264 auto const& raw_curv = node.value()["curvature_vec"];
-
265 vec3<Real> curvature_vec{(Real) raw_curv[0], (Real) raw_curv[1], (Real) raw_curv[2]};
-
266 Real unit_bending_energy = node.value()["unit_bending_energy"];
-
267 Real area = node.value()["area"];
-
268 Real volume = node.value()["volume"];
-
269
-
270 nn_ids_temp = node_dict[node_id]["nn_ids"].get<std::vector<Index>>();
-
271 verlet_list_temp = node_dict[node_id]["verlet_list"].get<std::vector<Index>>();
-
272 std::vector<vec3<Real>> nn_distances;
+
194 os << "node: " << node.id << '\n'
+
195 << "area: " << node.area << '\n'
+
196 << "volume: " << node.volume << '\n'
+
197 << "curvature_vec: " << node.curvature_vec << '\n'
+
198 << "pos: " << node.pos << '\n'
+
199 << "nn_ids: ";
+
200 for (auto const& nn_id: node.nn_ids) {
+
201 os << nn_id << ' ';
+
202 }
+
203 os << '\n'
+
204 << "nn_distances: ";
+
205 for (auto const& nn_dist: node.nn_distances) {
+
206 os << nn_dist << '\n';
+
207 }
+
208 os << '\n';
+
209
+
210 return os;
+
211 }
+
+
212
+
213};
+
+
214
+
+
224struct Nodes
+
225{
+
226 std::vector<Node> data;
+
227
+
228 Nodes() = default;
+
229 explicit Nodes(std::vector<Node> data_inp):data(data_inp)
+
230 {
+
235 }
+
+
236 explicit Nodes(Json const& node_dict)
+
237 {
+
244 std::vector<Index> nn_ids_temp, verlet_list_temp;
+
245 data.resize((node_dict.size()));
+
246 for (auto const& node: node_dict.items()) {
+
247 auto const& node_id = node.key();
+
248 fp::indexing_number auto node_index = static_cast<Index>(std::stol(node_id));
+
249 auto const& raw_pos = node.value()["pos"];
+
250 vec3<Real> pos{(Real) raw_pos[0], (Real) raw_pos[1], (Real) raw_pos[2]};
+
251
+
252 auto const& raw_curv = node.value()["curvature_vec"];
+
253 vec3<Real> curvature_vec{(Real) raw_curv[0], (Real) raw_curv[1], (Real) raw_curv[2]};
+
254 Real area = node.value()["area"];
+
255 Real volume = node.value()["volume"];
+
256
+
257 nn_ids_temp = node_dict[node_id]["nn_ids"].get<std::vector<Index>>();
+
258 verlet_list_temp = node_dict[node_id]["verlet_list"].get<std::vector<Index>>();
+
259 std::vector<vec3<Real>> nn_distances;
+
260
+
261 data[static_cast<size_t>(node_index)] = Node{
+
262 .id=node_index,
+
263 .area=area,
+
264 .volume=volume,
+
265 .pos{pos},
+
266 .curvature_vec{curvature_vec},
+
267 .nn_ids{nn_ids_temp},
+
268 .nn_distances{nn_distances},
+
269 .verlet_list{verlet_list_temp}
+
270 };
+
271 }
+
272 }
273
-
274 data[static_cast<size_t>(node_index)] = Node<Real, Index>{
-
275 .id{node_index},
-
276 .area{area},
-
277 .volume{volume},
-
278 .unit_bending_energy{unit_bending_energy},
-
279 .pos{pos},
-
280 .curvature_vec{curvature_vec},
-
281 .nn_ids{nn_ids_temp},
-
282 .nn_distances{nn_distances},
-
283 .verlet_list{verlet_list_temp}
-
284 };
-
285 }
-
286 }
-
287
-
-
288 typename std::vector<Node<Real, Index>>::iterator begin()
-
289 {
-
294 return data.begin();}
-
-
295 typename std::vector<Node<Real, Index>>::const_iterator begin() const
-
296 {
-
301 return data.begin();
-
302 }
-
303
-
-
304 typename std::vector<Node<Real, Index>>::iterator end()
-
305 {
-
310 return data.end();
-
311 }
-
-
312 typename std::vector<Node<Real, Index>>::const_iterator end() const
-
313 {
-
318 return data.end();}
+
+
274 typename std::vector<Node>::iterator begin()
+
275 {
+
280 return data.begin();}
+
+
281 [[nodiscard]] typename std::vector<Node>::const_iterator begin() const
+
282 {
+
287 return data.begin();
+
288 }
+
289
+
+
290 typename std::vector<Node>::iterator end()
+
291 {
+
296 return data.end();
+
297 }
+
+
298 [[nodiscard]] typename std::vector<Node>::const_iterator end() const
+
299 {
+
304 return data.end();}
+
305
+
306 // getters and setters
+
307
+
308 //unit-tested
+
309
+
+
310 void emplace_nn_id(Index node_id, Index to_emplace_nn_id, Index loc_nn_index){
+
317 data[node_id].emplace_nn_id(to_emplace_nn_id, data[to_emplace_nn_id].pos, loc_nn_index);
+
318 }
319
-
320 // getters and setters
-
321
-
322 // Position block
-
323 //unit-tested
-
-
324 [[nodiscard]] const vec3<Real>& pos(Index node_id) const
-
325 {
-
330 return data[node_id].pos;
-
331 }
-
332 //unit-tested
-
-
333 void set_pos(Index node_id, vec3<Real> const& new_pos){
-
338 data[node_id].pos=new_pos;
-
339 }
+
+
320 void set_nn_distance(Index node_id, Index loc_nn_index, vec3<Real>&& dist){
+
326 data[node_id].nn_distances[loc_nn_index]=dist;
+
327 }
+
328
+
+
329 void set_nn_distance(Index node_id, Index loc_nn_index, vec3<Real> const& dist){
+
335 data[node_id].nn_distances[loc_nn_index]=dist;
+
336 }
+
337
+
+
338 [[nodiscard]] Index size() const { return static_cast<Index>(data.size()); }
+
339
-
340 void set_pos(Index node_id, vec3<Real> && new_pos){
-
345 data[node_id].pos=new_pos;
-
346 }
-
-
347 void displace(Index node_id, vec3<Real>const& displacement){
-
352 data[node_id].pos+=displacement;
-
353 }
-
-
354 void displace(Index node_id, vec3<Real>&& displacement)
-
355 {
-
360 data[node_id].pos+=displacement;
-
361 }
-
362
-
363 // Curvature vector block
-
-
364 [[nodiscard]] const vec3<Real>& curvature_vec(Index node_id) const {
-
369 return data[node_id].curvature_vec;
-
370 }
-
-
371 void set_curvature_vec(Index node_id, vec3<Real> const& new_cv) {
-
376 data[node_id].curvature_vec=new_cv;
-
377 }
-
-
378 void set_curvature_vec(Index node_id, vec3<Real> && new_cv) {
-
383 data[node_id].curvature_vec=new_cv;
-
384 }
-
385
-
386 // Area block
-
-
387 [[nodiscard]] Real area(Index node_id)const{
-
392 return data[node_id].area;
-
393 }
-
-
394 void set_area(Index node_id, Real new_area){
-
400 data[node_id].area = new_area;
-
401 }
-
402
-
403 // Volume block
-
-
404 [[nodiscard]] Real volume(Index node_id)const{
-
409 return data[node_id].volume;
-
410 }
-
-
411 void set_volume(Index node_id, Real new_volume){
-
417 data[node_id].volume = new_volume;
-
418 }
-
419
-
420 // Unit bending rigidity block
-
-
421 [[nodiscard]] Real unit_bending_energy(Index node_id)const{
-
427 return data[node_id].unit_bending_energy;
-
428 }
-
-
429 void set_unit_bending_energy(Index node_id, Real new_ube){
-
435 data[node_id].unit_bending_energy=new_ube;
-
436 }
-
-
437
-
438 // nn_id[s] block
-
439 //unit-tested
-
440 [[nodiscard]] const auto& nn_ids(Index node_id)const{
-
445 return data[node_id].nn_ids;
-
446 }
-
447 //unit-tested
-
-
448 void set_nn_ids(Index node_id, std::vector<Index>const& new_nn_ids){
-
456 data[node_id].nn_ids = new_nn_ids;
-
457 }
-
458 //unit-tested
-
-
459 [[nodiscard]] Index nn_id(Index node_id, Index loc_nn_index)const{
-
465 return data[node_id].nn_ids[loc_nn_index];
-
466 }
-
467 //unit-tested
-
-
468 void set_nn_id(Index node_id, Index loc_nn_index, Index nn_id){
-
474 data[node_id].nn_ids[loc_nn_index]=nn_id;
-
475 }
-
-
476 void emplace_nn_id(Index node_id, Index to_emplace_nn_id, Index loc_nn_index){
-
483 data[node_id].emplace_nn_id(to_emplace_nn_id, pos(to_emplace_nn_id), loc_nn_index);
-
484 }
-
485
-
-
486 [[nodiscard]] const auto& nn_distances(Index node_id)const{
-
492 return data[node_id].nn_distances;
-
493 }
-
-
494 [[nodiscard]] const auto& get_nn_distance_vector_between(Index node_id, Index nn_id) const{
-
502 return data[node_id].get_distance_vector_to(nn_id);
-
503 }
-
-
504 void set_nn_distance(Index node_id, Index loc_nn_index, vec3<Real>&& dist){
-
510 data[node_id].nn_distances[loc_nn_index]=dist;
-
511 }
-
-
512 void set_nn_distance(Index node_id, Index loc_nn_index, vec3<Real> const& dist){
-
518 data[node_id].nn_distances[loc_nn_index]=dist;
-
519 }
-
520
-
-
521 [[nodiscard]] Index size() const { return static_cast<Index>(data.size()); }
-
522
-
- -
529 return data[node_id];
-
530 }
-
-
531 const Node<Real, Index>& operator[](Index node_id) const {
-
537 return data.at(node_id);
-
538 }
-
539
-
-
540 [[nodiscard]] Json make_data() const{
-
545 Json json_data;
-
546 for (auto& node : data) {
-
547 json_data[std::to_string(node.id)] = {
-
548 {"area", node.area},
-
549 {"volume", node.volume},
-
550 {"unit_bending_energy", node.unit_bending_energy},
-
551 {"pos", {node.pos[0], node.pos[1], node.pos[2]}},
-
552 {"curvature_vec", {node.curvature_vec[0], node.curvature_vec[1], node.curvature_vec[2]}},
-
553 {"nn_ids", node.nn_ids},
-
554 {"verlet_list", node.verlet_list},
-
555 };
-
556 }
-
557 return json_data;
-
558 }
-
559};
-
560}
-
561#endif //FLIPPY_NODES_HPP
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
340 Node& operator[](Index node_id) {
+
346 return data[node_id];
+
347 }
+
+
348 const Node& operator[](Index node_id) const {
+
354 return data.at(node_id);
+
355 }
+
356
+
+
357 [[nodiscard]] Json make_data() const{
+
362 Json json_data;
+
363 for (auto& node : data) {
+
364 json_data[std::to_string(node.id)] = {
+
365 {"area", node.area},
+
366 {"volume", node.volume},
+
367 {"pos", {node.pos[0], node.pos[1], node.pos[2]}},
+
368 {"curvature_vec", {node.curvature_vec[0], node.curvature_vec[1], node.curvature_vec[2]}},
+
369 {"nn_ids", node.nn_ids},
+
370 {"verlet_list", node.verlet_list},
+
371 };
+
372 }
+
373 return json_data;
+
374 }
+
375};
+
376}
+
377#endif //FLIPPY_NODES_HPP
@@ -462,60 +346,39 @@
Internal implementation of a 3D vector.
Definition vec3.hpp:43
Here we implement the concepts of a positive integer number that is used throughout the code for inde...
Definition custom_concepts.hpp:31
-
nlohmann::json Json
shortening of the nlohmann::json namespace, which is an external open source library bundled by flipp...
Definition Nodes.hpp:16
+
nlohmann::json Json
shortening of the nlohmann::json namespace, which is an external open source library bundled by flipp...
Definition Nodes.hpp:17
Definition custom_concepts.hpp:8
A data structure containing all geometric and topological information associated with a node.
Definition Nodes.hpp:30
-
vec3< Real > pos
Position of the node in the lab frame.
Definition Nodes.hpp:73
-
vec3< Real > curvature_vec
Curvature vector of the node.
Definition Nodes.hpp:83
-
Index id
Global id of the Node, which is a number between 0 and max_number_of_nodes - 1.
Definition Nodes.hpp:32
-
auto find_nns_loc_pointer(Index nn_id)
Definition Nodes.hpp:120
-
Real unit_bending_energy
unit_bending_energy corresponds to the Helfrich bending energy with bending rigidity 1 and gaussian b...
Definition Nodes.hpp:71
-
Real area
Voronoi area associated with the node.
Definition Nodes.hpp:45
-
std::vector< vec3< Real > > nn_distances
Distance vectors pointing from the node to its next neighbors.
Definition Nodes.hpp:95
-
bool operator==(Node< Real, Index > const &other_node) const =default
Default equality operator.
-
vec3< Real > const & get_distance_vector_to(Index nn_id) const
This function can provide the stored distance vector to the next neighbor.
Definition Nodes.hpp:165
-
friend std::ostream & operator<<(std::ostream &os, Node< Real, Index > const &node)
Streaming operator that can print formatted output to standard out with all Node data fields.
Definition Nodes.hpp:201
-
void pop_nn(Index to_pop_nn_id)
Find and deletes the element with the id to_pop_nn_id in the nn_id vector.
Definition Nodes.hpp:101
-
Real volume
If the node is part of a closed surface triangulation, then the volume contains the volume of the tet...
Definition Nodes.hpp:58
-
std::vector< Index > nn_ids
A vector containing the global ids of the current node's next neighbors.
Definition Nodes.hpp:93
-
void emplace_nn_id(Index to_emplace_nn_id, vec3< Real > const &to_emplace_nn_pos, Index loc_idx)
Definition Nodes.hpp:139
-
std::vector< Index > verlet_list
The Verlet list contains the ids of nodes that are close to this node.
Definition Nodes.hpp:97
-
Data structure containing all nodes of the Triangulation.
Definition Nodes.hpp:237
-
void set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > &&dist)
Overwrite the next neighbor distance with a new 3d vector.
Definition Nodes.hpp:504
-
Index size() const
Size of the Nodes data member.
Definition Nodes.hpp:521
-
Node< Real, Index > & operator[](Index node_id)
Square bracket operator overload for convenient indexing of the Nodes struct.
Definition Nodes.hpp:523
-
Real volume(Index node_id) const
Given a node id, return node associated volume.
Definition Nodes.hpp:404
-
void set_nn_id(Index node_id, Index loc_nn_index, Index nn_id)
For a node specified by node_id, resets the value of the requested nn_id.
Definition Nodes.hpp:468
-
const vec3< Real > & pos(Index node_id) const
Given a node id, return the constant reference to the node position.
Definition Nodes.hpp:324
-
void set_volume(Index node_id, Real new_volume)
Given a node id and a new volume value, reset the current value of the node volume.
Definition Nodes.hpp:411
-
void set_curvature_vec(Index node_id, vec3< Real > &&new_cv)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition Nodes.hpp:378
-
void emplace_nn_id(Index node_id, Index to_emplace_nn_id, Index loc_nn_index)
Emplace a the id of a new node in the Node::nn_ids vector, in front of the loc_idx position.
Definition Nodes.hpp:476
-
void set_curvature_vec(Index node_id, vec3< Real > const &new_cv)
Given a node id and a new curvature vector, reset the node's current curvature vector.
Definition Nodes.hpp:371
-
Index nn_id(Index node_id, Index loc_nn_index) const
Given a node id and the local index in the Node::nn_ids vector, returns the next neighbour id.
Definition Nodes.hpp:459
-
void set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > const &dist)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition Nodes.hpp:512
-
void set_nn_ids(Index node_id, std::vector< Index >const &new_nn_ids)
For a Node specified by node_id, overwrite the entire Node::nn_ids vector.
Definition Nodes.hpp:448
-
const auto & get_nn_distance_vector_between(Index node_id, Index nn_id) const
Given two global node ids, returns a distance vector (if the nodes are neighbors).
Definition Nodes.hpp:494
-
void displace(Index node_id, vec3< Real > &&displacement)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition Nodes.hpp:354
-
std::vector< Node< Real, Index > >::iterator begin()
Returns an iterator to the beginning of the underlying data member that contains the collection of th...
Definition Nodes.hpp:288
-
const auto & nn_ids(Index node_id) const
Given a node id and a new value for the node-associated unit bending energy, update the current value...
Definition Nodes.hpp:440
-
Json make_data() const
Serialize the Nodes struct to a JSON object.
Definition Nodes.hpp:540
-
const vec3< Real > & curvature_vec(Index node_id) const
Given a node id, return the constant reference to the node curvature vector.
Definition Nodes.hpp:364
-
void set_pos(Index node_id, vec3< Real > &&new_pos)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition Nodes.hpp:340
-
Nodes()=default
Default constructor.
-
Real unit_bending_energy(Index node_id) const
Given a node id, return node-associated unit bending energy.
Definition Nodes.hpp:421
-
Real area(Index node_id) const
Given a node id, return node associated area.
Definition Nodes.hpp:387
-
const Node< Real, Index > & operator[](Index node_id) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition Nodes.hpp:531
-
std::vector< Node< Real, Index > >::iterator end()
Returns an iterator to the end of the underlying data member that contains the collection of the node...
Definition Nodes.hpp:304
-
void set_area(Index node_id, Real new_area)
Given a node id and a new area value, reset the current value of the node area.
Definition Nodes.hpp:394
-
void set_pos(Index node_id, vec3< Real > const &new_pos)
Sets the position of the requested node to a given position.
Definition Nodes.hpp:333
-
std::vector< Node< Real, Index > >::const_iterator end() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition Nodes.hpp:312
-
void set_unit_bending_energy(Index node_id, Real new_ube)
Definition Nodes.hpp:429
-
const auto & nn_distances(Index node_id) const
Given a node id, returns the std::vector containing distance vectors to next neighbours.
Definition Nodes.hpp:486
-
Nodes(Json const &node_dict)
Constructor from JSON.
Definition Nodes.hpp:248
-
void displace(Index node_id, vec3< Real >const &displacement)
Changes the position of the requested node by a given displacement.
Definition Nodes.hpp:347
-
std::vector< Node< Real, Index > > data
Data member that contains the individual nodes.
Definition Nodes.hpp:238
-
Nodes(std::vector< Node< Real, Index > > data_inp)
Constructor from a vector.
Definition Nodes.hpp:241
-
std::vector< Node< Real, Index > >::const_iterator begin() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition Nodes.hpp:295
+
vec3< Real > pos
Position of the node in the lab frame.
Definition Nodes.hpp:61
+
Real volume
If the node is part of a closed surface triangulation, then the volume contains the volume of the tet...
Definition Nodes.hpp:58
+
vec3< Real > const & get_distance_vector_to(Index nn_id) const
This function can provide the stored distance vector to the next neighbor.
Definition Nodes.hpp:155
+
std::vector< Index > verlet_list
The Verlet list contains the ids of nodes that are close to this node.
Definition Nodes.hpp:85
+
Real area
Voronoi area associated with the node.
Definition Nodes.hpp:45
+
std::vector< vec3< Real > > nn_distances
Distance vectors pointing from the node to its next neighbors.
Definition Nodes.hpp:83
+
vec3< Real > curvature_vec
Curvature vector of the node.
Definition Nodes.hpp:71
+
void pop_nn(Index to_pop_nn_id)
Find and deletes the element with the id to_pop_nn_id in the nn_id vector.
Definition Nodes.hpp:107
+
Index id
Global id of the Node, which is a number between 0 and max_number_of_nodes - 1.
Definition Nodes.hpp:32
+
void emplace_nn_id(Index to_emplace_nn_id, vec3< Real > const &to_emplace_nn_pos, Index loc_idx)
Definition Nodes.hpp:129
+
std::vector< Index > nn_ids
A vector containing the global ids of the current node's next neighbors.
Definition Nodes.hpp:81
+
auto find_nns_loc_pointer(Index nn_id)
Definition Nodes.hpp:87
+
friend std::ostream & operator<<(std::ostream &os, Node const &node)
Streaming operator that can print formatted output to standard out with all Node data fields.
Definition Nodes.hpp:191
+
bool operator==(Node const &other_node) const =default
Default equality operator.
+
Data structure containing all nodes of the Triangulation.
Definition Nodes.hpp:225
+
Json make_data() const
Serialize the Nodes struct to a JSON object.
Definition Nodes.hpp:357
+
Node & operator[](Index node_id)
Square bracket operator overload for convenient indexing of the Nodes struct.
Definition Nodes.hpp:340
+
std::vector< Node >::const_iterator end() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition Nodes.hpp:298
+
void set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > &&dist)
Overwrite the next neighbor distance with a new 3d vector.
Definition Nodes.hpp:320
+
void emplace_nn_id(Index node_id, Index to_emplace_nn_id, Index loc_nn_index)
Emplace a the id of a new node in the Node::nn_ids vector, in front of the loc_idx position.
Definition Nodes.hpp:310
+
Index size() const
Size of the Nodes data member.
Definition Nodes.hpp:338
+
std::vector< Node >::iterator begin()
Returns an iterator to the beginning of the underlying data member that contains the collection of th...
Definition Nodes.hpp:274
+
std::vector< Node > data
Data member that contains the individual nodes.
Definition Nodes.hpp:226
+
void set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > const &dist)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition Nodes.hpp:329
+
std::vector< Node >::const_iterator begin() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition Nodes.hpp:281
+
Nodes(std::vector< Node > data_inp)
Constructor from a vector.
Definition Nodes.hpp:229
+
Nodes()=default
Default constructor.
+
std::vector< Node >::iterator end()
Returns an iterator to the end of the underlying data member that contains the collection of the node...
Definition Nodes.hpp:290
+
Nodes(Json const &node_dict)
Constructor from JSON.
Definition Nodes.hpp:236
+
const Node & operator[](Index node_id) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition Nodes.hpp:348
Header file containing the definition and implementation a 3 dimensional vector class,...
@@ -523,7 +386,7 @@ diff --git a/docs/_triangulation_8hpp.html b/docs/_triangulation_8hpp.html old mode 100644 new mode 100755 index 427f335..3dcc850 --- a/docs/_triangulation_8hpp.html +++ b/docs/_triangulation_8hpp.html @@ -3,16 +3,18 @@ - + flippy: flippy/Triangulation.hpp File Reference + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -103,7 +110,6 @@ Classes | Namespaces | Macros | -Enumerations | Variables
Triangulation.hpp File Reference
@@ -116,38 +122,115 @@ #include "Nodes.hpp"
#include "vec3.hpp"
#include "utilities/utils.hpp"
+#include "utilities/sim_utils.hpp"
#include "Triangulator.hpp"
#include "stlSerializer.hpp"
Include dependency graph for Triangulation.hpp:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
This graph shows which files directly or indirectly include this file:
+ + + + + + + + + + +

Go to the source code of this file.

- + - + - + - +

Classes

struct  fp::BondFlipData< Index >
struct  fp::BondFlipData
 A helper struct; keeps track of bond flips. More...
 
struct  fp::Neighbors< Index >
struct  fp::Neighbors
 
struct  fp::Geometry< Real, Index >
struct  fp::Geometry
 A helper struct. Used by the triangulation class to pass data around in one convenient package. More...
 
class  fp::Triangulation< Real, Index, triangulation_type >
class  fp::Triangulation
 Implementation of Triangulation of two-dimensional surfaces in 3D. More...
 
- +

Namespaces

namespace  fp
namespace  fp
 
- - - -

@@ -156,22 +239,14 @@ #define 

LONG_LONG_MAX   9223372036854775807LL
 Redefinition of the LONG_LONG_MAX macro in case a specific compiler does not implement it. The largest number that fits in the long long type.
 
#define VERY_LARGE_NUMBER_   LONG_LONG_MAX
 Literal for a very large integral number.
 
- - - -

-Enumerations

enum  fp::TriangulationType { fp::SPHERICAL_TRIANGULATION -, fp::EXPERIMENTAL_PLANAR_TRIANGULATION - }
 This enum defines named types of triangulations that are implemented in flippy. More...
 
+ + + +static constexpr int 

Variables

static constexpr auto fp::VERY_LARGE_NUMBER_ = static_cast<Index>(LONG_LONG_MAX)
 Literal for a very large integral number.
 
-static constexpr int fp::BOND_DONATION_CUTOFF = 4
fp::BOND_DONATION_CUTOFF = 4
 a node needs to have more than the cutoff number of bonds to be allowed to donate one
 
@@ -183,7 +258,7 @@ diff --git a/docs/_triangulation_8hpp.js b/docs/_triangulation_8hpp.js old mode 100644 new mode 100755 index 6e9ef08..3b00b07 --- a/docs/_triangulation_8hpp.js +++ b/docs/_triangulation_8hpp.js @@ -1,14 +1,10 @@ var _triangulation_8hpp = [ - [ "fp::BondFlipData< Index >", "structfp_1_1_bond_flip_data.html", "structfp_1_1_bond_flip_data" ], - [ "fp::Neighbors< Index >", "structfp_1_1_neighbors.html", "structfp_1_1_neighbors" ], - [ "fp::Geometry< Real, Index >", "structfp_1_1_geometry.html", "structfp_1_1_geometry" ], - [ "fp::Triangulation< Real, Index, triangulation_type >", "classfp_1_1_triangulation.html", "classfp_1_1_triangulation" ], + [ "fp::BondFlipData", "structfp_1_1_bond_flip_data.html", "structfp_1_1_bond_flip_data" ], + [ "fp::Neighbors", "structfp_1_1_neighbors.html", "structfp_1_1_neighbors" ], + [ "fp::Geometry", "structfp_1_1_geometry.html", "structfp_1_1_geometry" ], + [ "fp::Triangulation", "classfp_1_1_triangulation.html", "classfp_1_1_triangulation" ], [ "LONG_LONG_MAX", "group___globals.html#ga383fc2c0c24436c812cc22289504a151", null ], - [ "VERY_LARGE_NUMBER_", "group___globals.html#ga4fcd71172083b7ac36f8a59485826cc1", null ], - [ "TriangulationType", "_triangulation_8hpp.html#ga6ac3c08b4c402e40a3f270818345078a", [ - [ "SPHERICAL_TRIANGULATION", "_triangulation_8hpp.html#gga6ac3c08b4c402e40a3f270818345078aa4818fa0ff44979ed665568888d681703", null ], - [ "EXPERIMENTAL_PLANAR_TRIANGULATION", "_triangulation_8hpp.html#gga6ac3c08b4c402e40a3f270818345078aafb3c1a4934975221c03cd6b957b3e089", null ] - ] ], + [ "VERY_LARGE_NUMBER_", "_triangulation_8hpp.html#gaff604346ea6ff1903047ab9714652974", null ], [ "BOND_DONATION_CUTOFF", "_triangulation_8hpp.html#ga1f3b45f2b89de3c4508d87fca78f2a16", null ] ]; \ No newline at end of file diff --git a/docs/_triangulation_8hpp__dep__incl.dot b/docs/_triangulation_8hpp__dep__incl.dot deleted file mode 100644 index 3adc59f..0000000 --- a/docs/_triangulation_8hpp__dep__incl.dot +++ /dev/null @@ -1,12 +0,0 @@ -digraph "flippy/Triangulation.hpp" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="flippy/Triangulation.hpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="This file contains the fp::Triangulation class and several related helper classes...."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="flippy/MonteCarloUpdater.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_monte_carlo_updater_8hpp.html",tooltip="This file contains the MonteCarloUpdater class template. Together with Triangulation...."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="flippy/flippy.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$flippy_8hpp.html",tooltip="This header file exists for convenience. Including this header will automatically include all parts o..."]; -} diff --git a/docs/_triangulation_8hpp__dep__incl.map b/docs/_triangulation_8hpp__dep__incl.map new file mode 100755 index 0000000..aa511e0 --- /dev/null +++ b/docs/_triangulation_8hpp__dep__incl.map @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/docs/_triangulation_8hpp__dep__incl.md5 b/docs/_triangulation_8hpp__dep__incl.md5 new file mode 100755 index 0000000..3134382 --- /dev/null +++ b/docs/_triangulation_8hpp__dep__incl.md5 @@ -0,0 +1 @@ +ef0db0fe4e126ef47cb5ae498df5fcfc \ No newline at end of file diff --git a/docs/_triangulation_8hpp__dep__incl.png b/docs/_triangulation_8hpp__dep__incl.png new file mode 100755 index 0000000..69dd537 Binary files /dev/null and b/docs/_triangulation_8hpp__dep__incl.png differ diff --git a/docs/_triangulation_8hpp__incl.dot b/docs/_triangulation_8hpp__incl.dot deleted file mode 100644 index 10b7970..0000000 --- a/docs/_triangulation_8hpp__incl.dot +++ /dev/null @@ -1,59 +0,0 @@ -digraph "flippy/Triangulation.hpp" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="flippy/Triangulation.hpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="This file contains the fp::Triangulation class and several related helper classes...."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="optional",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="set",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="Nodes.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_nodes_8hpp.html",tooltip="This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node o..."]; - Node4 -> Node5 [id="edge4_Node000004_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="vector",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node4 -> Node6 [id="edge5_Node000004_Node000006",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="unordered_set",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node4 -> Node7 [id="edge6_Node000004_Node000007",color="steelblue1",style="solid",tooltip=" "]; - Node7 [id="Node000007",label="external/json.hpp",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node4 -> Node8 [id="edge7_Node000004_Node000008",color="steelblue1",style="solid",tooltip=" "]; - Node8 [id="Node000008",label="vec3.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$vec3_8hpp.html",tooltip="Header file containing the definition and implementation a 3 dimensional vector class,..."]; - Node8 -> Node9 [id="edge8_Node000008_Node000009",color="steelblue1",style="solid",tooltip=" "]; - Node9 [id="Node000009",label="ostream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node8 -> Node10 [id="edge9_Node000008_Node000010",color="steelblue1",style="solid",tooltip=" "]; - Node10 [id="Node000010",label="iostream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node8 -> Node11 [id="edge10_Node000008_Node000011",color="steelblue1",style="solid",tooltip=" "]; - Node11 [id="Node000011",label="cmath",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node8 -> Node12 [id="edge11_Node000008_Node000012",color="steelblue1",style="solid",tooltip=" "]; - Node12 [id="Node000012",label="custom_concepts.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$custom__concepts_8hpp.html",tooltip="This file contains the concepts that are costomly defined for the flippy class templates."]; - Node12 -> Node13 [id="edge12_Node000012_Node000013",color="steelblue1",style="solid",tooltip=" "]; - Node13 [id="Node000013",label="concepts",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node8 [id="edge13_Node000001_Node000008",color="steelblue1",style="solid",tooltip=" "]; - Node1 -> Node14 [id="edge14_Node000001_Node000014",color="steelblue1",style="solid",tooltip=" "]; - Node14 [id="Node000014",label="utilities/utils.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$utils_8hpp.html",tooltip="This file contains helper functions that are used throughout flippy, but are not specific to any give..."]; - Node14 -> Node10 [id="edge15_Node000014_Node000010",color="steelblue1",style="solid",tooltip=" "]; - Node14 -> Node15 [id="edge16_Node000014_Node000015",color="steelblue1",style="solid",tooltip=" "]; - Node15 [id="Node000015",label="fstream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node14 -> Node16 [id="edge17_Node000014_Node000016",color="steelblue1",style="solid",tooltip=" "]; - Node16 [id="Node000016",label="utility",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node14 -> Node17 [id="edge18_Node000014_Node000017",color="steelblue1",style="solid",tooltip=" "]; - Node17 [id="Node000017",label="filesystem",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node14 -> Node18 [id="edge19_Node000014_Node000018",color="steelblue1",style="solid",tooltip=" "]; - Node18 [id="Node000018",label="type_traits",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node19 [id="edge20_Node000001_Node000019",color="steelblue1",style="solid",tooltip=" "]; - Node19 [id="Node000019",label="Triangulator.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_triangulator_8hpp.html",tooltip="This file contains internal implementation details and is not part of the stable public api...."]; - Node19 -> Node20 [id="edge21_Node000019_Node000020",color="steelblue1",style="solid",tooltip=" "]; - Node20 [id="Node000020",label="array",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node19 -> Node5 [id="edge22_Node000019_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node19 -> Node6 [id="edge23_Node000019_Node000006",color="steelblue1",style="solid",tooltip=" "]; - Node19 -> Node21 [id="edge24_Node000019_Node000021",color="steelblue1",style="solid",tooltip=" "]; - Node21 [id="Node000021",label="unordered_map",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node19 -> Node12 [id="edge25_Node000019_Node000012",color="steelblue1",style="solid",tooltip=" "]; - Node19 -> Node8 [id="edge26_Node000019_Node000008",color="steelblue1",style="solid",tooltip=" "]; - Node1 -> Node22 [id="edge27_Node000001_Node000022",color="steelblue1",style="solid",tooltip=" "]; - Node22 [id="Node000022",label="stlSerializer.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$stl_serializer_8hpp_source.html",tooltip=" "]; - Node22 -> Node15 [id="edge28_Node000022_Node000015",color="steelblue1",style="solid",tooltip=" "]; - Node22 -> Node5 [id="edge29_Node000022_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node22 -> Node8 [id="edge30_Node000022_Node000008",color="steelblue1",style="solid",tooltip=" "]; -} diff --git a/docs/_triangulation_8hpp__incl.map b/docs/_triangulation_8hpp__incl.map new file mode 100755 index 0000000..33107de --- /dev/null +++ b/docs/_triangulation_8hpp__incl.map @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/_triangulation_8hpp__incl.md5 b/docs/_triangulation_8hpp__incl.md5 new file mode 100755 index 0000000..7ba20d8 --- /dev/null +++ b/docs/_triangulation_8hpp__incl.md5 @@ -0,0 +1 @@ +8e0a25ead5456dd2779333350a4cc4f4 \ No newline at end of file diff --git a/docs/_triangulation_8hpp__incl.png b/docs/_triangulation_8hpp__incl.png new file mode 100755 index 0000000..78c7cfd Binary files /dev/null and b/docs/_triangulation_8hpp__incl.png differ diff --git a/docs/_triangulation_8hpp_source.html b/docs/_triangulation_8hpp_source.html old mode 100644 new mode 100755 index a4283bc..2ea6a72 --- a/docs/_triangulation_8hpp_source.html +++ b/docs/_triangulation_8hpp_source.html @@ -3,16 +3,18 @@ - + flippy: flippy/Triangulation.hpp Source File + - + + @@ -43,28 +45,28 @@
- + + -
@@ -114,1004 +116,751 @@
9#include "Nodes.hpp"
10#include "vec3.hpp"
11#include "utilities/utils.hpp"
-
12#include "Triangulator.hpp"
-
13#include "stlSerializer.hpp"
-
14
-
20#ifndef LONG_LONG_MAX
-
21#define LONG_LONG_MAX 9223372036854775807LL
-
22#endif
-
23
-
36#define VERY_LARGE_NUMBER_ LONG_LONG_MAX
-
42namespace fp {
-
48static constexpr int BOND_DONATION_CUTOFF = 4;
-
52
-
82template<indexing_number Index>
-
- -
84{
-
85 bool flipped = false;
-
86 Index common_nn_0 = static_cast<Index>(VERY_LARGE_NUMBER_);
-
87 Index common_nn_1 = static_cast<Index>(VERY_LARGE_NUMBER_);
-
88};
-
-
89
-
98template<indexing_number Index>
-
- -
100{
- - -
105
-
112 static Index plus_one(Index j, Index ring_size) { return ((j<ring_size - 1) ? j + 1 : (Index) 0); }
-
119 static Index minus_one(Index j, Index ring_size) { return ((j==((Index) 0)) ? ring_size - 1 : j - 1); }
-
120};
-
-
122
-
136template<floating_point_number Real, indexing_number Index>
+
12#include "utilities/sim_utils.hpp"
+
13#include "Triangulator.hpp"
+
14#include "stlSerializer.hpp"
+
15
+
16
+
20namespace fp {
+
21
+
27#ifndef LONG_LONG_MAX
+
28#define LONG_LONG_MAX 9223372036854775807LL
+
29#endif
+
30
+
43static constexpr auto VERY_LARGE_NUMBER_ = static_cast<Index>(LONG_LONG_MAX);
+
51static constexpr int BOND_DONATION_CUTOFF = 4;
+
55
+
+ +
86{
+
87 bool flipped = false;
+ + +
90};
+
+
91
+
+ +
101{
+ + +
106
+
113 static Index plus_one(Index j, Index ring_size) { return ((j<ring_size - 1) ? j + 1 : (Index) 0); }
+
120 static Index minus_one(Index j, Index ring_size) { return ((j==((Index) 0)) ? ring_size - 1 : j - 1); }
+
121};
+
+
123
138{
-
139 Real area;
-
140 Real volume;
- - -
-
145 explicit Geometry(Node<Real, Index> const& node)
- -
150 }
-
-
-
152 Geometry(Real area_inp, Real volume_inp, Real unit_bending_energy_inp)
-
153 :area(area_inp), volume(volume_inp), unit_bending_energy(unit_bending_energy_inp) {
-
160 }
-
-
161
-
163
-
- -
180 {
-
181
- -
183 }
-
-
185
-
- -
202 {
- -
204 }
-
-
205
-
207
-
- -
216 {
-
217 lhs = lhs + rhs;
-
218 }
-
-
219
-
221
-
- -
230 lhs = lhs - rhs;
-
231 }
-
-
232
-
234
-
-
238 void operator+=(Node<Real, Index> const& node){
-
239 area += node.area;
-
240 volume += node.volume;
- -
242 }
+
139 Real area;
+
140 Real volume;
+
142 Geometry() :area(0.), volume(0.) { }
+
+
144 explicit Geometry(Node const& node)
+
145 :area(node.area), volume(node.volume) {
+
149 }
+
+
+
151 Geometry(Real area_inp, Real volume_inp)
+
152 :area(area_inp), volume(volume_inp) {
+
159 }
+
+
160
+
162
+
+
178 friend Geometry operator+(Geometry const& lhs, Geometry const& rhs)
+
179 {
+
180
+
181 return Geometry(lhs.area + rhs.area, lhs.volume + rhs.volume);
+
182 }
+
+
184
+
+
200 friend Geometry operator-(Geometry const& lhs, Geometry const& rhs)
+
201 {
+
202 return Geometry(lhs.area - rhs.area, lhs.volume - rhs.volume);
+
203 }
+
+
204
+
206
+
+
214 friend void operator+=(Geometry& lhs, Geometry const& rhs)
+
215 {
+
216 lhs = lhs + rhs;
+
217 }
+
+
218
+
220
+
+
228 friend void operator-=(Geometry& lhs, Geometry const& rhs){
+
229 lhs = lhs - rhs;
+
230 }
+
+
231
+
233
+
+
237 void operator+=(Node const& node){
+
238 area += node.area;
+
239 volume += node.volume;
+
240 }
+
+
241
+
242};
243
-
244};
-
-
245
-
252
- -
295template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type=SPHERICAL_TRIANGULATION>
-
- -
297{
-
298private:
-
299 explicit Triangulation(Real verlet_radius_inp)
-
300 :global_geometry_(), verlet_radius(verlet_radius_inp){}
-
301public:
-
302 Triangulation() = default;
-
303 //unit tested
-
305
-
310// [[deprecated("This constructor is deprecated and will be removed in the future. Use Triangulation::load_sphere_from_json() instead.")]]
-
-
311 Triangulation(Json const& nodes_input, Real verlet_radius_inp):Triangulation(verlet_radius_inp)
-
312 {
-
313 if constexpr(triangulation_type==SPHERICAL_TRIANGULATION) {
-
314 nodes_ = Nodes<Real, Index>(nodes_input);
-
315 all_nodes_are_bulk();
-
316 initiate_advanced_geometry();
-
317 }
-
318 else{
-
319 static_assert(triangulation_type==SPHERICAL_TRIANGULATION, "currently json initialization is only implemented for spherical triangulations!");
-
320 }
-
321
-
322 }
-
-
323
+
245// * @GlobalsStub
+
246// * @{
+
247// */
+
248//
+
251// * A triangulation type needs to be provided as a template parameter to the Triangulation class during instantiation.
+
252// * This will tell the class to create an appropriate topology of the triangulated Nodes.
+
253// * The named types tell the triangulation class to...
+
254// */
+
255//enum TriangulationType{
+
256//
+
257// //! Create a spherical triangulation which is a sub-triangulation of a regular icosahedron
+
258// SPHERICAL_TRIANGULATION,
+
259// //! Create a triangulation which is a sub-triangulation of a plane square.
+
260// EXPERIMENTAL_PLANAR_TRIANGULATION
+
261//};
+
263
+
264
+
+ +
289{
+
290private:
+
291 explicit Triangulation(Real verlet_radius_inp)
+
292 :global_geometry_(), verlet_radius(verlet_radius_inp){}
+
293public:
+
294 Triangulation() = default;
+
295 //unit tested
+
297
+
302// [[deprecated("This constructor is deprecated and will be removed in the future. Use Triangulation::load_sphere_from_json() instead.")]]
+
+
303 Triangulation(Json const& nodes_input, Real verlet_radius_inp):Triangulation(verlet_radius_inp)
+
304 {
+
305 nodes_ = Nodes(nodes_input);
+
306 initiate_advanced_geometry();
+
307 }
+
+
308
+
310
+
+
316 Triangulation(Index n_nodes_iter, Real R_initial_input, Real verlet_radius_inp):Triangulation(verlet_radius_inp)
+
317 {
+
318 R_initial = R_initial_input;
+
319 nodes_ = triangulate_sphere_nodes(n_nodes_iter);
+
320 scale_all_nodes_to_R_init();
+
321 orient_surface_of_a_sphere();
+
322 initiate_advanced_geometry();
+
323 }
+
+
324
325
-
-
331 Triangulation(Index n_nodes_iter, Real R_initial_input, Real verlet_radius_inp):Triangulation(verlet_radius_inp)
-
332 {
-
333 static_assert(triangulation_type==SPHERICAL_TRIANGULATION, "This initialization is intended for spherical triangulations");
-
334 R_initial = R_initial_input;
-
335 nodes_ = triangulate_sphere_nodes(n_nodes_iter);
-
336 all_nodes_are_bulk();
-
337 scale_all_nodes_to_R_init();
-
338 orient_surface_of_a_sphere();
-
339 initiate_advanced_geometry();
-
340 }
-
-
341
-
343
-
-
353 Triangulation(Index n_length, Index n_width, Real length, Real width, Real verlet_radius_inp):Triangulation(verlet_radius_inp)
-
354 {
-
355 static_assert(triangulation_type == EXPERIMENTAL_PLANAR_TRIANGULATION, "This initialization is intended for planar triangulations");
-
356 triangulate_planar_nodes(n_length, n_width, length, width);
-
357 orient_plane();
-
358 initiate_advanced_geometry();
-
359 }
-
-
360
-
361
+
326
+
327
+
329
+
+
338 static Triangulation experimental_load_sphere_from_stl(std::filesystem::path const& stl_file_path, Real verlet_radius_inp){
+
339 std::vector<implementation::stlTriangle<Real, Index>> triangles = implementation::stlSerializer<Real, Index>::read_STLSolid_into_triangle_vec(stl_file_path);
+
340
+
341 std::vector<Node> nodes;
+
342 std::vector<implementation::stlNode<Real, Index>> unique_nodes;
+
343 Triangulation triangulation;
+
344 nodes.resize(triangles.size()/2 + 2);
+
345 for (Index i=0; implementation::stlTriangle<Real, Index> &triangle : triangles) {
+
346 for (unsigned int tr_idx = 0; tr_idx < 3; ++tr_idx) {
+
347 implementation::stlNode<Real, Index>& node = triangle[tr_idx];
+
348 auto node_pos = std::find(unique_nodes.begin(), unique_nodes.end(), node);
+
349 if (node_pos == unique_nodes.end()) {
+
350 node.id = i;
+
351 triangle[tr_idx].id = i;
+
352 ++i;
+
353 unique_nodes.push_back(node);
+
354 Node n{};
+
355 n.pos = node.pos;
+
356 n.id = node.id;
+
357 nodes[n.id] = n;
+
358 }else{
+
359 triangle[tr_idx].id = node_pos->id;
+
360 }
+
361 }
+
362 }
363
-
-
372 static Triangulation<Real, Index, SPHERICAL_TRIANGULATION> experimental_load_sphere_from_stl(std::filesystem::path const& stl_file_path, Real verlet_radius_inp){
-
373 std::vector<implementation::stlTriangle<Real, Index>> triangles = implementation::stlSerializer<Real, Index>::read_STLSolid_into_triangle_vec(stl_file_path);
-
374
-
375 std::vector<fp::Node<Real, Index>> nodes;
-
376 std::vector<implementation::stlNode<Real, Index>> unique_nodes;
-
377 fp::Triangulation<Real, Index> triangulation;
-
378 nodes.resize(triangles.size()/2 + 2);
-
379 for (Index i=0; implementation::stlTriangle<Real, Index> &triangle : triangles) {
-
380 for (unsigned int tr_idx = 0; tr_idx < 3; ++tr_idx) {
-
381 implementation::stlNode<Real, Index>& node = triangle[tr_idx];
-
382 auto node_pos = std::find(unique_nodes.begin(), unique_nodes.end(), node);
-
383 if (node_pos == unique_nodes.end()) {
-
384 node.id = i;
-
385 triangle[tr_idx].id = i;
-
386 ++i;
-
387 unique_nodes.push_back(node);
- -
389 n.pos = node.pos;
-
390 n.id = node.id;
-
391 nodes[n.id] = n;
-
392 }else{
-
393 triangle[tr_idx].id = node_pos->id;
-
394 }
-
395 }
-
396 }
-
397
-
398 for (auto &triangle : triangles) {
-
399 for (Index tr_idx = 0; tr_idx < 3; ++tr_idx) {
-
400 Index id_0 = triangle[tr_idx].id;
-
401 auto [id_1, id_2] = triangle.other_node_ids(tr_idx);
-
402
-
403 if(!is_member(nodes[id_0].nn_ids, id_1)){nodes[id_0].nn_ids.push_back(id_1);}
-
404 if(!is_member(nodes[id_0].nn_ids, id_2)){nodes[id_0].nn_ids.push_back(id_2);}
-
405
-
406 }
-
407 }
-
408 for(auto &node: nodes){
-
409 std::cout << "node_id: " << node.id << "\n";
-
410 }
-
411
- -
413 tr.verlet_radius = verlet_radius_inp;
-
414 tr.R_initial = 1;
-
415 std::cout << "finished stl parsing\n";
-
416 tr.nodes_ = Nodes<Real, Index>(nodes);
-
417 tr.all_nodes_are_bulk();
-
418 std::cout << "node count: " << tr.nodes_.size() << "\n";
-
419 tr.orient_surface_of_a_sphere();
-
420 std::cout << "surface oriented\n";
-
421 tr.initiate_advanced_geometry();
-
422 std::cout << "advanced geometry initiated\n";
-
423 return tr;
-
424 }
-
-
425
-
426
-
428
-
-
432 void set_verlet_radius(Real R){
-
433 verlet_radius = R;
-
434 verlet_radius_squared = R*R;
-
435 }
-
-
436
-
437 //todo unittest
-
439
-
- -
444 {
-
445 for (auto& node: nodes_) {
-
446 node.verlet_list.clear();
-
447 }
-
448 for (auto node_p = nodes_.begin(); node_p!=nodes_.end(); ++node_p) {
-
449 for (auto other_node_p = nodes_.begin(); other_node_p!=node_p; ++other_node_p) {
-
450 if ((node_p->pos - other_node_p->pos).norm_square()<verlet_radius_squared)
-
451 {
-
452 node_p->verlet_list.push_back(other_node_p->id);
-
453 other_node_p->verlet_list.push_back(node_p->id);
-
454 }
-
455 }
-
456
-
457 }
-
458 }
-
-
459
+
364 for (auto &triangle : triangles) {
+
365 for (Index tr_idx = 0; tr_idx < 3; ++tr_idx) {
+
366 Index id_0 = triangle[tr_idx].id;
+
367 auto [id_1, id_2] = triangle.other_node_ids(tr_idx);
+
368
+
369 if(!is_member(nodes[id_0].nn_ids, id_1)){nodes[id_0].nn_ids.push_back(id_1);}
+
370 if(!is_member(nodes[id_0].nn_ids, id_2)){nodes[id_0].nn_ids.push_back(id_2);}
+
371
+
372 }
+
373 }
+
374 Triangulation tr;
+
375 tr.verlet_radius = verlet_radius_inp;
+
376 tr.R_initial = 1;
+
377 tr.nodes_ = Nodes(nodes);
+
378 tr.orient_surface_of_a_sphere();
+
379 tr.initiate_advanced_geometry();
+
380 return tr;
+
381 }
+
+
382
+
383
+
385
+
+
389 void set_verlet_radius(Real R){
+
390 verlet_radius = R;
+
391 verlet_radius_squared = R*R;
+
392 }
+
+
393
+
394 //todo unittest
+
396
+
+ +
401 {
+
402 for (auto& node: nodes_) {
+
403 node.verlet_list.clear();
+
404 }
+
405 for (auto node_p = nodes_.begin(); node_p!=nodes_.end(); ++node_p) {
+
406 for (auto other_node_p = nodes_.begin(); other_node_p!=node_p; ++other_node_p) {
+
407 if ((node_p->pos - other_node_p->pos).norm_square()<verlet_radius_squared)
+
408 {
+
409 node_p->verlet_list.push_back(other_node_p->id);
+
410 other_node_p->verlet_list.push_back(node_p->id);
+
411 }
+
412 }
+
413
+
414 }
+
415 }
+
+
416
+
418
+
+
423 void translate_all_nodes(vec3<Real> const& translation_vector)
+
424 {
+
425 for (Index i = 0; i<nodes_.size(); ++i) { move_node(i, translation_vector); }
+
426 }
+
+
427
+
428 //unit tested
+
430
+
+ +
437 {
+
438 vec3<Real> mass_center = vec3<Real>{0., 0., 0.};
+
439 for (auto const& node : nodes_) { mass_center += node.pos; }
+
440 mass_center = mass_center/static_cast<Real>(nodes_.size());
+
441 return mass_center;
+
442 }
+
+
443
+
444 //unit tested
+
446
+
+
450 void move_node(Index node_id, vec3<Real> const& displacement_vector)
+
451 {
+
452 Node& node = nodes_[node_id];
+
453 pre_update_geometry = get_two_ring_geometry(node_id);
+
454 pure_node_move(node, displacement_vector);
+
455 post_update_geometry = get_two_ring_geometry(node_id);
+
456 update_global_geometry(pre_update_geometry, post_update_geometry);
+
457 }
+
+
458
+
459 // unit-tested
461
-
-
466 void translate_all_nodes(vec3<Real> const& translation_vector)
-
467 {
-
468 for (Index i = 0; i<nodes_.size(); ++i) { move_node(i, translation_vector); }
-
469 }
-
-
470
-
471 //unit tested
-
473
-
- -
480 {
-
481 vec3<Real> mass_center = vec3<Real>{0., 0., 0.};
-
482 for (auto const& node : nodes_) { mass_center += node.pos; }
-
483 mass_center = mass_center/static_cast<Real>(nodes_.size());
-
484 return mass_center;
-
485 }
-
-
486
-
487 //unit tested
-
489
-
-
493 void move_node(Index node_id, vec3<Real> const& displacement_vector)
-
494 {
-
495 pre_update_geometry = get_two_ring_geometry(node_id);
-
496 nodes_.displace(node_id, displacement_vector);
- -
498 post_update_geometry = get_two_ring_geometry(node_id);
-
499 update_global_geometry(pre_update_geometry, post_update_geometry);
-
500 }
-
-
501
-
502 // unit-tested
-
504
-
-
515 void emplace_before(Index center_node_id, Index anchor_id, Index new_value)
-
516 {
-
517 // The body of this function looks like it does not guard against find returning
-
518 // end() pointer, but this is taken care of in the emplace_nn_id method.
-
519 auto anchor_pos_ptr = std::find(nodes_[center_node_id].nn_ids.begin(),
-
520 nodes_[center_node_id].nn_ids.end(), anchor_id);
-
521 indexing_number auto anchor_pos = (Index) (anchor_pos_ptr - nodes_[center_node_id].nn_ids.begin());
-
522 nodes_[center_node_id].emplace_nn_id(new_value, nodes_[new_value].pos, anchor_pos);
-
523 }
-
-
524
-
-
528 BondFlipData<Index> flip_bond(Index node_id, Index nn_id,
-
529 Real min_bond_length_square,
-
530 Real max_bond_length_square){
-
552 if constexpr (triangulation_type == TriangulationType::SPHERICAL_TRIANGULATION) {
-
553 return flip_bulk_bond(node_id, nn_id, min_bond_length_square, max_bond_length_square);
-
554 } else if constexpr (triangulation_type == TriangulationType::EXPERIMENTAL_PLANAR_TRIANGULATION){
-
555
-
556 if (boundary_nodes_ids_set_.contains(node_id) or boundary_nodes_ids_set_.contains(nn_id)){
-
557 }else{
-
558 Neighbors<Index> common_nns = previous_and_next_neighbour_global_ids(node_id, nn_id);
-
559 if(boundary_nodes_ids_set_.contains(common_nns.j_m_1) or boundary_nodes_ids_set_.contains(common_nns.j_p_1)){
-
560 }else{
-
561 return flip_bond_in_quadrilateral(node_id, nn_id, common_nns, min_bond_length_square, max_bond_length_square);
-
562 }
-
563 }
-
564 return BondFlipData<Index>();
-
565
-
566 }else{
- -
568 "Triangulation type must be either spherical or planar.");
-
569 }
-
570 }
-
-
571
-
572 //unit-tested
-
574
-
-
615 void unflip_bond(Index node_id, Index nn_id, BondFlipData<Index> const& common_nns)
-
616 {
- - -
619 update_global_geometry(post_update_geometry, pre_update_geometry);
-
620 }
-
-
621
-
624
-
- -
643 Index common_nn_j_m_1, Index common_nn_j_p_1)
-
644 {
- - -
647 delete_connection_between_nodes_of_old_edge(node_id, nn_id);
-
648 return {.flipped=true, .common_nn_0=common_nn_j_m_1, .common_nn_1=common_nn_j_p_1};
-
649 }
-
-
650
-
651 // unit-tested
-
653
-
- -
663 {
-
664 update_nn_distance_vectors(node_id);
-
665
-
666 Real area_sum = 0.;
-
667 vec3<Real> face_normal_sum{0., 0., 0.}, local_curvature_vec{0., 0., 0.};
- -
669 indexing_number auto nn_number = (Index) nodes_.nn_ids(node_id).size();
-
670 Index j_p_1;
-
671
- - - -
675
-
676 for (Index j = 0; j<nn_number; ++j) {
-
677 //return j+1 element of ordered_nn_ids unless j has the last value then wrap around and return 0th element
- -
679
-
680 lij = nodes_.nn_distances(node_id)[j];
-
681 lij_p_1 = nodes_.nn_distances(node_id)[j_p_1];
-
682 ljj_p_1 = lij_p_1 - lij;
-
683
-
684 cot_at_j = cot_between_vectors(lij, (-1)*ljj_p_1);
-
685 cot_at_j_p_1 = cot_between_vectors(lij_p_1, ljj_p_1);
-
686
-
687
-
688 face_normal = lij.cross(lij_p_1); //nodes_.nn_distances(node_id)[j].cross(nodes_.nn_distances(node_id)[j_p_1]);
- -
690#ifdef DEBUG
-
691 if(face_normal_norm < 1e-10) {
-
692 throw std::runtime_error("A triangle face is degenerate and Area sum is evaluating to "+std::to_string(face_normal_norm)+". This should not happen.");
+
+
472 void emplace_before(Index center_node_id, Index anchor_id, Index new_value)
+
473 {
+
474 // The body of this function looks like it does not guard against find returning
+
475 // end() pointer, but this is taken care of in the emplace_nn_id method.
+
476 auto anchor_pos_ptr = std::find(nodes_[center_node_id].nn_ids.begin(),
+
477 nodes_[center_node_id].nn_ids.end(), anchor_id);
+
478 indexing_number auto anchor_pos = (Index) (anchor_pos_ptr - nodes_[center_node_id].nn_ids.begin());
+
479 nodes_[center_node_id].emplace_nn_id(new_value, nodes_[new_value].pos, anchor_pos);
+
480 }
+
+
481
+
+
485 BondFlipData flip_bond(Index node_id, Index nn_id,
+
486 Real min_bond_length_square,
+
487 Real max_bond_length_square){
+
509 BondFlipData bfd{};
+
510
+
511 if(nodes_have_too_few_bonds_for_donation(node_id, nn_id)){return bfd;}
+
512
+
513 Neighbors common_nns = previous_and_next_neighbour_global_ids(node_id, nn_id);
+
514
+
515 Real bond_length_square = (nodes_[common_nns.j_m_1].pos - nodes_[common_nns.j_p_1].pos).norm_square();
+
516 if ((bond_length_square > max_bond_length_square) || (bond_length_square < min_bond_length_square)) { return bfd;}
+
517
+
518 pre_update_geometry = calculate_diamond_geometry(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1);
+
519
+
520 bfd = flip_bond_unchecked(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1);
+
521
+
522 if (has_two_common_neighbours(bfd.common_nn_0, bfd.common_nn_1)) {
+
523 update_diamond_geometry(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1);
+
524 post_update_geometry = calculate_diamond_geometry(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1);
+
525 update_global_geometry(pre_update_geometry, post_update_geometry);
+
526 } else {
+
527 flip_bond_unchecked(bfd.common_nn_0, bfd.common_nn_1, nn_id, node_id);
+
528 bfd.flipped = false;
+
529 }
+
530 return bfd;
+
531 }
+
+
532
+
533 //unit-tested
+
535
+
+
576 void unflip_bond(Index node_id, Index nn_id, BondFlipData const& common_nns)
+
577 {
+
578 flip_bond_unchecked(common_nns.common_nn_0, common_nns.common_nn_1, nn_id, node_id);
+
579 update_diamond_geometry(node_id, nn_id, common_nns.common_nn_0, common_nns.common_nn_1);
+
580 update_global_geometry(post_update_geometry, pre_update_geometry);
+
581 }
+
+
582
+
585
+
+
603 BondFlipData flip_bond_unchecked(Index node_id, Index nn_id, Index common_nn_j_m_1, Index common_nn_j_p_1)
+
604 {
+
605 emplace_before(common_nn_j_m_1, node_id, common_nn_j_p_1);
+
606 emplace_before(common_nn_j_p_1, nn_id, common_nn_j_m_1);
+
607 delete_connection_between_nodes_of_old_edge(node_id, nn_id);
+
608 return {.flipped=true, .common_nn_0=common_nn_j_m_1, .common_nn_1=common_nn_j_p_1};
+
609 }
+
+
610
+
611 // unit-tested
+
613
+
+
622 void update_bulk_node_geometry(Index node_id)
+
623 {
+
624 update_nn_distance_vectors(node_id);
+
625
+
626 Real area_sum = 0.;
+
627 vec3<Real> face_normal_sum{0., 0., 0.}, local_curvature_vec{0., 0., 0.};
+
628 vec3<Real> face_normal;
+
629 indexing_number auto nn_number = (Index) nodes_[node_id].nn_ids.size();
+
630 Index j_p_1;
+
631
+
632 Real face_area, face_normal_norm;
+
633 vec3<Real> ljj_p_1, lij_p_1, lij;
+
634 Real cot_at_j, cot_at_j_p_1;
+
635
+
636 for (Index j = 0; j<nn_number; ++j) {
+
637 //return j+1 element of ordered_nn_ids unless j has the last value then wrap around and return 0th element
+
638 j_p_1 = Neighbors::plus_one(j,nn_number);
+
639
+
640 lij = nodes_[node_id].nn_distances[j];
+
641 lij_p_1 = nodes_[node_id].nn_distances[j_p_1];
+
642 ljj_p_1 = lij_p_1 - lij;
+
643
+
644 cot_at_j = -TrgMath::cot_between_vectors(lij, ljj_p_1);
+
645 cot_at_j_p_1 = TrgMath::cot_between_vectors(lij_p_1, ljj_p_1);
+
646
+
647
+
648 face_normal = lij.cross(lij_p_1); //nodes_.nn_distances(node_id)[j].cross(nodes_.nn_distances(node_id)[j_p_1]);
+
649 face_normal_norm = face_normal.norm();
+
650#ifdef DEBUG
+
651 if(face_normal_norm < 1e-10) {
+
652 throw std::runtime_error("A triangle face is degenerate and Area sum is evaluating to "+std::to_string(face_normal_norm)+". This should not happen.");
+
653 }
+
654#endif
+
655 face_area = mixed_area(lij, lij_p_1, Real(0.5)*face_normal_norm, cot_at_j, cot_at_j_p_1);
+
656 area_sum += face_area;
+
657 face_normal_sum += face_area*face_normal/face_normal_norm;
+
658
+
659 local_curvature_vec -= (cot_at_j_p_1*lij + cot_at_j*lij_p_1);
+
660 }
+
661 nodes_[node_id].area = area_sum;
+
662 nodes_[node_id].volume = nodes_[node_id].pos.dot(face_normal_sum)/(static_cast<Real>(3.)); // 18=3*6: 6 has the aforementioned justification. 3 is part of the formula for the tetrahedron volume
+
663 nodes_[node_id].curvature_vec = -local_curvature_vec/(static_cast<Real>(2.)*area_sum); // 2 is part of the formula to calculate the local curvature I just did not divide the vector inside the loop
+
664
+
665 };
+
+
666
+
668
+
+
686 static Real mixed_area(vec3<Real> const& lij, vec3<Real> const& lij_p_1, Real triangle_area, Real cot_at_j, Real cot_at_j_p_1){
+
687 if ((cot_at_j>0.) && (cot_at_j_p_1>0.)) { // both angles at j and j+1 are smaller than 90 deg so the triangle can only be obtuse at the node
+
688 if (lij.dot(lij_p_1)>0) { // cos at i is positive i.e. angle at i is not obtuse
+
689 return (cot_at_j_p_1*lij.dot(lij) + cot_at_j*lij_p_1.dot(lij_p_1))/Real(8.);
+
690 }
+
691 else {//obtuse at node i.
+
692 return triangle_area/Real(2.);
693 }
-
694#endif
- - - +
694 }
+
695 else {//obtuse at node j or j+1.
+
696 return triangle_area/Real(4.);
+
697 }
698
- -
700 }
-
701 nodes_.set_area(node_id, area_sum);
-
702 nodes_.set_volume(node_id, nodes_[node_id].pos.dot(face_normal_sum)/((Real) 3.)); // 18=3*6: 6 has the aforementioned justification. 3 is part of the formula for the tetrahedron volume
-
703 nodes_.set_curvature_vec(node_id, -local_curvature_vec/((Real) 2.*area_sum)); // 2 is part of the formula to calculate the local curvature I just did not divide the vector inside the loop
-
704 nodes_.set_unit_bending_energy(node_id, local_curvature_vec.dot(local_curvature_vec)/((Real) 8.*area_sum)); // 8 is 2*4, where 4 is the square of the above two and the area in the denominator is what remains after canceling. 1/ comes from the pre-factor to bending energy
-
705
-
706 };
-
-
707
-
708
-
710
-
720 [[deprecated("This function is deprecated and will be removed in a future release. It uses expensive function calls and is not recommended for use.")]]
-
- -
722 vec3<Real> const& lij_p_1)
-
723 {
-
724 Real area, face_normal_norm;
- -
726 //precalculating this normal and its norm will be needed in area calc. If all triangles are oriented as
-
727 // right-handed, then this normal will point outwards
- - - -
731 return std::make_tuple(area, un_noremd_face_normal);
-
732 }
+
699 }
+
+
700
+
702
+
+
710 [[nodiscard]] Geometry get_two_ring_geometry(Index node_id) const
+
711 {
+
712 Geometry trg(nodes_[node_id]);
+
713 for (auto const& nn_id: nodes_[node_id].nn_ids) {
+
714 trg += nodes_[nn_id];
+
715 }
+
716 return trg;
+
717 }
+
+
718
+
720
+
+
726 void update_two_ring_geometry(Index node_id)
+
727 {
+ +
729 for (auto nn_id: nodes_[node_id].nn_ids) {
+ +
731 }
+
732 };
733
-
735
-
-
753 static Real mixed_area(vec3<Real> const& lij, vec3<Real> const& lij_p_1, Real triangle_area, Real cot_at_j, Real cot_at_j_p_1){
-
754 if ((cot_at_j>0.) && (cot_at_j_p_1>0.)) { // both angles at j and j+1 are smaller than 90 deg so the triangle can only be obtuse at the node
-
755 if (lij.dot(lij_p_1)>0) { // cos at i is positive i.e. angle at i is not obtuse
-
756 return (cot_at_j_p_1*lij.dot(lij) + cot_at_j*lij_p_1.dot(lij_p_1))/Real(8.);
-
757 }
-
758 else {//obtuse at node i.
-
759 return triangle_area/Real(2.);
-
760 }
-
761 }
-
762 else {//obtuse at node j or j+1.
-
763 return triangle_area/Real(4.);
-
764 }
-
765
-
766 }
-
-
767
-
768 //unit tested
-
770
-
779 [[deprecated("This function is deprecated and will be removed in a future release. mixed_area, which does not take precalculated cotangents, performs expensive calculations! Use the alternative mixed_area function!")]]
-
-
780 static Real mixed_area(vec3<Real> const& lij, vec3<Real> const& lij_p_1, Real const& triangle_area)
-
781 {
- -
783
-
784 Real cot_at_j = cot_between_vectors(lij, (-1)*ljj_p_1);
-
785 Real cot_at_j_p_1 = cot_between_vectors(lij_p_1, ljj_p_1);
-
786 if ((cot_at_j>Real(0.)) && (cot_at_j_p_1>Real(0.))) { // both angles at j and j+1 are smaller than 90 deg so the triangle can only be obtuse at the node
-
787 if (lij.dot(lij_p_1)>Real(0.)) { // cos at i is positive i.e. angle at i is not obtuse
-
788 return (cot_at_j_p_1*lij.dot(lij) + cot_at_j*lij_p_1.dot(lij_p_1))/8.;
-
789 }
-
790 else {//obtuse at node i.
-
791 return triangle_area/Real(2.);
-
792 }
-
793 }
-
794 else {//obtuse at node j or j+1.
-
795 return triangle_area/Real(4.);
-
796 }
-
797
-
798 }
-
-
799
-
801
-
- -
810 {
- -
812 for (auto const& nn_id: nodes_[node_id].nn_ids) {
-
813 trg += nodes_[nn_id];
-
814 }
-
815 return trg;
-
816 }
-
-
817
-
819
-
- -
826 {
- -
828 update_two_ring_geometry_on_a_boundary_free_triangulation(node_id);
-
829 }
- -
831 update_two_ring_geometry_on_a_boundary_triangulation(node_id);
-
832 }
-
833 else {
- -
835 "Triangulation type is not supported!");
-
836 }
-
837 };
-
+
734 // unit-tested
+
736
+
+
750 void scale_node_coordinates(Real x_stretch, Real y_stretch = 1, Real z_stretch = 1)
+
751 {
+
752 vec3<Real> displ = {0, 0, 0};
+
753 for (auto& node: nodes_.data) {
+
754 displ[0] = node.pos[0]*(x_stretch - 1);
+
755 displ[1] = node.pos[1]*(y_stretch - 1);
+
756 displ[2] = node.pos[2]*(z_stretch - 1);
+
757 move_node(node.id, displ);
+
758 }
+
759 }
+
+
760
+
761 //Todo unittest
+
763
+
+
783 [[nodiscard]] Geometry calculate_diamond_geometry(Index node_id, Index nn_id,
+
784 Index cnn_0, Index cnn_1) const
+
785 {
+
786 Geometry diamond_geometry(nodes_[node_id]);
+
787 diamond_geometry += nodes_[nn_id];
+
788 diamond_geometry += nodes_[cnn_0];
+
789 diamond_geometry += nodes_[cnn_1];
+
790 return diamond_geometry;
+
791 };
+
+
792
+
793 //Todo unittest
+
795
+
+
814 void update_diamond_geometry(Index node_id, Index nn_id, Index cnn_0, Index cnn_1)
+
815 {
+ + + + +
820 };
+
+
821
+
822 // Const Viewer Functions
+
824
+
827 [[nodiscard]] Index size() const { return nodes_.size(); }
+
829
+
836 const Node& operator[](Index idx) const { return nodes_.data.at(idx); }
838
-
839 // unit-tested
-
841
-
- -
856 {
-
857 vec3<Real> displ = {0, 0, 0};
-
858 for (auto& node: nodes_.data) {
-
859 displ[0] = node.pos[0]*(x_stretch - 1);
-
860 displ[1] = node.pos[1]*(y_stretch - 1);
-
861 displ[2] = node.pos[2]*(z_stretch - 1);
-
862 move_node(node.id, displ);
-
863 }
-
864 }
-
-
865
-
866 //Todo unittest
-
868
-
- -
889 Index cnn_0, Index cnn_1) const
-
890 {
- -
892 diamond_geometry += nodes_[nn_id];
-
893 diamond_geometry += nodes_[cnn_0];
-
894 diamond_geometry += nodes_[cnn_1];
-
895 return diamond_geometry;
-
896 };
-
-
897
-
898 //Todo unittest
-
900
-
-
919 void update_diamond_geometry(Index node_id, Index nn_id, Index cnn_0, Index cnn_1)
-
920 {
- - - - -
925 };
-
-
926
-
927 // Const Viewer Functions
-
929
-
932 [[nodiscard]] Index size() const { return nodes_.size(); }
-
934
-
941 const Node<Real, Index>& operator[](Index idx) const { return nodes_.data.at(idx); }
-
943
-
946 const Nodes<Real, Index>& nodes() const { return nodes_; }
-
948
-
954 [[nodiscard]] Json make_egg_data() const { return nodes_.make_data(); }
-
956
-
959 [[nodiscard]] const Geometry<Real, Index>& global_geometry() const { return global_geometry_; }
-
960
-
961 //Todo unittest
-
963
-
- -
968 {
- -
970 global_geometry_ = empty;
-
971 for (auto node_id: bulk_nodes_ids) {
- -
973 update_global_geometry(empty, Geometry<Real, Index>(nodes_[node_id]));
-
974 }
-
975 for (auto node_id: boundary_nodes_ids_set_) {
- -
977 update_global_geometry(empty, Geometry<Real, Index>(nodes_[node_id]));
-
978 }
-
979 }
-
-
980
-
982
-
-
986 std::set<Index> boundary_nodes_ids_set() const {
-
987 static_assert(triangulation_type == TriangulationType::EXPERIMENTAL_PLANAR_TRIANGULATION, "This function is only implemented for PLANAR_TRIANGULATION.");
-
988 return boundary_nodes_ids_set_;
-
989 }
-
-
990
-
991 //Todo unittest
-
993
-
- -
1000 update_nn_distance_vectors(node_id);
-
1001 }
-
-
1002
-
1003#ifdef TESTING_FLIPPY_TRIANGULATION_ndh6jclc0qnp274b
-
1004public:
-
1005#else
-
1006private:
-
1007#endif
-
1008 Real R_initial;
-
1009 Nodes<Real, Index> nodes_;
-
1010 std::vector<Index> bulk_nodes_ids;
-
1011 Geometry<Real, Index> global_geometry_;
-
1012 Geometry<Real, Index> pre_update_geometry, post_update_geometry;
-
1013 mutable vec3<Real> l0_, l1_;
-
1014 Real verlet_radius{};
-
1015 Real verlet_radius_squared{};
-
1016 std::set<Index> boundary_nodes_ids_set_;
-
1017
+
841 const Nodes& nodes() const { return nodes_; }
+
843
+
849 [[nodiscard]] Json make_egg_data() const { return nodes_.make_data(); }
+
851
+
854 [[nodiscard]] const Geometry& global_geometry() const { return global_geometry_; }
+
855
+
856 //Todo unittest
+
858
+
+ +
863 {
+
864 const Geometry empty{};
+
865 global_geometry_ = empty;
+
866 for (auto const& node: nodes_) {
+ +
868 update_global_geometry(empty, Geometry(nodes_[node.id]));
+
869 }
+
870 }
+
+
871
+
872#ifdef TESTING_FLIPPY_TRIANGULATION_ndh6jclc0qnp274b
+
873public:
+
874#else
+
875private:
+
876#endif
+
877 Real R_initial;
+
878 Nodes nodes_;
+
879 Geometry global_geometry_;
+
880 Geometry pre_update_geometry, post_update_geometry;
+
881 Real verlet_radius{};
+
882 Real verlet_radius_squared{};
+
883
+
884 //unit tested
+
885 void initiate_advanced_geometry(){
+
886 initiate_distance_vectors();
+ +
888 set_verlet_radius(verlet_radius);
+ +
890 }
+
891
+
892 //unit tested
+
893 void scale_all_nodes_to_R_init()
+
894 {
+
895 vec3<Real> diff;
+
896 vec3<Real> mass_center = calculate_mass_center();
+
897 for (Node & node : nodes_) {
+
898 diff = node.pos - mass_center;
+
899 diff.scale(R_initial/diff.norm());
+
900 diff += mass_center;
+
901 node.pos = diff;
+
902 }
+
903
+
904 }
+
905
+
907 void pure_node_move(Node& node, vec3<Real> const& displacement_vector)
+
908 {
+
909 node.pos += displacement_vector;
+ +
911 }
+
912
+
914 void update_nn_distance_vectors(Index node_id)
+
915 {
+
923 for (Index i = 0; auto nn_id: nodes_[node_id].nn_ids) {
+
924 nodes_.set_nn_distance(node_id, i, nodes_[nn_id].pos - nodes_[node_id].pos);
+
925 ++i;
+
926 }
+
927 }
+
928
+
929 //unit tested
+
930 [[nodiscard]] std::vector<Index> order_nn_ids(Index node_id) const
+
931 {
+
932 std::vector<Index> const& nn_ids = nodes_[node_id].nn_ids;
+
933 auto common_nn_ids = two_common_neighbours(node_id, nn_ids[0]);
+
934 std::vector<Index> ordered_nn_ids{common_nn_ids[0], nn_ids[0], common_nn_ids[1]};
+
935
+
936 Index nn_id;
+
937 for (Index i = 0; i<(Index) nodes_[node_id].nn_ids.size() - 3; ++i) {
+
938 nn_id = ordered_nn_ids[ordered_nn_ids.size() - 1];
+
939 common_nn_ids = two_common_neighbours(node_id, nn_id);
+
940 if (is_member(ordered_nn_ids, common_nn_ids[0])) {
+
941 ordered_nn_ids.push_back(common_nn_ids[1]);
+
942 }
+
943 else {
+
944 ordered_nn_ids.push_back(common_nn_ids[0]);
+
945 }
+
946 }
+
947
+
948 return ordered_nn_ids;
+
949 }
+
950
+
951 //unit tested
+
952 void orient_surface_of_a_sphere()
+
953 {
+
964 std::vector<Index> nn_ids_temp;
+
965 vec3<Real> li0, li1;
+
966 vec3<Real> mass_center = calculate_mass_center();
+
967 for (Index i = 0; i<nodes_.size(); ++i) { //ToDo modernize this loop
+
968 nn_ids_temp = order_nn_ids(i);
+
969 li0 = nodes_[nn_ids_temp[0]].pos - nodes_[i].pos;
+
970 li1 = nodes_[nn_ids_temp[1]].pos - nodes_[i].pos;
+
971 if ((li0.cross(li1)).dot(nodes_[i].pos - mass_center)<0) {
+
972 std::reverse(nn_ids_temp.begin(), nn_ids_temp.end());
+
973 }
+
974 nodes_[i].nn_ids = nn_ids_temp;
+
975 }
+
976 }
+
977
+
978 // Todo unittest
+
979 void initiate_distance_vectors()
+
980 {
+
981 for (Node& node: nodes_) {
+
982 node.nn_distances.resize(node.nn_ids.size());
+
983 update_nn_distance_vectors(node.id);
+
984 }
+
985 }
+
986
+
987 bool has_two_common_neighbours(Index node_id_0, Index node_id_1) const
+
988 {
+
989 int nn_count = 0;
+
990 for (Index nn_of_n0: nodes_[node_id_0].nn_ids){
+
991 for (Index nn_of_n1: nodes_[node_id_1].nn_ids) {
+
992 if(nn_of_n0 == nn_of_n1){ ++nn_count; }
+
993 }
+
994 if(nn_count>2){return false;}
+
995 }
+
996 return nn_count==2;
+
997 }
+
998
+
999 //unit tested
+
1000 std::array<Index, 2> two_common_neighbours(Index node_id_0, Index node_id_1) const
+
1001 {
+
1002 static const Index vln = static_cast<const Index>(VERY_LARGE_NUMBER_);
+
1003 std::array<Index, 2> res{vln, vln};
+
1004 //todo safe remove const& in the loop
+
1005 for (auto res_p = res.begin(); auto const& n0_nn_id: nodes_[node_id_0].nn_ids) {
+
1006 if (res_p==res.end()) { break; }
+
1007 else {
+
1008 if (is_member(nodes_[node_id_1].nn_ids, n0_nn_id)) {
+
1009 *res_p = n0_nn_id;
+
1010 ++res_p;
+
1011 }
+
1012 }
+
1013 }
+
1014 return res;
+
1015 }
+
1016
+
1017 //Todo unittest
1018 //unit tested
-
1019 void initiate_advanced_geometry(){
-
1020 initiate_distance_vectors();
- -
1022 set_verlet_radius(verlet_radius);
- -
1024 }
-
1025
-
1026 void update_two_ring_geometry_on_a_boundary_free_triangulation(Index node_id){
- -
1028 for (auto nn_id: nodes_.nn_ids(node_id)) {
- -
1030 }
-
1031 }
-
1032 void update_two_ring_geometry_on_a_boundary_triangulation(Index node_id){
-
1033 if(boundary_nodes_ids_set_.contains(node_id)){
- -
1035 }else{
- -
1037 }
+
1019 Neighbors previous_and_next_neighbour_local_ids(Index node_id, Index nn_id) const
+
1020 {
+
1031 auto const& nn_ids_view = nodes_[node_id].nn_ids;
+
1032 auto const local_nn_id = (Index) (std::find(nn_ids_view.begin(), nn_ids_view.end(), nn_id)
+
1033 - nn_ids_view.begin());
+
1034 auto const nn_number = (Index) nn_ids_view.size();
+
1035 return {.j_m_1= Neighbors::minus_one(local_nn_id, nn_number),
+
1036 .j_p_1 = Neighbors::plus_one(local_nn_id, nn_number)};
+
1037 }
1038
-
1039 for (auto nn_id: nodes_.nn_ids(node_id)) {
-
1040 if(boundary_nodes_ids_set_.contains(nn_id)){
- -
1042 }else{
- -
1044 }
-
1045 }
-
1046 }
-
1047
-
1048 //unit tested
-
1049 void scale_all_nodes_to_R_init()
-
1050 {
-
1051 static_assert(triangulation_type==SPHERICAL_TRIANGULATION, "This function is only well defined for a spherical triangulation");
-
1052 vec3<Real> diff;
-
1053 vec3<Real> mass_center = calculate_mass_center();
-
1054 for (Index i = 0; i<nodes_.size(); ++i) {
-
1055 diff = nodes_[i].pos - mass_center;
-
1056 diff.scale(R_initial/diff.norm());
-
1057 diff += mass_center;
-
1058 nodes_.set_pos(i, diff);
-
1059 }
-
1060
-
1061 }
-
1062
-
1064 void update_nn_distance_vectors(Index node_id)
-
1065 {
-
1073 for (Index i = 0; auto nn_id: nodes_.nn_ids(node_id)) {
-
1074 nodes_.set_nn_distance(node_id, i, nodes_.pos(nn_id) - nodes_.pos(node_id));
-
1075 ++i;
-
1076 }
-
1077 }
-
1078
-
1090 Real cot_alphas_sum(Index node_id, Index nn_id, Index cnn_0, Index cnn_1) const
-
1091 {
-
1096 l0_ = nodes_[node_id].pos - nodes_[cnn_0].pos;
-
1097 l1_ = nodes_[nn_id].pos - nodes_[cnn_0].pos;
-
1098
-
1099 Real cot_sum = cot_between_vectors(l0_, l1_);
-
1100 l0_ = nodes_[node_id].pos - nodes_[cnn_1].pos;
-
1101 l1_ = nodes_[nn_id].pos - nodes_[cnn_1].pos;
-
1102
-
1103 cot_sum += cot_between_vectors(l0_, l1_);
-
1104 return cot_sum;
-
1105 }
-
1106
-
1107 static Real cot_between_vectors(vec3<Real> const& v1, vec3<Real> const& v2)
-
1108 {
-
1109 return v1.dot(v2)/(v1.cross(v2).norm());
-
1110 };
-
1111
-
1112 //unit tested
-
1113 [[nodiscard]] std::vector<Index> order_nn_ids(Index node_id) const
-
1114 {
-
1115 std::vector<Index> const& nn_ids = nodes_[node_id].nn_ids;
-
1116 auto common_nn_ids = two_common_neighbours(node_id, nn_ids[0]);
-
1117 std::vector<Index> ordered_nn_ids{common_nn_ids[0], nn_ids[0], common_nn_ids[1]};
-
1118
-
1119 Index nn_id;
-
1120 for (Index i = 0; i<(Index) nodes_[node_id].nn_ids.size() - 3; ++i) {
-
1121 nn_id = ordered_nn_ids[ordered_nn_ids.size() - 1];
-
1122 common_nn_ids = two_common_neighbours(node_id, nn_id);
-
1123 if (is_member(ordered_nn_ids, common_nn_ids[0])) {
-
1124 ordered_nn_ids.push_back(common_nn_ids[1]);
-
1125 }
-
1126 else {
-
1127 ordered_nn_ids.push_back(common_nn_ids[0]);
-
1128 }
-
1129 }
-
1130
-
1131 return ordered_nn_ids;
-
1132 }
-
1133
-
1134 //unit tested
-
1135 void orient_surface_of_a_sphere()
-
1136 {
-
1147 static_assert(triangulation_type==SPHERICAL_TRIANGULATION, "This function is only well defined for a spherical triangulation");
-
1148 std::vector<Index> nn_ids_temp;
-
1149 vec3<Real> li0, li1;
-
1150 vec3<Real> mass_center = calculate_mass_center();
-
1151 for (Index i = 0; i<nodes_.size(); ++i) { //ToDo modernize this loop
-
1152 nn_ids_temp = order_nn_ids(i);
-
1153 li0 = nodes_[nn_ids_temp[0]].pos - nodes_[i].pos;
-
1154 li1 = nodes_[nn_ids_temp[1]].pos - nodes_[i].pos;
-
1155 if ((li0.cross(li1)).dot(nodes_[i].pos - mass_center)<0) {
-
1156 std::reverse(nn_ids_temp.begin(), nn_ids_temp.end());
-
1157 }
-
1158 nodes_.set_nn_ids(i, nn_ids_temp);
-
1159 }
-
1160 }
-
1161
-
1162 void orient_plane()
-
1163 {
-
1174 static_assert(triangulation_type == EXPERIMENTAL_PLANAR_TRIANGULATION, "This function is only well defined for a planar triangulation");
-
1175 std::vector<Index> nn_ids_temp;
-
1176 vec3<Real> li0, li1;
-
1177 vec3<Real> mass_center = calculate_mass_center();
-
1178 mass_center.z+=10;
-
1179 for (Index node_id = 0; node_id < nodes_.size(); ++node_id) { //ToDo modernize this loop
-
1180 if(boundary_nodes_ids_set_.contains(node_id)){
-
1181 continue;
-
1182 }
-
1183 nn_ids_temp = order_nn_ids(node_id);
-
1184 li0 = nodes_[nn_ids_temp[0]].pos - nodes_[node_id].pos;
-
1185 li1 = nodes_[nn_ids_temp[1]].pos - nodes_[node_id].pos;
-
1186 if ((li0.cross(li1)).dot(nodes_[node_id].pos - mass_center) < 0) {
-
1187 std::reverse(nn_ids_temp.begin(), nn_ids_temp.end());
-
1188 }
-
1189 nodes_.set_nn_ids(node_id, nn_ids_temp);
-
1190 }
-
1191
-
1192 }
-
1193
-
1194 // Todo unittest
-
1195 void initiate_distance_vectors()
-
1196 {
-
1197 for (Node<Real, Index>& node: nodes_.data) {
-
1198 node.nn_distances.resize(node.nn_ids.size());
-
1199 update_nn_distance_vectors(node.id);
-
1200 }
-
1201 }
-
1202
-
1203 //unit tested
-
1204 std::vector<Index> common_neighbours(Index node_id_0, Index node_id_1) const
-
1205 {
-
1206 std::vector<Index> res;
-
1207 res.reserve(2);
-
1208 std::vector<Index> nn_ids0 = nodes_[node_id_0].nn_ids;
-
1209 std::vector<Index> nn_ids1 = nodes_[node_id_1].nn_ids;
-
1210 std::sort(nn_ids0.begin(), nn_ids0.end());
-
1211 std::sort(nn_ids1.begin(), nn_ids1.end());
-
1212 std::set_intersection(nn_ids0.begin(), nn_ids0.end(),
-
1213 nn_ids1.begin(), nn_ids1.end(),
-
1214 std::back_inserter(res));
-
1215 return res;
-
1216 }
-
1217
-
1218 //unit tested
-
1219 std::array<Index, 2> two_common_neighbours(Index node_id_0, Index node_id_1) const
-
1220 {
-
1221 static const Index vln = static_cast<const Index>(VERY_LARGE_NUMBER_);
-
1222 std::array<Index, 2> res{vln, vln};
-
1223 //todo safe remove const& in the loop
-
1224 for (auto res_p = res.begin(); auto const& n0_nn_id: nodes_[node_id_0].nn_ids) {
-
1225 if (res_p==res.end()) { break; }
-
1226 else {
-
1227 if (is_member(nodes_[node_id_1].nn_ids, n0_nn_id)) {
-
1228 *res_p = n0_nn_id;
-
1229 ++res_p;
-
1230 }
-
1231 }
-
1232 }
-
1233 return res;
-
1234 }
-
1235
-
1236 std::array<Index, 2> fast_two_common_neighbours(Index node_id_0, Index node_id_1) const
-
1237 {
-
1238
-
1239 Index j = nodes_.find_nns_loc_idx(node_id_0, node_id_1);
-
1240 indexing_number auto nn_number = (Index)nodes_.nn_ids(node_id_0).size();
-
1241 Index j_p_1 = Neighbors<Index>::plus_one(j, nn_number);
-
1242 Index j_m_1 = Neighbors<Index>::plus_one(j, nn_number);
-
1243 std::array<Index, 2> res{nodes_.nn_id(node_id_0,j_m_1),
-
1244 nodes_.nn_id(node_id_0,j_p_1)};
-
1245 return res;
-
1246 }
-
1247
-
1248 std::array<Index, 2> two_common_neighbour_positions(Index node_id_0, Index node_id_1) const
-
1249 {
-
1250 static const Index vln = static_cast<const Index>(VERY_LARGE_NUMBER_);
-
1251 std::array<Index, 2> res{vln, vln};
-
1252 short counter = 0;
-
1253 for (auto const& n0_nn_id: nodes_[node_id_0].nn_ids) {
-
1254 if (counter==2) { break; }
-
1255 else {
-
1256 auto pos = std::find(nodes_[node_id_1].nn_ids.begin(), nodes_[node_id_1].nn_ids.end(), n0_nn_id);
-
1257 if (pos!=nodes_[node_id_1].nn_ids.end()) {
-
1258 res[counter] = (Index) (pos - nodes_[node_id_1].nn_ids.begin());
-
1259 ++counter;
-
1260 }
-
1261 }
-
1262 }
-
1263 return res;
-
1264 }
-
1265
-
1266 //Todo unittest
-
1267 //unit tested
-
1268 Neighbors<Index> previous_and_next_neighbour_local_ids(Index node_id, Index nn_id) const
-
1269 {
-
1280 auto const& nn_ids_view = nodes_[node_id].nn_ids;
-
1281 auto const local_nn_id = (Index) (std::find(nn_ids_view.begin(), nn_ids_view.end(), nn_id)
-
1282 - nn_ids_view.begin());
-
1283 auto const nn_number = (Index) nn_ids_view.size();
-
1284 return {.j_m_1= Neighbors<Index>::minus_one(local_nn_id, nn_number),
-
1285 .j_p_1 = Neighbors<Index>::plus_one(local_nn_id, nn_number)};
-
1286 }
-
1287
-
1288 //unit tested
-
1289 Neighbors<Index> previous_and_next_neighbour_global_ids(Index node_id, Index nn_id) const
-
1290 {
-
1301 auto const& nn_ids_view = nodes_[node_id].nn_ids;
-
1302 Neighbors<Index> neighbors = previous_and_next_neighbour_local_ids(node_id, nn_id);
-
1303 return {.j_m_1=nn_ids_view[neighbors.j_m_1], .j_p_1=nn_ids_view[neighbors.j_p_1]};
-
1304 }
-
1305
-
1306 void update_global_geometry(Geometry<Real, Index> const& lg_old, Geometry<Real, Index> const& lg_new)
-
1307 {
-
1308 global_geometry_ += lg_new - lg_old;
-
1309 }
-
1310
-
1311 // Todo unittest
-
1312 void delete_connection_between_nodes_of_old_edge(Index old_node_id0, Index old_node_id1)
-
1313 {
-
1314 nodes_[old_node_id0].pop_nn(old_node_id1);
-
1315 nodes_[old_node_id1].pop_nn(old_node_id0);
-
1316 }
-
1317
-
1318 static Nodes<Real, Index> triangulate_sphere_nodes(Index n_iter){
-
1319 std::unordered_map<std::string,fp::implementation::SimpleNodeData<Real, Index>> simpleNodeData =
-
1320 fp::implementation::IcosahedronSubTriangulation<Real,Index>::make_corner_nodes();
-
1321 fp::implementation::IcosahedronSubTriangulation<Real,Index>::make_face_nodes(simpleNodeData, n_iter);
-
1322
-
1323 fp::indexing_number auto nNewNodesOnEdge = static_cast<Index>(n_iter - 1);
-
1324 fp::indexing_number auto nBulk = static_cast<Index>(nNewNodesOnEdge*(nNewNodesOnEdge+1)/2);
-
1325 fp::indexing_number auto nNodes = static_cast<Index>(fp::implementation::IcosahedronSubTriangulation<Real,Index>::N_ICOSA_NODEs
-
1326 + fp::implementation::IcosahedronSubTriangulation<Real,Index>::N_ICOSA_EDGEs*n_iter
-
1327 + fp::implementation::IcosahedronSubTriangulation<Real,Index>::N_ICOSA_FACEs*nBulk);
-
1328 std::vector<Node<Real, Index>> nodeData(nNodes);
-
1329 for(Index id; auto & nodeEl :simpleNodeData){
-
1330 id = nodeEl.second.id;
-
1331 nodeData[id].id = nodeEl.second.id;
-
1332 nodeData[id].pos = nodeEl.second.pos;
-
1333 for(auto const& hash: nodeEl.second.nn_hashes){
-
1334 nodeData[id].nn_ids.push_back(simpleNodeData[hash].id);
-
1335 }
-
1336 }
-
1337 return Nodes<Real, Index>(nodeData);
-
1338 }
-
1339
-
1340 void triangulate_planar_nodes(Index n_length, Index n_width, Real length, Real width){
-
1341 Index N_nodes = n_length*n_width;
-
1342 fp::implementation::PlanarTriangulation<Real, Index> triang(n_length, n_width);
-
1343// Nodes<Real, Index> bulk_nodes;
-
1344 Node<Real, Index> node{};
-
1345 node.curvature_vec=fp::vec3<Real>{0.,0.,0.};
-
1346 for(Index node_id=0; node_id<N_nodes; ++node_id){
-
1347 node.id = node_id;
-
1348 node.pos = fp::vec3<Real>{
-
1349 triang.id_to_j(node_id)*length/n_length,
-
1350 triang.id_to_i(node_id)*width/n_width,
-
1351 0.
-
1352 };
-
1353
-
1354 node.nn_ids = triang.nn_ids[node_id];
-
1355 nodes_.data.push_back(node);
-
1356 if(triang.is_bulk[node_id]){bulk_nodes_ids.push_back(node_id);}
-
1357 else{boundary_nodes_ids_set_.insert(node_id);}
-
1358 }
-
1359 }
-
1360 void all_nodes_are_bulk(){
-
1361 for(auto const& node: nodes_){
-
1362 bulk_nodes_ids.push_back(node.id);
-
1363 }
-
1364 }
-
1365
-
1366
-
1367 //unit tested
-
1368 BondFlipData<Index> flip_bulk_bond(Index node_id, Index nn_id,
-
1369 Real min_bond_length_square,
-
1370 Real max_bond_length_square) {
-
1371 BondFlipData<Index> bfd{};
-
1372 if (nodes_.nn_ids(node_id).size() > BOND_DONATION_CUTOFF) {
-
1373 if (nodes_.nn_ids(nn_id).size() > BOND_DONATION_CUTOFF) {
-
1374 Neighbors<Index> common_nns = previous_and_next_neighbour_global_ids(node_id, nn_id);
-
1375 Real bond_length_square = (nodes_.pos(common_nns.j_m_1) - nodes_.pos(common_nns.j_p_1)).norm_square();
-
1376 if ((bond_length_square < max_bond_length_square) && (bond_length_square > min_bond_length_square)) {
-
1377 if (common_neighbours(node_id, nn_id).size() == 2) {
-
1378 pre_update_geometry = calculate_diamond_geometry(node_id, nn_id, common_nns.j_m_1,
-
1379 common_nns.j_p_1);
-
1380 bfd = flip_bond_unchecked(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1);
-
1381 if (common_neighbours(bfd.common_nn_0, bfd.common_nn_1).size() == 2) {
-
1382 update_diamond_geometry(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1);
-
1383 post_update_geometry = calculate_diamond_geometry(node_id, nn_id, common_nns.j_m_1,
-
1384 common_nns.j_p_1);
-
1385 update_global_geometry(pre_update_geometry, post_update_geometry);
-
1386 } else {
-
1387 flip_bond_unchecked(bfd.common_nn_0, bfd.common_nn_1, nn_id, node_id);
-
1388 bfd.flipped = false;
-
1389 }
-
1390 }
-
1391 }
-
1392 }
-
1393 }
-
1394 return bfd;
-
1395 }
-
1396
-
1398 BondFlipData <Index>
-
1399 flip_bond_in_quadrilateral(Index node_id, Index nn_id, const Neighbors <Index> &common_nns,
-
1400 Real min_bond_length_square, Real max_bond_length_square) {
-
1401 BondFlipData<Index> bfd{};
-
1402 Real bond_length_square = (nodes_.pos(common_nns.j_m_1) - nodes_.pos(common_nns.j_p_1)).norm_square();
-
1403 if ((bond_length_square<max_bond_length_square) && (bond_length_square>min_bond_length_square)) {
-
1404 if (common_neighbours(node_id, nn_id).size() == 2) {
-
1405 pre_update_geometry = calculate_diamond_geometry(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1);
-
1406 bfd = flip_bond_unchecked(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1);
-
1407 if (common_neighbours(bfd.common_nn_0, bfd.common_nn_1).size() == 2) {
-
1408 update_diamond_geometry(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1);
-
1409 post_update_geometry = calculate_diamond_geometry(node_id, nn_id, common_nns.j_m_1,
-
1410 common_nns.j_p_1);
-
1411 update_global_geometry(pre_update_geometry, post_update_geometry);
-
1412 }
-
1413 else {
-
1414 flip_bond_unchecked(bfd.common_nn_0, bfd.common_nn_1, nn_id, node_id);
-
1415 bfd.flipped = false;
-
1416 }
-
1417 }
-
1418 }
-
1419 return bfd;
-
1420 }
-
1421
-
1422};
+
1039 public:
+
1040 //unit tested
+
+
1041 Neighbors previous_and_next_neighbour_global_ids(Index node_id, Index nn_id) const
+
1042 {
+
1053 auto const& nn_ids_view = nodes_[node_id].nn_ids;
+
1054 Neighbors neighbors = previous_and_next_neighbour_local_ids(node_id, nn_id);
+
1055 return {.j_m_1=nn_ids_view[neighbors.j_m_1], .j_p_1=nn_ids_view[neighbors.j_p_1]};
+
1056 }
+
+
1057 private:
+
1058
+
1059 void update_global_geometry(Geometry const& lg_old, Geometry const& lg_new)
+
1060 {
+
1061 global_geometry_ += lg_new - lg_old;
+
1062 }
+
1063
+
1064 // Todo unittest
+
1065 void delete_connection_between_nodes_of_old_edge(Index old_node_id0, Index old_node_id1)
+
1066 {
+
1067 nodes_[old_node_id0].pop_nn(old_node_id1);
+
1068 nodes_[old_node_id1].pop_nn(old_node_id0);
+
1069 }
+
1070
+
1071 static Nodes triangulate_sphere_nodes(Index n_iter){
+
1072 std::unordered_map<std::string,fp::implementation::SimpleNodeData<Real, Index>> simpleNodeData =
+
1073 fp::implementation::IcosahedronSubTriangulation<Real,Index>::make_corner_nodes();
+
1074 fp::implementation::IcosahedronSubTriangulation<Real,Index>::make_face_nodes(simpleNodeData, n_iter);
+
1075
+
1076 Index nNewNodesOnEdge = static_cast<Index>(n_iter - 1);
+
1077 Index nBulk = static_cast<Index>(nNewNodesOnEdge*(nNewNodesOnEdge+1)/2);
+
1078 Index nNodes = static_cast<Index>(fp::implementation::IcosahedronSubTriangulation<Real,Index>::N_ICOSA_NODEs
+
1079 + fp::implementation::IcosahedronSubTriangulation<Real,Index>::N_ICOSA_EDGEs*n_iter
+
1080 + fp::implementation::IcosahedronSubTriangulation<Real,Index>::N_ICOSA_FACEs*nBulk);
+
1081 std::vector<Node> nodeData(nNodes);
+
1082 for(Index id; auto & nodeEl :simpleNodeData){
+
1083 id = nodeEl.second.id;
+
1084 nodeData[id].id = nodeEl.second.id;
+
1085 nodeData[id].pos = nodeEl.second.pos;
+
1086 for(auto const& hash: nodeEl.second.nn_hashes){
+
1087 nodeData[id].nn_ids.push_back(simpleNodeData[hash].id);
+
1088 }
+
1089 }
+
1090 return Nodes(nodeData);
+
1091 }
+
1092
+
1093 [[nodiscard]] bool nodes_have_too_few_bonds_for_donation(Index node_id, Index nn_id){
+
1094 return (nodes_[node_id].nn_ids.size() <= BOND_DONATION_CUTOFF) || (nodes_[nn_id].nn_ids.size() <= BOND_DONATION_CUTOFF);
+
1095 }
+
1096
+
1097};
-
1423
-
1424}
-
1425#endif //FLIPPY_TRIANGULATION_HPP
-
1426
+
1098
+
1099}
+
1100#endif //FLIPPY_TRIANGULATION_HPP
+
1101
This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node o...
This file contains internal implementation details and is not part of the stable public api....
-
Implementation of Triangulation of two-dimensional surfaces in 3D.
Definition Triangulation.hpp:297
-
BondFlipData< Index > flip_bond_unchecked(Index node_id, Index nn_id, Index common_nn_j_m_1, Index common_nn_j_p_1)
Definition Triangulation.hpp:642
-
void emplace_before(Index center_node_id, Index anchor_id, Index new_value)
Adds a new node to the next neighbor list of a given node and calculates their mutual distance.
Definition Triangulation.hpp:515
-
void make_global_geometry()
Initiates the global geometry of the triangulation.
Definition Triangulation.hpp:967
-
void update_two_ring_geometry(Index node_id)
Updates the geometric quantities of the center node and its next neighbor nodes.
Definition Triangulation.hpp:825
-
Geometry< Real, Index > get_two_ring_geometry(Index node_id) const
Aggregates and Returns the geometric quantities of the center node and its next neighbor nodes.
Definition Triangulation.hpp:809
-
static Real mixed_area(vec3< Real > const &lij, vec3< Real > const &lij_p_1, Real triangle_area, Real cot_at_j, Real cot_at_j_p_1)
The node-associated area inside a triangle.
Definition Triangulation.hpp:753
-
Triangulation(Index n_length, Index n_width, Real length, Real width, Real verlet_radius_inp)
Constructor that can initiate a planar triangulation from scratch.
Definition Triangulation.hpp:353
-
const Node< Real, Index > & operator[](Index idx) const
Returns a constant reference to the node with the given id.
Definition Triangulation.hpp:941
-
void set_verlet_radius(Real R)
Set the radius of the Verlet list to a new value.
Definition Triangulation.hpp:432
-
void unflip_bond(Index node_id, Index nn_id, BondFlipData< Index > const &common_nns)
Un-flip a bond that was just flipped.
Definition Triangulation.hpp:615
-
void update_bulk_node_geometry(Index node_id)
Update the geometric quantities associated with the given node.
Definition Triangulation.hpp:662
-
static Triangulation< Real, Index, SPHERICAL_TRIANGULATION > experimental_load_sphere_from_stl(std::filesystem::path const &stl_file_path, Real verlet_radius_inp)
Special constructor that can initialize a triangulation with spherical topology from a binary stl stl...
Definition Triangulation.hpp:372
-
Index size() const
Returns the number of nodes in the triangulation.
Definition Triangulation.hpp:932
-
BondFlipData< Index > flip_bond(Index node_id, Index nn_id, Real min_bond_length_square, Real max_bond_length_square)
Securely flip the bond inside a quadrilateral formed by the nodes given by node_id,...
Definition Triangulation.hpp:528
-
void scale_node_coordinates(Real x_stretch, Real y_stretch=1, Real z_stretch=1)
Method for stretching or squeezing the initial triangulation shape.
Definition Triangulation.hpp:855
-
std::set< Index > boundary_nodes_ids_set() const
Returns the ids of all nodes that are not on the boundary.
Definition Triangulation.hpp:986
-
void update_boundary_node_geometry(Index node_id)
Updates the local geometry of a boundary node (for triangulation types that have a boundary).
Definition Triangulation.hpp:999
-
Triangulation(Index n_nodes_iter, Real R_initial_input, Real verlet_radius_inp)
Constructor that can initiate a spherical triangulation from scratch.
Definition Triangulation.hpp:331
-
static std::tuple< Real, vec3< Real > > partial_voronoi_area_and_face_normal_of_node_in_a_triangle(vec3< Real > const &lij, vec3< Real > const &lij_p_1)
This function is deprecated!
Definition Triangulation.hpp:721
-
void update_diamond_geometry(Index node_id, Index nn_id, Index cnn_0, Index cnn_1)
Calculates and updates the geometric quantities of the diamond configuration of nodes associated with...
Definition Triangulation.hpp:919
-
void make_verlet_list()
Create a Verlet list.
Definition Triangulation.hpp:443
-
static Real mixed_area(vec3< Real > const &lij, vec3< Real > const &lij_p_1, Real const &triangle_area)
This function is deprecated!
Definition Triangulation.hpp:780
-
const Geometry< Real, Index > & global_geometry() const
Information about the global geometric quantities of the triangulation, like global area,...
Definition Triangulation.hpp:959
-
void translate_all_nodes(vec3< Real > const &translation_vector)
Adds the same 3D vector to the positions of each node of the triangulation.
Definition Triangulation.hpp:466
-
Triangulation(Json const &nodes_input, Real verlet_radius_inp)
Constructor that can re-initiate a triangulation from the stored data.
Definition Triangulation.hpp:311
-
Json make_egg_data() const
Creates a JSON object with the data of the triangulation.
Definition Triangulation.hpp:954
-
Geometry< Real, Index > calculate_diamond_geometry(Index node_id, Index nn_id, Index cnn_0, Index cnn_1) const
Aggregates the geometric quantities of the diamond configuration of nodes associated with a bond flip...
Definition Triangulation.hpp:888
-
void move_node(Index node_id, vec3< Real > const &displacement_vector)
Move an individual node of the triangulation and update all the geometric quantities of the triangula...
Definition Triangulation.hpp:493
-
const Nodes< Real, Index > & nodes() const
Returns a constant reference to the underlying Nodes container.
Definition Triangulation.hpp:946
-
vec3< Real > calculate_mass_center() const
Calculate the area-weighted average of node positions.
Definition Triangulation.hpp:479
+
Implementation of Triangulation of two-dimensional surfaces in 3D.
Definition Triangulation.hpp:289
+
static Triangulation experimental_load_sphere_from_stl(std::filesystem::path const &stl_file_path, Real verlet_radius_inp)
Special constructor that can initialize a triangulation with spherical topology from a binary stl stl...
Definition Triangulation.hpp:338
+
void make_global_geometry()
Initiates the global geometry of the triangulation.
Definition Triangulation.hpp:862
+
Geometry calculate_diamond_geometry(Index node_id, Index nn_id, Index cnn_0, Index cnn_1) const
Aggregates the geometric quantities of the diamond configuration of nodes associated with a bond flip...
Definition Triangulation.hpp:783
+
void unflip_bond(Index node_id, Index nn_id, BondFlipData const &common_nns)
Un-flip a bond that was just flipped.
Definition Triangulation.hpp:576
+
void move_node(Index node_id, vec3< Real > const &displacement_vector)
Move an individual node of the triangulation and update all the geometric quantities of the triangula...
Definition Triangulation.hpp:450
+
const Nodes & nodes() const
Returns a constant reference to the underlying Nodes container.
Definition Triangulation.hpp:841
+
void update_bulk_node_geometry(Index node_id)
Update the geometric quantities associated with the given node.
Definition Triangulation.hpp:622
+
void emplace_before(Index center_node_id, Index anchor_id, Index new_value)
Adds a new node to the next neighbor list of a given node and calculates their mutual distance.
Definition Triangulation.hpp:472
+
void translate_all_nodes(vec3< Real > const &translation_vector)
Adds the same 3D vector to the positions of each node of the triangulation.
Definition Triangulation.hpp:423
+
void set_verlet_radius(Real R)
Set the radius of the Verlet list to a new value.
Definition Triangulation.hpp:389
+
Index size() const
Returns the number of nodes in the triangulation.
Definition Triangulation.hpp:827
+
const Node & operator[](Index idx) const
Returns a constant reference to the node with the given id.
Definition Triangulation.hpp:836
+
vec3< Real > calculate_mass_center() const
Calculate the area-weighted average of node positions.
Definition Triangulation.hpp:436
+
Json make_egg_data() const
Creates a JSON object with the data of the triangulation.
Definition Triangulation.hpp:849
+
Triangulation(Json const &nodes_input, Real verlet_radius_inp)
Constructor that can re-initiate a triangulation from the stored data.
Definition Triangulation.hpp:303
+
BondFlipData flip_bond_unchecked(Index node_id, Index nn_id, Index common_nn_j_m_1, Index common_nn_j_p_1)
Definition Triangulation.hpp:603
+
Triangulation(Index n_nodes_iter, Real R_initial_input, Real verlet_radius_inp)
Constructor that can initiate a spherical triangulation from scratch.
Definition Triangulation.hpp:316
+
void scale_node_coordinates(Real x_stretch, Real y_stretch=1, Real z_stretch=1)
Method for stretching or squeezing the initial triangulation shape.
Definition Triangulation.hpp:750
+
Geometry get_two_ring_geometry(Index node_id) const
Aggregates and Returns the geometric quantities of the center node and its next neighbor nodes.
Definition Triangulation.hpp:710
+
void update_two_ring_geometry(Index node_id)
Updates the geometric quantities of the center node and its next neighbor nodes.
Definition Triangulation.hpp:726
+
Neighbors previous_and_next_neighbour_global_ids(Index node_id, Index nn_id) const
Definition Triangulation.hpp:1041
+
const Geometry & global_geometry() const
Information about the global geometric quantities of the triangulation, like global area,...
Definition Triangulation.hpp:854
+
static Real mixed_area(vec3< Real > const &lij, vec3< Real > const &lij_p_1, Real triangle_area, Real cot_at_j, Real cot_at_j_p_1)
The node-associated area inside a triangle.
Definition Triangulation.hpp:686
+
void make_verlet_list()
Create a Verlet list.
Definition Triangulation.hpp:400
+
void update_diamond_geometry(Index node_id, Index nn_id, Index cnn_0, Index cnn_1)
Calculates and updates the geometric quantities of the diamond configuration of nodes associated with...
Definition Triangulation.hpp:814
+
BondFlipData flip_bond(Index node_id, Index nn_id, Real min_bond_length_square, Real max_bond_length_square)
Securely flip the bond inside a quadrilateral formed by the nodes given by node_id,...
Definition Triangulation.hpp:485
Definition stlSerializer.hpp:123
Definition stlSerializer.hpp:66
Internal implementation of a 3D vector.
Definition vec3.hpp:43
+
Real dot(vec3< Real > const &v) const
Calculate dot product with another vector.
Definition vec3.hpp:106
+
Real norm() const
Returns the norm of the vector.
Definition vec3.hpp:164
+
static vec3< Real > cross(vec3< Real > const &a, vec3< Real > const &b)
Calculate cross product between two vectors.
Definition vec3.hpp:133
Here we implement the concepts of a positive integer number that is used throughout the code for inde...
Definition custom_concepts.hpp:31
-
nlohmann::json Json
shortening of the nlohmann::json namespace, which is an external open source library bundled by flipp...
Definition Nodes.hpp:16
-
static constexpr int BOND_DONATION_CUTOFF
a node needs to have more than the cutoff number of bonds to be allowed to donate one
Definition Triangulation.hpp:48
+
static constexpr int BOND_DONATION_CUTOFF
a node needs to have more than the cutoff number of bonds to be allowed to donate one
Definition Triangulation.hpp:51
+
#define LONG_LONG_MAX
Redefinition of the LONG_LONG_MAX macro in case a specific compiler does not implement it....
Definition Triangulation.hpp:28
static bool is_member(std::vector< T > const &v, T const &el)
Convenient wrapper around std::find, which only works for std::vectors.
Definition utils.hpp:64
-
#define VERY_LARGE_NUMBER_
Literal for a very large integral number.
Definition Triangulation.hpp:36
-
TriangulationType
This enum defines named types of triangulations that are implemented in flippy.
Definition Triangulation.hpp:257
-
@ SPHERICAL_TRIANGULATION
Create a spherical triangulation which is a sub-triangulation of a regular icosahedron.
Definition Triangulation.hpp:260
-
@ EXPERIMENTAL_PLANAR_TRIANGULATION
Create a triangulation which is a sub-triangulation of a plane square.
Definition Triangulation.hpp:262
+
nlohmann::json Json
shortening of the nlohmann::json namespace, which is an external open source library bundled by flipp...
Definition Nodes.hpp:17
+
static constexpr auto VERY_LARGE_NUMBER_
Literal for a very large integral number.
Definition Triangulation.hpp:43
Definition custom_concepts.hpp:8
-
A helper struct; keeps track of bond flips.
Definition Triangulation.hpp:84
-
Index common_nn_1
Global id of a node that is supposed to receive a bond after a flip.
Definition Triangulation.hpp:87
-
bool flipped
track if the bond was flipped.
Definition Triangulation.hpp:85
-
Index common_nn_0
Global id of a node that is supposed to receive a bond after a flip.
Definition Triangulation.hpp:86
+
A helper struct; keeps track of bond flips.
Definition Triangulation.hpp:86
+
Index common_nn_0
Global id of a node that is supposed to receive a bond after a flip.
Definition Triangulation.hpp:88
+
Index common_nn_1
Global id of a node that is supposed to receive a bond after a flip.
Definition Triangulation.hpp:89
+
bool flipped
track if the bond was flipped.
Definition Triangulation.hpp:87
A helper struct. Used by the triangulation class to pass data around in one convenient package.
Definition Triangulation.hpp:138
-
Real volume
Volume of the patch. Sum over the associated volumes of individual nodes that comprise the patch....
Definition Triangulation.hpp:140
-
friend Geometry< Real, Index > operator+(Geometry< Real, Index > const &lhs, Geometry< Real, Index > const &rhs)
Overloaded addition operator.
Definition Triangulation.hpp:179
-
Real area
Area of the patch. Sum over the associated areas of individual nodes that comprise the patch....
Definition Triangulation.hpp:139
-
Geometry(Real area_inp, Real volume_inp, Real unit_bending_energy_inp)
Direct Constructor.
Definition Triangulation.hpp:152
-
Geometry(Node< Real, Index > const &node)
Construct from a node.
Definition Triangulation.hpp:145
-
Geometry()
Default constructor, that zero initiates all the data members.
Definition Triangulation.hpp:143
-
friend void operator+=(Geometry< Real, Index > &lhs, Geometry< Real, Index > const &rhs)
Overloaded addition and assignment operator.
Definition Triangulation.hpp:215
-
Real unit_bending_energy
Definition Triangulation.hpp:141
-
friend Geometry< Real, Index > operator-(Geometry< Real, Index > const &lhs, Geometry< Real, Index > const &rhs)
Overloaded subtraction operator.
Definition Triangulation.hpp:201
-
friend void operator-=(Geometry< Real, Index > &lhs, Geometry< Real, Index > const &rhs)
Overloaded subtraction and assignment operator.
Definition Triangulation.hpp:229
-
void operator+=(Node< Real, Index > const &node)
Overloaded addition and assignment operator.
Definition Triangulation.hpp:238
-
Definition Triangulation.hpp:100
-
Index j_p_1
neighbor j-1
Definition Triangulation.hpp:104
-
static Index minus_one(Index j, Index ring_size)
Definition Triangulation.hpp:119
-
static Index plus_one(Index j, Index ring_size)
Definition Triangulation.hpp:112
-
Index j_m_1
neighbor j+1
Definition Triangulation.hpp:102
+
void operator+=(Node const &node)
Overloaded addition and assignment operator.
Definition Triangulation.hpp:237
+
Real area
Area of the patch. Sum over the associated areas of individual nodes that comprise the patch....
Definition Triangulation.hpp:139
+
friend Geometry operator-(Geometry const &lhs, Geometry const &rhs)
Overloaded subtraction operator.
Definition Triangulation.hpp:200
+
friend void operator-=(Geometry &lhs, Geometry const &rhs)
Overloaded subtraction and assignment operator.
Definition Triangulation.hpp:228
+
Geometry()
Default constructor, that zero initiates all the data members.
Definition Triangulation.hpp:142
+
friend void operator+=(Geometry &lhs, Geometry const &rhs)
Overloaded addition and assignment operator.
Definition Triangulation.hpp:214
+
friend Geometry operator+(Geometry const &lhs, Geometry const &rhs)
Overloaded addition operator.
Definition Triangulation.hpp:178
+
Real volume
Definition Triangulation.hpp:140
+
Geometry(Real area_inp, Real volume_inp)
Direct Constructor.
Definition Triangulation.hpp:151
+
Geometry(Node const &node)
Construct from a node.
Definition Triangulation.hpp:144
+
Definition Triangulation.hpp:101
+
Index j_m_1
neighbor j+1
Definition Triangulation.hpp:103
+
Index j_p_1
neighbor j-1
Definition Triangulation.hpp:105
+
static Index plus_one(Index j, Index ring_size)
Definition Triangulation.hpp:113
+
static Index minus_one(Index j, Index ring_size)
Definition Triangulation.hpp:120
A data structure containing all geometric and topological information associated with a node.
Definition Nodes.hpp:30
-
vec3< Real > pos
Position of the node in the lab frame.
Definition Nodes.hpp:73
-
Real unit_bending_energy
unit_bending_energy corresponds to the Helfrich bending energy with bending rigidity 1 and gaussian b...
Definition Nodes.hpp:71
-
Real area
Voronoi area associated with the node.
Definition Nodes.hpp:45
-
Real volume
If the node is part of a closed surface triangulation, then the volume contains the volume of the tet...
Definition Nodes.hpp:58
-
Data structure containing all nodes of the Triangulation.
Definition Nodes.hpp:237
+
vec3< Real > pos
Position of the node in the lab frame.
Definition Nodes.hpp:61
+
Real volume
If the node is part of a closed surface triangulation, then the volume contains the volume of the tet...
Definition Nodes.hpp:58
+
Real area
Voronoi area associated with the node.
Definition Nodes.hpp:45
+
Data structure containing all nodes of the Triangulation.
Definition Nodes.hpp:225
+
Json make_data() const
Serialize the Nodes struct to a JSON object.
Definition Nodes.hpp:357
+
void set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > &&dist)
Overwrite the next neighbor distance with a new 3d vector.
Definition Nodes.hpp:320
+
void emplace_nn_id(Index node_id, Index to_emplace_nn_id, Index loc_nn_index)
Emplace a the id of a new node in the Node::nn_ids vector, in front of the loc_idx position.
Definition Nodes.hpp:310
+
Index size() const
Size of the Nodes data member.
Definition Nodes.hpp:338
+
std::vector< Node >::iterator begin()
Returns an iterator to the beginning of the underlying data member that contains the collection of th...
Definition Nodes.hpp:274
+
std::vector< Node > data
Data member that contains the individual nodes.
Definition Nodes.hpp:226
+
std::vector< Node >::iterator end()
Returns an iterator to the end of the underlying data member that contains the collection of the node...
Definition Nodes.hpp:290
Definition stlSerializer.hpp:55
This file contains helper functions that are used throughout flippy, but are not specific to any give...
Header file containing the definition and implementation a 3 dimensional vector class,...
@@ -1121,7 +870,7 @@ diff --git a/docs/_triangulator_8hpp.html b/docs/_triangulator_8hpp.html old mode 100644 new mode 100755 index 001caf6..ac75841 --- a/docs/_triangulator_8hpp.html +++ b/docs/_triangulator_8hpp.html @@ -3,16 +3,18 @@ - + flippy: flippy/Triangulator.hpp File Reference + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -101,8 +108,7 @@
Triangulator.hpp File Reference
@@ -113,34 +119,67 @@ #include <vector>
#include <unordered_set>
#include <unordered_map>
+#include <algorithm>
#include "custom_concepts.hpp"
#include "vec3.hpp"
Include dependency graph for Triangulator.hpp:
+ + + + + + + + + + + + + + + + + + + + + + + + + +
This graph shows which files directly or indirectly include this file:
+ + + + + + + + + + + + +

Go to the source code of this file.

- + - + -

Namespaces

namespace  fp
namespace  fp
 
namespace  fp::implementation
namespace  fp::implementation
 
- - - -

-Macros

-#define M_PI   3.14159265358979323846 /* pi */
 The M_PI macro is not defined on for all compilers, so it is defined here (if a definition does not already exist).
 

Detailed Description

This file contains internal implementation details and is not part of the stable public api. The classes and methods implemented here are responsible for creating the intitial triangulations.

@@ -150,7 +189,7 @@ diff --git a/docs/_triangulator_8hpp.js b/docs/_triangulator_8hpp.js deleted file mode 100644 index ce8ef32..0000000 --- a/docs/_triangulator_8hpp.js +++ /dev/null @@ -1,4 +0,0 @@ -var _triangulator_8hpp = -[ - [ "M_PI", "group___globals.html#gae71449b1cc6e6250b91f539153a7a0d3", null ] -]; \ No newline at end of file diff --git a/docs/_triangulator_8hpp__dep__incl.dot b/docs/_triangulator_8hpp__dep__incl.dot deleted file mode 100644 index 027782e..0000000 --- a/docs/_triangulator_8hpp__dep__incl.dot +++ /dev/null @@ -1,14 +0,0 @@ -digraph "flippy/Triangulator.hpp" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="flippy/Triangulator.hpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="This file contains internal implementation details and is not part of the stable public api...."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="flippy/Triangulation.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_triangulation_8hpp.html",tooltip="This file contains the fp::Triangulation class and several related helper classes...."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="flippy/MonteCarloUpdater.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_monte_carlo_updater_8hpp.html",tooltip="This file contains the MonteCarloUpdater class template. Together with Triangulation...."]; - Node2 -> Node4 [id="edge3_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="flippy/flippy.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$flippy_8hpp.html",tooltip="This header file exists for convenience. Including this header will automatically include all parts o..."]; -} diff --git a/docs/_triangulator_8hpp__dep__incl.map b/docs/_triangulator_8hpp__dep__incl.map new file mode 100755 index 0000000..9c09d59 --- /dev/null +++ b/docs/_triangulator_8hpp__dep__incl.map @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/docs/_triangulator_8hpp__dep__incl.md5 b/docs/_triangulator_8hpp__dep__incl.md5 new file mode 100755 index 0000000..0c9f7c5 --- /dev/null +++ b/docs/_triangulator_8hpp__dep__incl.md5 @@ -0,0 +1 @@ +31175fb5f1b552c7fa574ad8d9244b34 \ No newline at end of file diff --git a/docs/_triangulator_8hpp__dep__incl.png b/docs/_triangulator_8hpp__dep__incl.png new file mode 100755 index 0000000..d18d998 Binary files /dev/null and b/docs/_triangulator_8hpp__dep__incl.png differ diff --git a/docs/_triangulator_8hpp__incl.dot b/docs/_triangulator_8hpp__incl.dot deleted file mode 100644 index 63e4a19..0000000 --- a/docs/_triangulator_8hpp__incl.dot +++ /dev/null @@ -1,29 +0,0 @@ -digraph "flippy/Triangulator.hpp" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="flippy/Triangulator.hpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="This file contains internal implementation details and is not part of the stable public api...."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="array",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="vector",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="unordered_set",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node5 [id="edge4_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="unordered_map",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node6 [id="edge5_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="custom_concepts.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$custom__concepts_8hpp.html",tooltip="This file contains the concepts that are costomly defined for the flippy class templates."]; - Node6 -> Node7 [id="edge6_Node000006_Node000007",color="steelblue1",style="solid",tooltip=" "]; - Node7 [id="Node000007",label="concepts",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node8 [id="edge7_Node000001_Node000008",color="steelblue1",style="solid",tooltip=" "]; - Node8 [id="Node000008",label="vec3.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$vec3_8hpp.html",tooltip="Header file containing the definition and implementation a 3 dimensional vector class,..."]; - Node8 -> Node9 [id="edge8_Node000008_Node000009",color="steelblue1",style="solid",tooltip=" "]; - Node9 [id="Node000009",label="ostream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node8 -> Node10 [id="edge9_Node000008_Node000010",color="steelblue1",style="solid",tooltip=" "]; - Node10 [id="Node000010",label="iostream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node8 -> Node11 [id="edge10_Node000008_Node000011",color="steelblue1",style="solid",tooltip=" "]; - Node11 [id="Node000011",label="cmath",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node8 -> Node6 [id="edge11_Node000008_Node000006",color="steelblue1",style="solid",tooltip=" "]; -} diff --git a/docs/_triangulator_8hpp__incl.map b/docs/_triangulator_8hpp__incl.map new file mode 100755 index 0000000..dc3bfd7 --- /dev/null +++ b/docs/_triangulator_8hpp__incl.map @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/_triangulator_8hpp__incl.md5 b/docs/_triangulator_8hpp__incl.md5 new file mode 100755 index 0000000..ce2413b --- /dev/null +++ b/docs/_triangulator_8hpp__incl.md5 @@ -0,0 +1 @@ +3148ede8803e99df05e772f0cda5d89f \ No newline at end of file diff --git a/docs/_triangulator_8hpp__incl.png b/docs/_triangulator_8hpp__incl.png new file mode 100755 index 0000000..49b00bf Binary files /dev/null and b/docs/_triangulator_8hpp__incl.png differ diff --git a/docs/_triangulator_8hpp_source.html b/docs/_triangulator_8hpp_source.html old mode 100644 new mode 100755 index 5f2ef08..02c29d2 --- a/docs/_triangulator_8hpp_source.html +++ b/docs/_triangulator_8hpp_source.html @@ -3,16 +3,18 @@ - + flippy: flippy/Triangulator.hpp Source File + - + + @@ -43,28 +45,28 @@
- + + -
@@ -113,459 +115,456 @@
10#include <vector>
11#include <unordered_set>
12#include <unordered_map>
-
13#include "custom_concepts.hpp"
-
14#include "vec3.hpp"
-
15
+
13#include <algorithm>
+
14#include "custom_concepts.hpp"
+
15#include "vec3.hpp"
16
-
22#ifndef M_PI
-
23#define M_PI 3.14159265358979323846 /* pi */
-
24#endif
-
32namespace fp::implementation{
-
33
-
35template<floating_point_number Real, indexing_number Index>
-
36struct SimpleNodeData{
-
37 std::string hash{};
-
38 Index id{};
-
39 vec3<Real> pos{};
-
40 std::unordered_set<std::string> nn_hashes{};
-
41};
-
42
-
44template<floating_point_number Real, indexing_number Index>
-
45class IcosahedronSubTriangulation
-
46{
-
47public:
-
48 static std::string hash_node(Index c)
-
49 {
-
53 return std::to_string(c);
-
54 }
-
55
-
56 static std::string hash_node(Index c0, Index c1, Index n)
-
57 {
-
62 Index a = std::min(c0, c1);
-
63 Index b = std::max(c0, c1);
-
64 return std::to_string(a) + "_" + std::to_string(b) + "_" + std::to_string(n);
-
65 }
-
66
-
67 static std::string hash_node(Index c0, Index c1, Index c2, Index i, Index j)
-
68 {
-
72 std::vector<Index> cv{c0, c1, c2};
-
73 std::sort(cv.begin(), cv.end());
-
74
-
75 return std::to_string(cv[0]) + "_" + std::to_string(cv[1]) + "_" + std::to_string(cv[2])
-
76 + "_" + std::to_string(i) + "_" + std::to_string(j);
-
77 }
-
78
-
79 static vec3<Real> r_S1(Real R, Real t, Real f) {
-
80 vec3<Real> r{R * std::sin(t) * std::cos(f), R * std::sin(t) * std::sin(f), R * std::cos(t)};
-
81 return r;
-
82 }
-
83
-
84 static constexpr int N_ICOSA_FACEs = 20;
-
85 static constexpr int N_ICOSA_EDGEs = 30;
-
86 static constexpr int N_ICOSA_NODEs = 12;
-
87
-
88 static constexpr std::array<int, N_ICOSA_FACEs> FACE_IDs{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
-
89 static constexpr std::array<int, N_ICOSA_NODEs> NODE_IDs{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
-
90 static constexpr std::array<std::array<int, 3>, N_ICOSA_FACEs> FACE_CORNER_NODES_ = {
-
91 std::array<int, 3>{NODE_IDs[0], NODE_IDs[5], NODE_IDs[1]},
-
92 std::array<int, 3>{NODE_IDs[0], NODE_IDs[1], NODE_IDs[2]},
-
93 std::array<int, 3>{NODE_IDs[0], NODE_IDs[2], NODE_IDs[3]},
-
94 std::array<int, 3>{NODE_IDs[0], NODE_IDs[3], NODE_IDs[4]},
-
95 std::array<int, 3>{NODE_IDs[0], NODE_IDs[4], NODE_IDs[5]},
-
96 std::array<int, 3>{NODE_IDs[10], NODE_IDs[5], NODE_IDs[4]},
-
97 std::array<int, 3>{NODE_IDs[10], NODE_IDs[6], NODE_IDs[5]},
-
98 std::array<int, 3>{NODE_IDs[6], NODE_IDs[1], NODE_IDs[5]},
-
99 std::array<int, 3>{NODE_IDs[6], NODE_IDs[7], NODE_IDs[1]},
-
100 std::array<int, 3>{NODE_IDs[7], NODE_IDs[2], NODE_IDs[1]},
-
101 std::array<int, 3>{NODE_IDs[7], NODE_IDs[8], NODE_IDs[2]},
-
102 std::array<int, 3>{NODE_IDs[8], NODE_IDs[3], NODE_IDs[2]},
-
103 std::array<int, 3>{NODE_IDs[8], NODE_IDs[9], NODE_IDs[3]},
-
104 std::array<int, 3>{NODE_IDs[9], NODE_IDs[4], NODE_IDs[3]},
-
105 std::array<int, 3>{NODE_IDs[9], NODE_IDs[10], NODE_IDs[4]},
-
106 std::array<int, 3>{NODE_IDs[11], NODE_IDs[10], NODE_IDs[9]},
-
107 std::array<int, 3>{NODE_IDs[11], NODE_IDs[6], NODE_IDs[10]},
-
108 std::array<int, 3>{NODE_IDs[11], NODE_IDs[7], NODE_IDs[6]},
-
109 std::array<int, 3>{NODE_IDs[11], NODE_IDs[8], NODE_IDs[7]},
-
110 std::array<int, 3>{NODE_IDs[11], NODE_IDs[9], NODE_IDs[8]}
-
111 };
-
112
-
113 static constexpr const std::array<std::array<int, 3>, N_ICOSA_FACEs> FACE_CORNER_NODES = {
-
114 std::array<int, 3>{0, 5, 1},
-
115 std::array<int, 3>{0, 1, 2},
-
116 std::array<int, 3>{0, 2, 3},
-
117 std::array<int, 3>{0, 3, 4},
-
118 std::array<int, 3>{0, 4, 5},
-
119 std::array<int, 3>{10, 5, 4},
-
120 std::array<int, 3>{10, 6, 5},
-
121 std::array<int, 3>{6, 1, 5},
-
122 std::array<int, 3>{6, 7, 1},
-
123 std::array<int, 3>{7, 2, 1},
-
124 std::array<int, 3>{7, 8, 2},
-
125 std::array<int, 3>{8, 3, 2},
-
126 std::array<int, 3>{8, 9, 3},
-
127 std::array<int, 3>{9, 4, 3},
-
128 std::array<int, 3>{9, 10, 4},
-
129 std::array<int, 3>{11, 10, 9},
-
130 std::array<int, 3>{11, 6, 10},
-
131 std::array<int, 3>{11, 7, 6},
-
132 std::array<int, 3>{11, 8, 7},
-
133 std::array<int, 3>{11, 9, 8}
-
134 };
-
135
-
136 static std::unordered_map<std::string, SimpleNodeData<Real, Index>> make_corner_nodes()
-
137 {
-
138
-
139 Real R = 1.;
-
140 std::unordered_map<std::string, SimpleNodeData<Real, Index>> base_nodes(N_ICOSA_NODEs);
-
141 base_nodes[hash_node(0)] = {.hash=hash_node(0), .id=0, .pos=r_S1(R, 0., 0.)};
-
142 std::string hash;
-
143 hash.reserve(2);
-
144 for (Index i = 1; i<6; ++i) {
-
145 hash = hash_node(i);
-
146 base_nodes[hash] = {
-
147 .hash=hash,
-
148 .id=i,
-
149 .pos=r_S1(R,
-
150 static_cast<Real>(M_PI/2. - std::atan(0.5)),
-
151 static_cast<Real>(2.*M_PI*(static_cast<Real>(i) - 1.)/5.))};
-
152 }
-
153
-
154 for (Index i = 6; i<N_ICOSA_NODEs - 1; ++i) {
-
155 hash = hash_node(i);
-
156 base_nodes[hash] = {
-
157 .hash=hash,
-
158 .id=i,
-
159 .pos=r_S1(R,
-
160 static_cast<Real>(M_PI/2. + std::atan(0.5)),
-
161 static_cast<Real>(2.*M_PI*(static_cast<Real>(i) - 6.5)/5.))};
-
162 }
-
163 hash = hash_node(N_ICOSA_NODEs - 1);
-
164 base_nodes[hash] = {
-
165 .hash=hash,
-
166 .id=static_cast<Index>(N_ICOSA_NODEs - 1),
-
167 .pos=r_S1(R, static_cast<Real>(M_PI), static_cast<Real>(0.))};
-
168 return base_nodes;
-
169 }
-
170
-
171 enum TriangleRegion
-
172 {
-
173 TOP_CORNER, BOTTOM_LEFT_CORNER, BOTTOM_RIGHT_CORNER, LEFT_EDGE, BOTTOM_EDGE, DIAGONAL_EDGE, BULK
-
174 };
-
175
-
176 static TriangleRegion get_region(Index i, Index j, Index sizeMinOne)
-
177 {
-
178 if (i==0) { return TOP_CORNER; }
-
179 else if (j==0 && i==sizeMinOne) { return BOTTOM_LEFT_CORNER; }
-
180 else if (j==sizeMinOne && i==sizeMinOne) { return BOTTOM_RIGHT_CORNER; }
-
181 else if (j==0) { return LEFT_EDGE; }
-
182 else if (i==sizeMinOne) { return BOTTOM_EDGE; }
-
183 else if (i==j) { return DIAGONAL_EDGE; }
-
184 else { return BULK; }
-
185 }
-
186
-
187 static std::string hash_any(Index c0, Index c1, Index c2, Index i, Index j, Index maxIdx)
-
188 {
-
189 switch (get_region(i, j, maxIdx)) {
-
190 case TOP_CORNER:return hash_node(c0);
-
191 case BOTTOM_LEFT_CORNER:return hash_node(c1);
-
192 case BOTTOM_RIGHT_CORNER:return hash_node(c2);
-
193 case LEFT_EDGE:return hash_node(c0, c1, i);
-
194 case BOTTOM_EDGE:return hash_node(c1, c2, j);
-
195 case DIAGONAL_EDGE:return hash_node(c0, c2, j);
-
196 case BULK:return hash_node(c0, c1, c2, i, j);
-
197 default:
-
198 std::cerr<<"something went wrong! provided indices i: "
-
199 <<i<<" and j: "
-
200 <<j<<" together with the maxIdx: "<<maxIdx
-
201 <<" produced a wrong region.\n";
-
202 exit(12);
-
203 }
-
204 }
-
205
-
206 static std::vector<std::string> neighbour_hash_vec(Index c0, Index c1, Index c2, Index i, Index j, Index maxIdx)
-
207 {
-
208 std::vector<std::string> neighbour_hash;
-
209 neighbour_hash.reserve(6);
-
210 switch (get_region(i, j, maxIdx)) {
-
211
-
212 case TOP_CORNER:neighbour_hash.push_back(hash_any(c0, c1, c2, 1, 0, maxIdx));
-
213 neighbour_hash.push_back(hash_any(c0, c1, c2, 1, 1, maxIdx));
-
214 return neighbour_hash;
-
215
-
216 case BOTTOM_LEFT_CORNER:neighbour_hash.push_back(hash_any(c0, c1, c2, i, j + 1, maxIdx));
-
217 neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j, maxIdx));
-
218 return neighbour_hash;
-
219
-
220 case BOTTOM_RIGHT_CORNER:neighbour_hash.push_back(hash_any(c0, c1, c2, i, j - 1, maxIdx));
-
221 neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j - 1, maxIdx));
-
222 return neighbour_hash;
-
223
-
224 case LEFT_EDGE:neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j, maxIdx));
-
225 neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j, maxIdx));
+
17
+
25namespace fp::implementation{
+
26
+
28template<floating_point_number Real, indexing_number Index>
+
29struct SimpleNodeData{
+
30 std::string hash{};
+
31 Index id{};
+
32 vec3<Real> pos{};
+
33 std::unordered_set<std::string> nn_hashes{};
+
34};
+
35
+
37template<floating_point_number Real, indexing_number Index>
+
38class IcosahedronSubTriangulation
+
39{
+
40public:
+
41 static std::string hash_node(Index c)
+
42 {
+
46 return std::to_string(c);
+
47 }
+
48
+
49 static std::string hash_node(Index c0, Index c1, Index n)
+
50 {
+
55 Index a = std::min(c0, c1);
+
56 Index b = std::max(c0, c1);
+
57 return std::to_string(a) + "_" + std::to_string(b) + "_" + std::to_string(n);
+
58 }
+
59
+
60 static std::string hash_node(Index c0, Index c1, Index c2, Index i, Index j)
+
61 {
+
65 std::vector<Index> cv{c0, c1, c2};
+
66 std::sort(cv.begin(), cv.end());
+
67
+
68 return std::to_string(cv[0]) + "_" + std::to_string(cv[1]) + "_" + std::to_string(cv[2])
+
69 + "_" + std::to_string(i) + "_" + std::to_string(j);
+
70 }
+
71
+
72 static vec3<Real> r_S1(Real R, Real t, Real f) {
+
73 vec3<Real> r{R * std::sin(t) * std::cos(f), R * std::sin(t) * std::sin(f), R * std::cos(t)};
+
74 return r;
+
75 }
+
76
+
77 static constexpr int N_ICOSA_FACEs = 20;
+
78 static constexpr int N_ICOSA_EDGEs = 30;
+
79 static constexpr int N_ICOSA_NODEs = 12;
+
80
+
81 static constexpr std::array<int, N_ICOSA_FACEs> FACE_IDs{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
+
82 static constexpr std::array<int, N_ICOSA_NODEs> NODE_IDs{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
+
83 static constexpr std::array<std::array<int, 3>, N_ICOSA_FACEs> FACE_CORNER_NODES_ = {
+
84 std::array<int, 3>{NODE_IDs[0], NODE_IDs[5], NODE_IDs[1]},
+
85 std::array<int, 3>{NODE_IDs[0], NODE_IDs[1], NODE_IDs[2]},
+
86 std::array<int, 3>{NODE_IDs[0], NODE_IDs[2], NODE_IDs[3]},
+
87 std::array<int, 3>{NODE_IDs[0], NODE_IDs[3], NODE_IDs[4]},
+
88 std::array<int, 3>{NODE_IDs[0], NODE_IDs[4], NODE_IDs[5]},
+
89 std::array<int, 3>{NODE_IDs[10], NODE_IDs[5], NODE_IDs[4]},
+
90 std::array<int, 3>{NODE_IDs[10], NODE_IDs[6], NODE_IDs[5]},
+
91 std::array<int, 3>{NODE_IDs[6], NODE_IDs[1], NODE_IDs[5]},
+
92 std::array<int, 3>{NODE_IDs[6], NODE_IDs[7], NODE_IDs[1]},
+
93 std::array<int, 3>{NODE_IDs[7], NODE_IDs[2], NODE_IDs[1]},
+
94 std::array<int, 3>{NODE_IDs[7], NODE_IDs[8], NODE_IDs[2]},
+
95 std::array<int, 3>{NODE_IDs[8], NODE_IDs[3], NODE_IDs[2]},
+
96 std::array<int, 3>{NODE_IDs[8], NODE_IDs[9], NODE_IDs[3]},
+
97 std::array<int, 3>{NODE_IDs[9], NODE_IDs[4], NODE_IDs[3]},
+
98 std::array<int, 3>{NODE_IDs[9], NODE_IDs[10], NODE_IDs[4]},
+
99 std::array<int, 3>{NODE_IDs[11], NODE_IDs[10], NODE_IDs[9]},
+
100 std::array<int, 3>{NODE_IDs[11], NODE_IDs[6], NODE_IDs[10]},
+
101 std::array<int, 3>{NODE_IDs[11], NODE_IDs[7], NODE_IDs[6]},
+
102 std::array<int, 3>{NODE_IDs[11], NODE_IDs[8], NODE_IDs[7]},
+
103 std::array<int, 3>{NODE_IDs[11], NODE_IDs[9], NODE_IDs[8]}
+
104 };
+
105
+
106 static constexpr const std::array<std::array<int, 3>, N_ICOSA_FACEs> FACE_CORNER_NODES = {
+
107 std::array<int, 3>{0, 5, 1},
+
108 std::array<int, 3>{0, 1, 2},
+
109 std::array<int, 3>{0, 2, 3},
+
110 std::array<int, 3>{0, 3, 4},
+
111 std::array<int, 3>{0, 4, 5},
+
112 std::array<int, 3>{10, 5, 4},
+
113 std::array<int, 3>{10, 6, 5},
+
114 std::array<int, 3>{6, 1, 5},
+
115 std::array<int, 3>{6, 7, 1},
+
116 std::array<int, 3>{7, 2, 1},
+
117 std::array<int, 3>{7, 8, 2},
+
118 std::array<int, 3>{8, 3, 2},
+
119 std::array<int, 3>{8, 9, 3},
+
120 std::array<int, 3>{9, 4, 3},
+
121 std::array<int, 3>{9, 10, 4},
+
122 std::array<int, 3>{11, 10, 9},
+
123 std::array<int, 3>{11, 6, 10},
+
124 std::array<int, 3>{11, 7, 6},
+
125 std::array<int, 3>{11, 8, 7},
+
126 std::array<int, 3>{11, 9, 8}
+
127 };
+
128
+
129 static std::unordered_map<std::string, SimpleNodeData<Real, Index>> make_corner_nodes()
+
130 {
+
131
+
132 Real R = 1.;
+
133 std::unordered_map<std::string, SimpleNodeData<Real, Index>> base_nodes(N_ICOSA_NODEs);
+
134 base_nodes[hash_node(0)] = {.hash=hash_node(0), .id=0, .pos=r_S1(R, 0., 0.)};
+
135 std::string hash;
+
136 hash.reserve(2);
+
137 for (Index i = 1; i<6; ++i) {
+
138 hash = hash_node(i);
+
139 base_nodes[hash] = {
+
140 .hash=hash,
+
141 .id=i,
+
142 .pos=r_S1(R,
+
143 static_cast<Real>(PI/2. - std::atan(0.5)),
+
144 static_cast<Real>(2.*PI*(static_cast<Real>(i) - 1.)/5.))};
+
145 }
+
146
+
147 for (Index i = 6; i<N_ICOSA_NODEs - 1; ++i) {
+
148 hash = hash_node(i);
+
149 base_nodes[hash] = {
+
150 .hash=hash,
+
151 .id=i,
+
152 .pos=r_S1(R,
+
153 static_cast<Real>(PI/2. + std::atan(0.5)),
+
154 static_cast<Real>(2.*PI*(static_cast<Real>(i) - 6.5)/5.))};
+
155 }
+
156 hash = hash_node(N_ICOSA_NODEs - 1);
+
157 base_nodes[hash] = {
+
158 .hash=hash,
+
159 .id=static_cast<Index>(N_ICOSA_NODEs - 1),
+
160 .pos=r_S1(R, PI, 0._r)};
+
161 return base_nodes;
+
162 }
+
163
+
164 enum TriangleRegion
+
165 {
+
166 TOP_CORNER, BOTTOM_LEFT_CORNER, BOTTOM_RIGHT_CORNER, LEFT_EDGE, BOTTOM_EDGE, DIAGONAL_EDGE, BULK
+
167 };
+
168
+
169 static TriangleRegion get_region(Index i, Index j, Index sizeMinOne)
+
170 {
+
171 if (i==0) { return TOP_CORNER; }
+
172 else if (j==0 && i==sizeMinOne) { return BOTTOM_LEFT_CORNER; }
+
173 else if (j==sizeMinOne && i==sizeMinOne) { return BOTTOM_RIGHT_CORNER; }
+
174 else if (j==0) { return LEFT_EDGE; }
+
175 else if (i==sizeMinOne) { return BOTTOM_EDGE; }
+
176 else if (i==j) { return DIAGONAL_EDGE; }
+
177 else { return BULK; }
+
178 }
+
179
+
180 static std::string hash_any(Index c0, Index c1, Index c2, Index i, Index j, Index maxIdx)
+
181 {
+
182 switch (get_region(i, j, maxIdx)) {
+
183 case TOP_CORNER:return hash_node(c0);
+
184 case BOTTOM_LEFT_CORNER:return hash_node(c1);
+
185 case BOTTOM_RIGHT_CORNER:return hash_node(c2);
+
186 case LEFT_EDGE:return hash_node(c0, c1, i);
+
187 case BOTTOM_EDGE:return hash_node(c1, c2, j);
+
188 case DIAGONAL_EDGE:return hash_node(c0, c2, j);
+
189 case BULK:return hash_node(c0, c1, c2, i, j);
+
190 default:
+
191 std::cerr<<"something went wrong! provided indices i: "
+
192 <<i<<" and j: "
+
193 <<j<<" together with the maxIdx: "<<maxIdx
+
194 <<" produced a wrong region.\n";
+
195 exit(12);
+
196 }
+
197 }
+
198
+
199 static std::vector<std::string> neighbour_hash_vec(Index c0, Index c1, Index c2, Index i, Index j, Index maxIdx)
+
200 {
+
201 std::vector<std::string> neighbour_hash;
+
202 neighbour_hash.reserve(6);
+
203 switch (get_region(i, j, maxIdx)) {
+
204
+
205 case TOP_CORNER:neighbour_hash.push_back(hash_any(c0, c1, c2, 1, 0, maxIdx));
+
206 neighbour_hash.push_back(hash_any(c0, c1, c2, 1, 1, maxIdx));
+
207 return neighbour_hash;
+
208
+
209 case BOTTOM_LEFT_CORNER:neighbour_hash.push_back(hash_any(c0, c1, c2, i, j + 1, maxIdx));
+
210 neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j, maxIdx));
+
211 return neighbour_hash;
+
212
+
213 case BOTTOM_RIGHT_CORNER:neighbour_hash.push_back(hash_any(c0, c1, c2, i, j - 1, maxIdx));
+
214 neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j - 1, maxIdx));
+
215 return neighbour_hash;
+
216
+
217 case LEFT_EDGE:neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j, maxIdx));
+
218 neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j, maxIdx));
+
219 neighbour_hash.push_back(hash_any(c0, c1, c2, i, j + 1, maxIdx));
+
220 neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j + 1, maxIdx));
+
221 return neighbour_hash;
+
222
+
223 case BOTTOM_EDGE:neighbour_hash.push_back(hash_any(c0, c1, c2, i, j - 1, maxIdx));
+
224 neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j - 1, maxIdx));
+
225 neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j, maxIdx));
226 neighbour_hash.push_back(hash_any(c0, c1, c2, i, j + 1, maxIdx));
-
227 neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j + 1, maxIdx));
-
228 return neighbour_hash;
-
229
-
230 case BOTTOM_EDGE:neighbour_hash.push_back(hash_any(c0, c1, c2, i, j - 1, maxIdx));
-
231 neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j - 1, maxIdx));
-
232 neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j, maxIdx));
-
233 neighbour_hash.push_back(hash_any(c0, c1, c2, i, j + 1, maxIdx));
-
234 return neighbour_hash;
-
235
-
236 case DIAGONAL_EDGE:neighbour_hash.push_back(hash_any(c0, c1, c2, i, j - 1, maxIdx));
-
237 neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j - 1, maxIdx));
-
238 neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j, maxIdx));
+
227 return neighbour_hash;
+
228
+
229 case DIAGONAL_EDGE:neighbour_hash.push_back(hash_any(c0, c1, c2, i, j - 1, maxIdx));
+
230 neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j - 1, maxIdx));
+
231 neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j, maxIdx));
+
232 neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j + 1, maxIdx));
+
233 return neighbour_hash;
+
234
+
235 case BULK:neighbour_hash.push_back(hash_any(c0, c1, c2, i, j - 1, maxIdx));
+
236 neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j - 1, maxIdx));
+
237 neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j, maxIdx));
+
238 neighbour_hash.push_back(hash_any(c0, c1, c2, i, j + 1, maxIdx));
239 neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j + 1, maxIdx));
-
240 return neighbour_hash;
-
241
-
242 case BULK:neighbour_hash.push_back(hash_any(c0, c1, c2, i, j - 1, maxIdx));
-
243 neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j - 1, maxIdx));
-
244 neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j, maxIdx));
-
245 neighbour_hash.push_back(hash_any(c0, c1, c2, i, j + 1, maxIdx));
-
246 neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j + 1, maxIdx));
-
247 neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j, maxIdx));
-
248 return neighbour_hash;
-
249 default:
-
250 std::cerr<<"something went wrong! provided indices i: "
-
251 <<i<<" and j: "
-
252 <<j<<" together with the maxIdx: "<<maxIdx
-
253 <<" produced a wrong region.\n";
-
254 exit(12);
-
255 }
-
256
-
257 }
-
258
-
259 static Real even_angular_distance_length(Real l, Index k, Index n, Real R = 1.)
-
260 {
-
265 if (k==0) {
-
266 return 0;
-
267 }
-
268 else {
-
269 Real fr = static_cast<Real>(k)/static_cast<Real>(n);
-
270 Real denominator = static_cast<Real>(l + std::sqrt(4.*R*R - l*l)/std::tan(fr*2.*asin(l/(2.*R))));
-
271 return static_cast<Real>(2.)*R*R/denominator;
-
272 }
-
273 }
-
274
-
275 static vec3<Real> get_pos(vec3<Real> const& p0, vec3<Real> const& p1, vec3<Real> const& p2, Index i, Index j, Index maxIdx)
-
276 {
-
288 vec3<Real> e1 = p1 - p0;
-
289 vec3<Real> e2 = p2 - p0;
-
290 auto e = e1.norm();
-
291 Real wi = even_angular_distance_length(e, i, maxIdx);
-
292
-
293 e1.normalize();
-
294 e2.normalize();
-
295
-
296 vec3<Real> li{};
-
297 Real li_norm{0};
-
298 vec3<Real> interm_1 = p0 + wi*e1;
-
299 interm_1.normalize();
-
300 if (i!=0) {
-
301 vec3<Real> interm_2 = p0 + wi*e2;
-
302 interm_2.normalize();
-
303
-
304 li = interm_2 - interm_1;
-
305 li_norm = li.norm();
-
306 li.normalize();
-
307 }
-
308 Real wj = even_angular_distance_length(li_norm, j, i);
-
309 return interm_1 + wj*li;
-
310 }
-
311
-
312 static std::tuple<Index, Index, Index> get_sorted_face_nodes(std::array<int, 3> face)
+
240 neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j, maxIdx));
+
241 return neighbour_hash;
+
242 default:
+
243 std::cerr<<"something went wrong! provided indices i: "
+
244 <<i<<" and j: "
+
245 <<j<<" together with the maxIdx: "<<maxIdx
+
246 <<" produced a wrong region.\n";
+
247 exit(12);
+
248 }
+
249
+
250 }
+
251
+
252 static Real even_angular_distance_length(Real l, Index k, Index n, Real R = 1.)
+
253 {
+
258 if (k==0) {
+
259 return 0;
+
260 }
+
261 else {
+
262 Real fr = static_cast<Real>(k)/static_cast<Real>(n);
+
263 Real denominator = static_cast<Real>(l + std::sqrt(4.*R*R - l*l)/std::tan(fr*2.*asin(l/(2.*R))));
+
264 return static_cast<Real>(2.)*R*R/denominator;
+
265 }
+
266 }
+
267
+
268 static vec3<Real> get_pos(vec3<Real> const& p0, vec3<Real> const& p1, vec3<Real> const& p2, Index i, Index j, Index maxIdx)
+
269 {
+
281 vec3<Real> e1 = p1 - p0;
+
282 vec3<Real> e2 = p2 - p0;
+
283 auto e = e1.norm();
+
284 Real wi = even_angular_distance_length(e, i, maxIdx);
+
285
+
286 e1.normalize();
+
287 e2.normalize();
+
288
+
289 vec3<Real> li{};
+
290 Real li_norm{0};
+
291 vec3<Real> interm_1 = p0 + wi*e1;
+
292 interm_1.normalize();
+
293 if (i!=0) {
+
294 vec3<Real> interm_2 = p0 + wi*e2;
+
295 interm_2.normalize();
+
296
+
297 li = interm_2 - interm_1;
+
298 li_norm = li.norm();
+
299 li.normalize();
+
300 }
+
301 Real wj = even_angular_distance_length(li_norm, j, i);
+
302 return interm_1 + wj*li;
+
303 }
+
304
+
305 static std::tuple<Index, Index, Index> get_sorted_face_nodes(std::array<int, 3> face)
+
306 {
+
307 std::sort(face.begin(), face.end());
+
308 return {static_cast<Index>(face[0]),
+
309 static_cast<Index>(face[1]),
+
310 static_cast<Index>(face[2])};
+
311 }
+
312 static void make_face_nodes(std::unordered_map<std::string, SimpleNodeData<Real, Index>>& node_cache, Index nIter)
313 {
-
314 std::sort(face.begin(), face.end());
-
315 return {static_cast<Index>(face[0]),
-
316 static_cast<Index>(face[1]),
-
317 static_cast<Index>(face[2])};
-
318 }
-
319 static void make_face_nodes(std::unordered_map<std::string, SimpleNodeData<Real, Index>>& node_cache, Index nIter)
-
320 {
-
321 vec3<Real> p0, p1, p2, pos;
-
322 Index nEdge = nIter + 2;// total Number of nodes on an edge
-
323 Index maxIdx = nIter + 1;// max value i or j can have
-
324
-
325 std::string hash;
-
326 hash.reserve(10);
-
327
-
328 std::string c0_h, c1_h, c2_h;
-
329 for (auto face: FACE_CORNER_NODES) {
-
330 auto[c0, c1, c2] = get_sorted_face_nodes(face);
-
331 c0_h = hash_node(c0);
-
332 c1_h = hash_node(c1);
-
333 c2_h = hash_node(c2);
-
334 p0 = node_cache[c0_h].pos;
-
335 p1 = node_cache[c1_h].pos;
-
336 p2 = node_cache[c2_h].pos;
-
337 for (Index i = 0; i<nEdge; ++i) {
-
338 for (Index j = 0; j<=i; ++j) {
-
339 pos = get_pos(p0, p1, p2, i, j, maxIdx);
-
340 hash = hash_any(c0, c1, c2, i, j, maxIdx);
-
341 node_cache[hash] = {.hash=hash, .pos=pos};
-
342 }
-
343 }
-
344 }
-
345
-
346 for (auto face: FACE_CORNER_NODES) {
-
347// std::sort(face.begin(),face.end());
-
348// auto [c0, c1, c2] = face;
-
349 auto[c0, c1, c2] = get_sorted_face_nodes(face);
-
350 for (Index i = 0; i<nEdge; ++i) {
-
351 for (Index j = 0; j<=i; ++j) {
-
352 hash = hash_any(c0, c1, c2, i, j, maxIdx);
-
353 std::vector<std::string> neighbour_hashes = neighbour_hash_vec(c0, c1, c2, i, j, maxIdx);
-
354 for (auto const& neighbour_hash: neighbour_hashes) {
-
355 node_cache[hash].nn_hashes.insert(neighbour_hash);
-
356 node_cache[neighbour_hash].nn_hashes.insert(hash);
-
357 }
-
358 }
-
359 }
-
360 for (Index idx = 0; auto& nodeEl: node_cache) {
-
361 nodeEl.second.id = idx;
-
362 ++idx;
-
363 }
-
364
-
365 }
-
366
-
367 }
-
368};
-
369
-
371template<floating_point_number Real, indexing_number Index>
-
372class PlanarTriangulation{
-
373 Index n_length;
-
374public:
-
375 std::vector<std::vector<Index>> nn_ids;
-
376 std::vector<bool> is_bulk;
-
377 [[nodiscard]] Index ij_to_id(Index i, Index j){return i*n_length+j;}
-
378 [[nodiscard]] Index id_to_i(Index id){return id/n_length;}
-
379 [[nodiscard]] Index id_to_j(Index id){return id%n_length;}
-
380
-
381 // TL T TR
-
382 // L R
-
383 // BL B BR
-
384
-
385 [[nodiscard]] Index TL(Index id){ return ij_to_id(id_to_i(id)-1, id_to_j(id)-1);}
-
386 [[nodiscard]] Index T (Index id){ return ij_to_id(id_to_i(id)-1, id_to_j(id) );}
-
387 [[nodiscard]] Index TR(Index id){ return ij_to_id(id_to_i(id)-1, id_to_j(id)+1);}
-
388 [[nodiscard]] Index L(Index id){ return ij_to_id(id_to_i(id) , id_to_j(id)-1);}
-
389 [[nodiscard]] Index R(Index id){ return ij_to_id(id_to_i(id) , id_to_j(id)+1);}
-
390 [[nodiscard]] Index BL(Index id){ return ij_to_id(id_to_i(id)+1, id_to_j(id)-1);}
-
391 [[nodiscard]] Index B (Index id){ return ij_to_id(id_to_i(id)+1, id_to_j(id) );}
-
392 [[nodiscard]] Index BR(Index id){ return ij_to_id(id_to_i(id)+1, id_to_j(id)+1);}
-
393
-
394 [[nodiscard]] std::vector<Index> bulk_odd_j_neighbor_ids(Index id){
-
395 return { B(id), R(id), TR(id), T(id), TL(id), L(id) };
-
396 }
-
397
-
398 [[nodiscard]] std::vector<Index> bulk_even_j_neighbor_ids(Index id){
-
399 return { T(id), L(id), BL(id), B(id), BR(id), R(id) };
-
400 }
-
401
-
402 [[nodiscard]] std::vector<Index> top_boundary_odd_j_neighbor_ids(Index id){
-
403 return { L(id), B(id), R(id) };
-
404 }
-
405
-
406 [[nodiscard]] std::vector<Index> top_boundary_even_j_neighbor_ids(Index id){
-
407 return { L(id), BL(id), B(id), BR(id), R(id) };
-
408 }
-
409
-
410 [[nodiscard]] std::vector<Index> bottom_boundary_odd_j_neighbor_ids(Index id){
-
411 return { R(id), TR(id), T(id), TL(id), L(id) };
-
412 }
-
413
-
414 [[nodiscard]] std::vector<Index> bottom_boundary_even_j_neighbor_ids(Index id){
-
415 return { T(id), L(id), R(id) };
-
416 }
-
417
-
418 [[nodiscard]] std::vector<Index> left_boundary_neighbor_ids(Index id){
-
419 return { T(id), B(id), BR(id), R(id)};
-
420 }
-
421
-
422 [[nodiscard]] std::vector<Index> right_boundary_odd_j_neighbor_ids(Index id){
-
423 return { T(id), TL(id), L(id), B(id) };
-
424 }
+
314 vec3<Real> p0, p1, p2, pos;
+
315 Index nEdge = nIter + 2;// total Number of nodes on an edge
+
316 Index maxIdx = nIter + 1;// max value i or j can have
+
317
+
318 std::string hash;
+
319 hash.reserve(10);
+
320
+
321 std::string c0_h, c1_h, c2_h;
+
322 for (auto const& face: FACE_CORNER_NODES) {
+
323 auto[c0, c1, c2] = get_sorted_face_nodes(face);
+
324 c0_h = hash_node(c0);
+
325 c1_h = hash_node(c1);
+
326 c2_h = hash_node(c2);
+
327 p0 = node_cache[c0_h].pos;
+
328 p1 = node_cache[c1_h].pos;
+
329 p2 = node_cache[c2_h].pos;
+
330 for (Index i = 0; i<nEdge; ++i) {
+
331 for (Index j = 0; j<=i; ++j) {
+
332 pos = get_pos(p0, p1, p2, i, j, maxIdx);
+
333 hash = hash_any(c0, c1, c2, i, j, maxIdx);
+
334 node_cache[hash] = {.hash=hash, .pos=pos};
+
335 }
+
336 }
+
337 }
+
338
+
339 for (auto face: FACE_CORNER_NODES) {
+
340// std::sort(face.begin(),face.end());
+
341// auto [c0, c1, c2] = face;
+
342 auto[c0, c1, c2] = get_sorted_face_nodes(face);
+
343 for (Index i = 0; i<nEdge; ++i) {
+
344 for (Index j = 0; j<=i; ++j) {
+
345 hash = hash_any(c0, c1, c2, i, j, maxIdx);
+
346 std::vector<std::string> neighbour_hashes = neighbour_hash_vec(c0, c1, c2, i, j, maxIdx);
+
347 for (auto const& neighbour_hash: neighbour_hashes) {
+
348 node_cache[hash].nn_hashes.insert(neighbour_hash);
+
349 node_cache[neighbour_hash].nn_hashes.insert(hash);
+
350 }
+
351 }
+
352 }
+
353 for (Index idx = 0; auto& nodeEl: node_cache) {
+
354 nodeEl.second.id = idx;
+
355 ++idx;
+
356 }
+
357
+
358 }
+
359
+
360 }
+
361};
+
362
+
364template<floating_point_number Real, indexing_number Index>
+
365class PlanarTriangulation{
+
366 Index n_length;
+
367public:
+
368 std::vector<std::vector<Index>> nn_ids;
+
369 std::vector<bool> is_bulk;
+
370 [[nodiscard]] Index ij_to_id(Index i, Index j){return i*n_length+j;}
+
371 [[nodiscard]] Index id_to_i(Index id){return id/n_length;}
+
372 [[nodiscard]] Index id_to_j(Index id){return id%n_length;}
+
373
+
374 // TL T TR
+
375 // L R
+
376 // BL B BR
+
377
+
378 [[nodiscard]] Index TL(Index id){ return ij_to_id(id_to_i(id)-1, id_to_j(id)-1);}
+
379 [[nodiscard]] Index T (Index id){ return ij_to_id(id_to_i(id)-1, id_to_j(id) );}
+
380 [[nodiscard]] Index TR(Index id){ return ij_to_id(id_to_i(id)-1, id_to_j(id)+1);}
+
381 [[nodiscard]] Index L(Index id){ return ij_to_id(id_to_i(id) , id_to_j(id)-1);}
+
382 [[nodiscard]] Index R(Index id){ return ij_to_id(id_to_i(id) , id_to_j(id)+1);}
+
383 [[nodiscard]] Index BL(Index id){ return ij_to_id(id_to_i(id)+1, id_to_j(id)-1);}
+
384 [[nodiscard]] Index B (Index id){ return ij_to_id(id_to_i(id)+1, id_to_j(id) );}
+
385 [[nodiscard]] Index BR(Index id){ return ij_to_id(id_to_i(id)+1, id_to_j(id)+1);}
+
386
+
387 [[nodiscard]] std::vector<Index> bulk_odd_j_neighbor_ids(Index id){
+
388 return { B(id), R(id), TR(id), T(id), TL(id), L(id) };
+
389 }
+
390
+
391 [[nodiscard]] std::vector<Index> bulk_even_j_neighbor_ids(Index id){
+
392 return { T(id), L(id), BL(id), B(id), BR(id), R(id) };
+
393 }
+
394
+
395 [[nodiscard]] std::vector<Index> top_boundary_odd_j_neighbor_ids(Index id){
+
396 return { L(id), B(id), R(id) };
+
397 }
+
398
+
399 [[nodiscard]] std::vector<Index> top_boundary_even_j_neighbor_ids(Index id){
+
400 return { L(id), BL(id), B(id), BR(id), R(id) };
+
401 }
+
402
+
403 [[nodiscard]] std::vector<Index> bottom_boundary_odd_j_neighbor_ids(Index id){
+
404 return { R(id), TR(id), T(id), TL(id), L(id) };
+
405 }
+
406
+
407 [[nodiscard]] std::vector<Index> bottom_boundary_even_j_neighbor_ids(Index id){
+
408 return { T(id), L(id), R(id) };
+
409 }
+
410
+
411 [[nodiscard]] std::vector<Index> left_boundary_neighbor_ids(Index id){
+
412 return { T(id), B(id), BR(id), R(id)};
+
413 }
+
414
+
415 [[nodiscard]] std::vector<Index> right_boundary_odd_j_neighbor_ids(Index id){
+
416 return { T(id), TL(id), L(id), B(id) };
+
417 }
+
418
+
419 [[nodiscard]] std::vector<Index> right_boundary_even_j_neighbor_ids(Index id){
+
420 return { T(id), L(id), BL(id), B(id) };
+
421 }
+
422
+
423 PlanarTriangulation(Index n_length_inp, Index n_width):n_length(n_length_inp){
+
424 Index N_nodes = n_length*n_width;
425
-
426 [[nodiscard]] std::vector<Index> right_boundary_even_j_neighbor_ids(Index id){
-
427 return { T(id), L(id), BL(id), B(id) };
-
428 }
-
429
-
430 PlanarTriangulation(Index n_length_inp, Index n_width):n_length(n_length_inp){
-
431 Index N_nodes = n_length*n_width;
-
432
-
433 nn_ids.resize(N_nodes);
-
434 is_bulk.resize(N_nodes,false);
-
435 // populate_bulk
-
436 for(Index i=1; i<n_width-1;++i){
-
437 for(Index j=1; j<n_length-1;++j){
-
438 Index bulk_id = ij_to_id(i,j);
-
439 is_bulk[bulk_id] = true;
-
440 if(j%2==0){
-
441 nn_ids[bulk_id] = bulk_even_j_neighbor_ids(bulk_id);
-
442 }else{
-
443 nn_ids[bulk_id] = bulk_odd_j_neighbor_ids(bulk_id);
-
444 }
-
445 }
-
446 }
-
447
-
448 // populate top and bottom boundaries
-
449 for (Index j = 1; j<n_length-1; ++j) {
-
450 Index i = 0;
-
451 Index id = ij_to_id(i,j);
-
452 if (j%2==0) {
-
453 nn_ids[id] = top_boundary_even_j_neighbor_ids(id);
-
454 }else{
-
455 nn_ids[id] = top_boundary_odd_j_neighbor_ids(id);
-
456 }
-
457
-
458 i = n_width-1;
-
459 id = ij_to_id(i,j);
-
460 if (j%2==0) {
-
461 nn_ids[id] = bottom_boundary_even_j_neighbor_ids(id);
-
462 }else{
-
463 nn_ids[id] = bottom_boundary_odd_j_neighbor_ids(id);
-
464 }
-
465 }
-
466
-
467 // populate left and right boundaries
-
468 for (Index i = 1; i<n_width-1; ++i) {
-
469 Index j = 0;
-
470 Index id = ij_to_id(i,j);
-
471 nn_ids[id] = left_boundary_neighbor_ids(id);
-
472
-
473 j = n_length-1;
-
474 id = ij_to_id(i,j);
-
475 if (j%2==0) {
-
476 nn_ids[id] = right_boundary_even_j_neighbor_ids(id);
-
477 }else{
-
478 nn_ids[id] = right_boundary_odd_j_neighbor_ids(id);
-
479 }
-
480 }
-
481
-
482 // populate top left corner
-
483 nn_ids[0] = std::vector<Index>{B(0), BR(0), R(0)};
-
484 // populate bottom left corner
-
485 Index bottom_left_id = ij_to_id(n_width-1,0);
-
486 nn_ids[bottom_left_id] = std::vector<Index>{R(bottom_left_id), T(bottom_left_id)}; //Todo this bond will never flip
-
487 // populate top and bottom right corner
-
488 Index top_right_id = n_length-1;
-
489 Index bottom_right_id = N_nodes-1;
-
490 if((n_length-1)%2==0){
-
491 nn_ids[top_right_id] = {L(top_right_id), BL(top_right_id), B(top_right_id)};
-
492 nn_ids[bottom_right_id] = {T(bottom_right_id), L(bottom_right_id)};// Todo this bond will never flip
-
493 }else{
-
494 nn_ids[top_right_id] = {L(top_right_id), /*BL(top_right_id),*/ B(top_right_id)}; // Todo this bond will never flip
-
495 nn_ids[bottom_right_id] = {T(bottom_right_id), TL(bottom_right_id), L(bottom_right_id),};// Todo this bond will never flip
-
496 }
-
497
-
498
-
499 }
-
500};
-
501}
-
502#endif //FLIPPY_TRIANGULATOR_HPP
+
426 nn_ids.resize(N_nodes);
+
427 is_bulk.resize(N_nodes,false);
+
428 // populate_bulk
+
429 for(Index i=1; i<n_width-1;++i){
+
430 for(Index j=1; j<n_length-1;++j){
+
431 Index bulk_id = ij_to_id(i,j);
+
432 is_bulk[bulk_id] = true;
+
433 if(j%2==0){
+
434 nn_ids[bulk_id] = bulk_even_j_neighbor_ids(bulk_id);
+
435 }else{
+
436 nn_ids[bulk_id] = bulk_odd_j_neighbor_ids(bulk_id);
+
437 }
+
438 }
+
439 }
+
440
+
441 // populate top and bottom boundaries
+
442 for (Index j = 1; j<n_length-1; ++j) {
+
443 Index i = 0;
+
444 Index id = ij_to_id(i,j);
+
445 if (j%2==0) {
+
446 nn_ids[id] = top_boundary_even_j_neighbor_ids(id);
+
447 }else{
+
448 nn_ids[id] = top_boundary_odd_j_neighbor_ids(id);
+
449 }
+
450
+
451 i = n_width-1;
+
452 id = ij_to_id(i,j);
+
453 if (j%2==0) {
+
454 nn_ids[id] = bottom_boundary_even_j_neighbor_ids(id);
+
455 }else{
+
456 nn_ids[id] = bottom_boundary_odd_j_neighbor_ids(id);
+
457 }
+
458 }
+
459
+
460 // populate left and right boundaries
+
461 for (Index i = 1; i<n_width-1; ++i) {
+
462 Index j = 0;
+
463 Index id = ij_to_id(i,j);
+
464 nn_ids[id] = left_boundary_neighbor_ids(id);
+
465
+
466 j = n_length-1;
+
467 id = ij_to_id(i,j);
+
468 if (j%2==0) {
+
469 nn_ids[id] = right_boundary_even_j_neighbor_ids(id);
+
470 }else{
+
471 nn_ids[id] = right_boundary_odd_j_neighbor_ids(id);
+
472 }
+
473 }
+
474
+
475 // populate top left corner
+
476 nn_ids[0] = std::vector<Index>{B(0), BR(0), R(0)};
+
477 // populate bottom left corner
+
478 Index bottom_left_id = ij_to_id(n_width-1,0);
+
479 nn_ids[bottom_left_id] = std::vector<Index>{R(bottom_left_id), T(bottom_left_id)}; //Todo this bond will never flip
+
480 // populate top and bottom right corner
+
481 Index top_right_id = n_length-1;
+
482 Index bottom_right_id = N_nodes-1;
+
483 if((n_length-1)%2==0){
+
484 nn_ids[top_right_id] = {L(top_right_id), BL(top_right_id), B(top_right_id)};
+
485 nn_ids[bottom_right_id] = {T(bottom_right_id), L(bottom_right_id)};// Todo this bond will never flip
+
486 }else{
+
487 nn_ids[top_right_id] = {L(top_right_id), /*BL(top_right_id),*/ B(top_right_id)}; // Todo this bond will never flip
+
488 nn_ids[bottom_right_id] = {T(bottom_right_id), TL(bottom_right_id), L(bottom_right_id),};// Todo this bond will never flip
+
489 }
+
490
+
491
+
492 }
+
493};
+
494}
+
495#endif //FLIPPY_TRIANGULATOR_HPP
This file contains the concepts that are costomly defined for the flippy class templates.
-
#define M_PI
The M_PI macro is not defined on for all compilers, so it is defined here (if a definition does not a...
Definition Triangulator.hpp:23
-
Definition stlSerializer.hpp:9
+
Definition custom_concepts.hpp:38
Header file containing the definition and implementation a 3 dimensional vector class,...
@@ -573,7 +572,7 @@ diff --git a/docs/annotated.html b/docs/annotated.html old mode 100644 new mode 100755 index 33a6865..2a4ce35 --- a/docs/annotated.html +++ b/docs/annotated.html @@ -3,16 +3,18 @@ - + flippy: Class List + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -103,22 +110,29 @@
Here are the classes, structs, unions and interfaces with brief descriptions:
-
[detail level 123]
- - - - - - - - - - - - - - - +
[detail level 123]
 Nfp
 Nimplementation
 CrawSTLSolid
 CrawSTLTriangle
 CstlNode
 CstlSerializer
 CstlTriangle
 CBondFlipDataA helper struct; keeps track of bond flips
 CGeometryA helper struct. Used by the triangulation class to pass data around in one convenient package
 CMonteCarloUpdaterA helper class for updating the triangulation, using Metropolis–Hastings algorithm. This is a high-level interface intended to implement a basic Monte-Carlo updating scheme, which should be sufficient for a lot of simple situations
 CNeighbors
 CNodeA data structure containing all geometric and topological information associated with a node
 CNodesData structure containing all nodes of the Triangulation
 CTriangulationImplementation of Triangulation of two-dimensional surfaces in 3D
 Cvec3Internal implementation of a 3D vector
+ + + + + + + + + + + + + + + + + + + + + +
 Nfp
 Nexperimental
 CcsvGlobalsSaver
 CDataSaver
 CjsonDataSaver
 CxyzDataSaver
 CxyzProperty
 Nimplementation
 CrawSTLSolid
 CrawSTLTriangle
 CstlNode
 CstlSerializer
 CstlTriangle
 CBondFlipDataA helper struct; keeps track of bond flips
 CDynamicDisplacementUpdater
 CGeometryA helper struct. Used by the triangulation class to pass data around in one convenient package
 CMonteCarloUpdaterA helper class for updating the triangulation, using Metropolis–Hastings algorithm. This is a high-level interface intended to implement a basic Monte-Carlo updating scheme, which should be sufficient for a lot of simple situations
 CNeighbors
 CNodeA data structure containing all geometric and topological information associated with a node
 CNodesData structure containing all nodes of the Triangulation
 CTriangulationImplementation of Triangulation of two-dimensional surfaces in 3D
 Cvec3Internal implementation of a 3D vector
@@ -126,7 +140,7 @@ diff --git a/docs/annotated_dup.js b/docs/annotated_dup.js old mode 100644 new mode 100755 index 63192df..1716c3a --- a/docs/annotated_dup.js +++ b/docs/annotated_dup.js @@ -1,6 +1,13 @@ var annotated_dup = [ [ "fp", "namespacefp.html", [ + [ "experimental", null, [ + [ "csvGlobalsSaver", "classfp_1_1experimental_1_1csv_globals_saver.html", null ], + [ "DataSaver", "classfp_1_1experimental_1_1_data_saver.html", null ], + [ "jsonDataSaver", "classfp_1_1experimental_1_1json_data_saver.html", null ], + [ "xyzDataSaver", "classfp_1_1experimental_1_1xyz_data_saver.html", null ], + [ "xyzProperty", "structfp_1_1experimental_1_1xyz_property.html", null ] + ] ], [ "implementation", "namespacefp_1_1implementation.html", [ [ "rawSTLSolid", "structfp_1_1implementation_1_1raw_s_t_l_solid.html", null ], [ "rawSTLTriangle", "structfp_1_1implementation_1_1raw_s_t_l_triangle.html", null ], @@ -9,6 +16,7 @@ var annotated_dup = [ "stlTriangle", "classfp_1_1implementation_1_1stl_triangle.html", null ] ] ], [ "BondFlipData", "structfp_1_1_bond_flip_data.html", "structfp_1_1_bond_flip_data" ], + [ "DynamicDisplacementUpdater", "classfp_1_1_dynamic_displacement_updater.html", null ], [ "Geometry", "structfp_1_1_geometry.html", "structfp_1_1_geometry" ], [ "MonteCarloUpdater", "classfp_1_1_monte_carlo_updater.html", "classfp_1_1_monte_carlo_updater" ], [ "Neighbors", "structfp_1_1_neighbors.html", "structfp_1_1_neighbors" ], diff --git a/docs/bc_s.png b/docs/bc_s.png old mode 100644 new mode 100755 diff --git a/docs/bc_sd.png b/docs/bc_sd.png old mode 100644 new mode 100755 diff --git a/docs/classes.html b/docs/classes.html old mode 100644 new mode 100755 index c69992d..649ceec --- a/docs/classes.html +++ b/docs/classes.html @@ -3,16 +3,18 @@ - + flippy: Class Index + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -102,39 +109,51 @@
Class Index
-
B | G | M | N | R | S | T | V
+
B | C | D | G | J | M | N | R | S | T | V | X
diff --git a/docs/classfp_1_1_dynamic_displacement_updater-members.html b/docs/classfp_1_1_dynamic_displacement_updater-members.html new file mode 100755 index 0000000..65c4919 --- /dev/null +++ b/docs/classfp_1_1_dynamic_displacement_updater-members.html @@ -0,0 +1,130 @@ + + + + + + + +flippy: Member List + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
fp::DynamicDisplacementUpdater Member List
+
+
+ +

This is the complete list of members for fp::DynamicDisplacementUpdater, including all inherited members.

+ + + + + + + +
DynamicDisplacementUpdater(Real initial_displacement, Real displacement_adaptation_step_size, Real p_target) (defined in fp::DynamicDisplacementUpdater)fp::DynamicDisplacementUpdaterinline
new_displ_distr() (defined in fp::DynamicDisplacementUpdater)fp::DynamicDisplacementUpdaterinline
new_displacement_magnitude() (defined in fp::DynamicDisplacementUpdater)fp::DynamicDisplacementUpdaterinline
probability_aggregator(std::optional< Real > e_diff, Real kBt) (defined in fp::DynamicDisplacementUpdater)fp::DynamicDisplacementUpdaterinline
reset_target_acceptance_probability(Real p_target) (defined in fp::DynamicDisplacementUpdater)fp::DynamicDisplacementUpdaterinline
target_acceptance_probability() const (defined in fp::DynamicDisplacementUpdater)fp::DynamicDisplacementUpdaterinline
+
+ + + + diff --git a/docs/classfp_1_1_dynamic_displacement_updater.html b/docs/classfp_1_1_dynamic_displacement_updater.html new file mode 100755 index 0000000..7c89ddf --- /dev/null +++ b/docs/classfp_1_1_dynamic_displacement_updater.html @@ -0,0 +1,150 @@ + + + + + + + +flippy: fp::DynamicDisplacementUpdater Class Reference + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
fp::DynamicDisplacementUpdater Class Reference
+
+
+ + + + + + + + + + + + + + +

+Public Member Functions

DynamicDisplacementUpdater (Real initial_displacement, Real displacement_adaptation_step_size, Real p_target)
 
+Real new_displacement_magnitude ()
 
+std::uniform_real_distribution< Real > new_displ_distr ()
 
+void probability_aggregator (std::optional< Real > e_diff, Real kBt)
 
+void reset_target_acceptance_probability (Real p_target)
 
+Real target_acceptance_probability () const
 
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/docs/classfp_1_1_monte_carlo_updater-members.html b/docs/classfp_1_1_monte_carlo_updater-members.html old mode 100644 new mode 100755 index 4b34d9a..ad46242 --- a/docs/classfp_1_1_monte_carlo_updater-members.html +++ b/docs/classfp_1_1_monte_carlo_updater-members.html @@ -3,16 +3,18 @@ - + flippy: Member List + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -99,34 +106,34 @@
-
fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type > Member List
+
fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine > Member List
-

This is the complete list of members for fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >, including all inherited members.

+

This is the complete list of members for fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >, including all inherited members.

- - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
bond_length_flip_rejection_count() constfp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
bond_length_move_rejection_count() constfp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
flip_attempt_count() constfp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
flip_back_count() constfp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
flip_MC_updater(fp::Node< Real, Index > const &node)fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
flip_MC_updater(fp::Node< Real, Index > const &node, Index id_in_nn_ids)fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
kBT()fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
MonteCarloUpdater(fp::Triangulation< Real, Index, triangulation_type > &triangulation_inp, EnergyFunctionParameters const &prms_inp, std::function< Real(fp::Node< Real, Index > const &, fp::Triangulation< Real, Index, triangulation_type > const &, EnergyFunctionParameters const &)> energy_function_inp, RandomNumberEngine &rng_inp, Real min_bond_length, Real max_bond_length)fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
move_attempt_count() constfp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
move_back_count() constfp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
move_MC_updater(fp::Node< Real, Index > const &node, fp::vec3< Real > const &displacement)fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
move_needs_undoing()fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
new_neighbour_distances_are_between_min_and_max_length(fp::Node< Real, Index > const &node, fp::vec3< Real > const &displacement)fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
new_next_neighbour_distances_are_between_min_and_max_length(fp::Node< Real, Index > const &node, fp::vec3< Real > const &displacement)fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
new_verlet_neighbour_distances_are_between_min_and_max_length(fp::Node< Real, Index > const &node, fp::vec3< Real > const &displacement)fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
reset_kBT(Real kBT)fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >inline
bond_length_flip_rejection_count() constfp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
bond_length_move_rejection_count() constfp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
flip_attempt_count() constfp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
flip_back_count() constfp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
flip_MC_updater(fp::Node const &node)fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
flip_MC_updater(fp::Node const &node, Index id_in_nn_ids)fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
kBT()fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
MonteCarloUpdater(fp::Triangulation &triangulation_inp, EnergyFunctionParameters const &prms_inp, EnergyFunctionType energy_function_inp, RandomNumberEngine &rng_inp, Real min_bond_length, Real max_bond_length)fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
move_attempt_count() constfp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
move_back_count() constfp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
move_MC_updater(fp::Node const &node, fp::vec3< Real > const &displacement)fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
move_needs_undoing(Real e_diff)fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
new_neighbour_distances_are_between_min_and_max_length(fp::Node const &node, fp::vec3< Real > const &displacement)fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
new_next_neighbour_distances_are_between_min_and_max_length(fp::Node const &node, fp::vec3< Real > const &displacement)fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
new_verlet_neighbour_distances_are_between_min_and_max_length(fp::Node const &node, fp::vec3< Real > const &displacement)fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
reset_kBT(Real kBT)fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >inline
diff --git a/docs/classfp_1_1_monte_carlo_updater.html b/docs/classfp_1_1_monte_carlo_updater.html old mode 100644 new mode 100755 index 66f7726..233ae7b --- a/docs/classfp_1_1_monte_carlo_updater.html +++ b/docs/classfp_1_1_monte_carlo_updater.html @@ -3,16 +3,18 @@ - + -flippy: fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type > Class Template Reference +flippy: fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine > Class Template Reference + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -102,72 +109,72 @@ -
fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type > Class Template Reference
+
fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine > Class Template Reference

A helper class for updating the triangulation, using Metropolis–Hastings algorithm. This is a high-level interface intended to implement a basic Monte-Carlo updating scheme, which should be sufficient for a lot of simple situations. - More...

+ More...

#include <MonteCarloUpdater.hpp>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 MonteCarloUpdater (fp::Triangulation< Real, Index, triangulation_type > &triangulation_inp, EnergyFunctionParameters const &prms_inp, std::function< Real(fp::Node< Real, Index > const &, fp::Triangulation< Real, Index, triangulation_type > const &, EnergyFunctionParameters const &)> energy_function_inp, RandomNumberEngine &rng_inp, Real min_bond_length, Real max_bond_length)
 
bool move_needs_undoing ()
 Implementation of the Metropolis algorithm.
 
bool new_neighbour_distances_are_between_min_and_max_length (fp::Node< Real, Index > const &node, fp::vec3< Real > const &displacement)
 Pre-update check to test that the update step will not result in an unphysical configuration.
 
bool new_next_neighbour_distances_are_between_min_and_max_length (fp::Node< Real, Index > const &node, fp::vec3< Real > const &displacement)
 Pre-update check to test that the update step will not result in an unphysical configuration.
 
bool new_verlet_neighbour_distances_are_between_min_and_max_length (fp::Node< Real, Index > const &node, fp::vec3< Real > const &displacement)
 Pre-update check to test that the update step will not result in an unphysical configuration.
 
void move_MC_updater (fp::Node< Real, Index > const &node, fp::vec3< Real > const &displacement)
 Attempt a move Monte Carlo Step.
 
void flip_MC_updater (fp::Node< Real, Index > const &node)
 Attempt a flip Monte Carlo Step.
 
void flip_MC_updater (fp::Node< Real, Index > const &node, Index id_in_nn_ids)
 Attempt a flip Monte Carlo Step.
 
void reset_kBT (Real kBT)
 Reset the temperature of the Monte Carlo updater, at which the Boltzmann weights are evaluated.
 
Real kBT ()
 A getter function that returns a value of a state variable.
 
unsigned long move_attempt_count () const
 A getter function that returns a value of a state variable.
 
unsigned long bond_length_move_rejection_count () const
 A getter function that returns a value of a state variable.
 
unsigned long move_back_count () const
 A getter function that returns a value of a state variable.
 
unsigned long flip_attempt_count () const
 A getter function that returns a value of a state variable.
 
unsigned long bond_length_flip_rejection_count () const
 A getter function that returns a value of a state variable.
 
unsigned long flip_back_count () const
 A getter function that returns a value of a state variable.
 
 MonteCarloUpdater (fp::Triangulation &triangulation_inp, EnergyFunctionParameters const &prms_inp, EnergyFunctionType energy_function_inp, RandomNumberEngine &rng_inp, Real min_bond_length, Real max_bond_length)
 
bool move_needs_undoing (Real e_diff)
 Implementation of the Metropolis algorithm.
 
bool new_neighbour_distances_are_between_min_and_max_length (fp::Node const &node, fp::vec3< Real > const &displacement)
 Pre-update check to test that the update step will not result in an unphysical configuration.
 
bool new_next_neighbour_distances_are_between_min_and_max_length (fp::Node const &node, fp::vec3< Real > const &displacement)
 Pre-update check to test that the update step will not result in an unphysical configuration.
 
bool new_verlet_neighbour_distances_are_between_min_and_max_length (fp::Node const &node, fp::vec3< Real > const &displacement)
 Pre-update check to test that the update step will not result in an unphysical configuration.
 
std::optional< Real > move_MC_updater (fp::Node const &node, fp::vec3< Real > const &displacement)
 Attempt a move Monte Carlo Step.
 
void flip_MC_updater (fp::Node const &node)
 Attempt a flip Monte Carlo Step.
 
void flip_MC_updater (fp::Node const &node, Index id_in_nn_ids)
 Attempt a flip Monte Carlo Step.
 
void reset_kBT (Real kBT)
 Reset the temperature of the Monte Carlo updater, at which the Boltzmann weights are evaluated.
 
Real kBT ()
 A getter function that returns a value of a state variable.
 
unsigned long move_attempt_count () const
 A getter function that returns a value of a state variable.
 
unsigned long bond_length_move_rejection_count () const
 A getter function that returns a value of a state variable.
 
unsigned long move_back_count () const
 A getter function that returns a value of a state variable.
 
unsigned long flip_attempt_count () const
 A getter function that returns a value of a state variable.
 
unsigned long bond_length_flip_rejection_count () const
 A getter function that returns a value of a state variable.
 
unsigned long flip_back_count () const
 A getter function that returns a value of a state variable.
 

Detailed Description

-
template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters, typename RandomNumberEngine, TriangulationType triangulation_type>
-class fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >

A helper class for updating the triangulation, using Metropolis–Hastings algorithm. This is a high-level interface intended to implement a basic Monte-Carlo updating scheme, which should be sufficient for a lot of simple situations.

+
template<typename EnergyFunctionParameters, typename RandomNumberEngine>
+class fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >

A helper class for updating the triangulation, using Metropolis–Hastings algorithm. This is a high-level interface intended to implement a basic Monte-Carlo updating scheme, which should be sufficient for a lot of simple situations.

Template Parameters
- - + + @@ -175,57 +182,46 @@

Constructor & Destructor Documentation

- -

◆ MonteCarloUpdater()

+ +

◆ MonteCarloUpdater()

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >
Realtype that will be used for all floating point numbers inside this class/struct. Any data type that satisfies the floating_point_number concept is allowed, for example, float.
Indextype that will be used for all integer numbers inside this class/struct. Any data type that satisfies the indexing_number concept is allowed, for example, unsigned int.
Realtype that will be used for all floating point numbers inside this class/struct. Any data type that satisfies the floating_point_number concept is allowed, for example, float.
Indextype that will be used for all integer numbers inside this class/struct. Any data type that satisfies the indexing_number concept is allowed, for example, unsigned int.
EnergyFunctionParametersA user-defined struct type. An instance of this struct will be part of the input of the energy function. Energy function provided during instantiation must have a third argument of type EnergyFunctionParameters const&.
RandomNumberEnginetype of the random number engine that will be provided during the instantiation of the class. For example std::mt19937_64.
triangulation_typeOne of the types specified by the TriangulationType enum. This must match the type of triangulation provided during the class instantiation.
@@ -249,21 +245,21 @@

Member Function Documentation

- -

◆ move_needs_undoing()

+ +

◆ move_needs_undoing()

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >
- + - - + - - + - - + - - + - - + - - - - - - - +
fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::MonteCarloUpdater fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::MonteCarloUpdater (fp::Triangulation< Real, Index, triangulation_type > & triangulation_inp, fp::Triangulation & triangulation_inp,
EnergyFunctionParameters constprms_inp, EnergyFunctionParameters const & prms_inp,
std::function< Real(fp::Node< Real, Index > const &, fp::Triangulation< Real, Index, triangulation_type > const &, EnergyFunctionParameters const &)> energy_function_inp, EnergyFunctionType energy_function_inp,
RandomNumberEnginerng_inp, RandomNumberEngine & rng_inp,
Real min_bond_length, Real min_bond_length,
Real max_bond_length 
)Real max_bond_length )
@@ -469,11 +501,11 @@

Calculate cross product between two vectors.

-

A static method to calculate cross product between two vectors. Example:

{c++}
-
fp::vec3<double> v1{1,0,0};
-
fp::vec3<double> v2{0,1,0};
-
fp::vec3<double> v3 = cross(v1, v2); // v3 will contain {0,0,1}
-
static vec3< Real > cross(vec3< Real > const &a, vec3< Real > const &b)
Calculate cross product between two vectors.
Definition vec3.hpp:133
+

A static method to calculate cross product between two vectors. Example:

{c++}
+
fp::vec3<double> v1{1,0,0};
+
fp::vec3<double> v2{0,1,0};
+
fp::vec3<double> v3 = cross(v1, v2); // v3 will contain {0,0,1}
+
static vec3< Real > cross(vec3< Real > const &a, vec3< Real > const &b)
Calculate cross product between two vectors.
Definition vec3.hpp:133
Parameters

- + - +
bool fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::move_needs_undoing bool fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::move_needs_undoing ()Real e_diff)
@@ -279,38 +275,38 @@

Here is the caller graph for this function:
-
+
+ + + + + + +
-
-

◆ new_neighbour_distances_are_between_min_and_max_length()

+ +

◆ new_neighbour_distances_are_between_min_and_max_length()

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >
@@ -328,47 +324,52 @@

Returns
true if new_next_neighbour_distances_are_between_min_and_max_length(fp::Node<Real, Index> const&, fp::vec3<Real> const&) and new_verlet_neighbour_distances_are_between_min_and_max_length(fp::Node<Real, Index> const&, fp::vec3<Real> const&) conditions are both satisfied, false otherwise.
+
Returns
true if new_next_neighbour_distances_are_between_min_and_max_length(fp::Node const&, fp::vec3<Real> const&) and new_verlet_neighbour_distances_are_between_min_and_max_length(fp::Node const&, fp::vec3<Real> const&) conditions are both satisfied, false otherwise.
Here is the call graph for this function:
-
+
+ + + + + + +
Here is the caller graph for this function:
-
+
+ + + + +
- -

◆ new_next_neighbour_distances_are_between_min_and_max_length()

+ +

◆ new_next_neighbour_distances_are_between_min_and_max_length()

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >

- + - - + - - - - - - - +
bool fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::new_neighbour_distances_are_between_min_and_max_length bool fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::new_neighbour_distances_are_between_min_and_max_length (fp::Node< Real, Index > constnode, fp::Node const & node,
fp::vec3< Real > constdisplacement 
)fp::vec3< Real > const & displacement )
@@ -391,38 +392,38 @@

Here is the caller graph for this function:
-
+
+ + + + + + +
-
-

◆ new_verlet_neighbour_distances_are_between_min_and_max_length()

+ +

◆ new_verlet_neighbour_distances_are_between_min_and_max_length()

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >

- + - - + - - - - - - - +
bool fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::new_next_neighbour_distances_are_between_min_and_max_length bool fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::new_next_neighbour_distances_are_between_min_and_max_length (fp::Node< Real, Index > constnode, fp::Node const & node,
fp::vec3< Real > constdisplacement 
)fp::vec3< Real > const & displacement )
@@ -444,38 +445,38 @@

Here is the caller graph for this function:
-
+
+ + + + + + +
-
-

◆ move_MC_updater()

+ +

◆ move_MC_updater()

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >

- + - - + - - - - - - - +
bool fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::new_verlet_neighbour_distances_are_between_min_and_max_length bool fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::new_verlet_neighbour_distances_are_between_min_and_max_length (fp::Node< Real, Index > constnode, fp::Node const & node,
fp::vec3< Real > constdisplacement 
)fp::vec3< Real > const & displacement )
@@ -493,30 +494,45 @@

Returns
This function returns the calculated energy difference. If not energy difference was calculated due to bond_length constraint rejection, then an empty optional is returned.
Here is the call graph for this function:
-
+
+ + + + + + + + + + + + + + +
-
-

◆ flip_MC_updater() [1/2]

+ +

◆ flip_MC_updater() [1/2]

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >

- + - - + - - - - - - - +
void fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::move_MC_updater std::optional< Real > fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::move_MC_updater (fp::Node< Real, Index > constnode, fp::Node const & node,
fp::vec3< Real > constdisplacement 
)fp::vec3< Real > const & displacement )
- + - - +
void fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::flip_MC_updater void fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::flip_MC_updater (fp::Node< Real, Index > constnode)fp::Node const & node)
@@ -534,42 +550,48 @@

Note
This function randomly chooses the next neighbor of the node and flips the edge between them. If more precise control is required, i.e., if it is necessary to control exactly which edge needs to be flipped, then the flip_MC_updater(fp::Node<Real, Index> const& node, Index id_in_nn_ids) method can be used.
+
Note
This function randomly chooses the next neighbor of the node and flips the edge between them. If more precise control is required, i.e., if it is necessary to control exactly which edge needs to be flipped, then the flip_MC_updater(fp::Node const& node, Index id_in_nn_ids) method can be used.
Here is the call graph for this function:
-
+
+ + + + +
+
+Here is the caller graph for this function:
+
+
+ + + +
- -

◆ flip_MC_updater() [2/2]

+ +

◆ flip_MC_updater() [2/2]

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >
@@ -583,35 +605,77 @@

Metropolis algorithm is used to evaluate whether the flip should be accepted.

Parameters

- + - - + - - - - - - - +
void fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::flip_MC_updater void fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::flip_MC_updater (fp::Node< Real, Index > constnode, fp::Node const & node,
Index id_in_nn_ids 
)Index id_in_nn_ids )
- +
nodeThe reference to the node being updated.
id_in_nn_idsThis id must be part of the Node::nn_ids vector of the node provided in the first argument , otherwise, the flippy will fail silently.
id_in_nn_idsThis id must be part of the Node::nn_ids vector of the node provided in the first argument , otherwise, the flippy will fail silently.
-
Warning
For performance reasons, this function does not check if id_in_nn_ids is really a nn_id of the node provided in the first argument. The user is required to guarantee this fact. Otherwise, flippy will fail unpredictably. flip_MC_updater(fp::Node<Real, Index> const&) is the safer method if the user does not care exactly which bond is flipped.
+
Warning
For performance reasons, this function does not check if id_in_nn_ids is really a nn_id of the node provided in the first argument. The user is required to guarantee this fact. Otherwise, flippy will fail unpredictably. flip_MC_updater(fp::Node const&) is the safer method if the user does not care exactly which bond is flipped.
Here is the call graph for this function:
-
-
- -
- - -

◆ reset_kBT()

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

◆ reset_kBT()

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >
- + - - +
void fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::reset_kBT void fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::reset_kBT (Real kBT)Real kBT)
@@ -632,229 +696,239 @@

Here is the call graph for this function:
-
+
+ + + + +
-
-

◆ kBT()

+ +

◆ kBT()

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >
+inlinenodiscard
- + - +
Real fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::kBT Real fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::kBT ())
-inline

A getter function that returns a value of a state variable.

Monte Carlo Updater requires a kBT value in the calculation of the rejection probability of a random move.

Returns
the state of the kBT value of the updater.
-
See also
move_needs_undoing()
+
See also
move_needs_undoing()
Here is the caller graph for this function:
-
+
+ + + + +
- -

◆ move_attempt_count()

+ +

◆ move_attempt_count()

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >
+inlinenodiscard
- + - +
unsigned long fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::move_attempt_count unsigned long fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::move_attempt_count ()) const
-inline

A getter function that returns a value of a state variable.

-

Every time a move is attempted, a private internal state variable move_attempt is incremented by move_MC_updater(). This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater.

Returns
current state of move_attempt.
-
See also
move_needs_undoing()
+

Every time a move is attempted, a private internal state variable move_attempt is incremented by move_MC_updater(). This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater.

Returns
current state of move_attempt.
+
See also
move_needs_undoing()
- -

◆ bond_length_move_rejection_count()

+ +

◆ bond_length_move_rejection_count()

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >
+inlinenodiscard
- + - +
unsigned long fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::bond_length_move_rejection_count unsigned long fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::bond_length_move_rejection_count ()) const
-inline

A getter function that returns a value of a state variable.

-

Moves that cause nodes to overlap with their Verlet list neighbors or move them too far away from any of their next neighbors are rejected. Every time such rejection happens, a private internal state variable bond_length_move_rejection is incremented by move_MC_updater(). The specifics of this rejection criteria are calculated in the function new_neighbour_distances_are_between_min_and_max_length(fp::Node<Real, Index> const& node, fp::vec3<Real> const& displacement) Every time a node move would lead that node to have a bond with one of its next neighbors, which is longer than a specified maximal length (max_bond_length()), the move will be rejected. This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater.

Returns
current state of bond_length_move_rejection.
-
See also
move_needs_undoing()
+

Moves that cause nodes to overlap with their Verlet list neighbors or move them too far away from any of their next neighbors are rejected. Every time such rejection happens, a private internal state variable bond_length_move_rejection is incremented by move_MC_updater(). The specifics of this rejection criteria are calculated in the function new_neighbour_distances_are_between_min_and_max_length(fp::Node const& node, fp::vec3<Real> const& displacement) Every time a node move would lead that node to have a bond with one of its next neighbors, which is longer than a specified maximal length (max_bond_length()), the move will be rejected. This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater.

Returns
current state of bond_length_move_rejection.
+
See also
move_needs_undoing()
- -

◆ move_back_count()

+ +

◆ move_back_count()

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >
+inlinenodiscard
- + - +
unsigned long fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::move_back_count unsigned long fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::move_back_count ()) const
-inline

A getter function that returns a value of a state variable.

-

Every time a move is rejected because the energy requirement was not satisfied, a private internal state variable move_back is incremented by move_MC_updater(). This variable does not track the rejections resulting from bond length restriction violations. This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater.

Returns
current state of move_back.
-
See also
move_needs_undoing() bond_length_move_rejection_count()
+

Every time a move is rejected because the energy requirement was not satisfied, a private internal state variable move_back is incremented by move_MC_updater(). This variable does not track the rejections resulting from bond length restriction violations. This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater.

Returns
current state of move_back.
+
See also
move_needs_undoing() bond_length_move_rejection_count()
- -

◆ flip_attempt_count()

+ +

◆ flip_attempt_count()

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >
+inlinenodiscard
- + - +
unsigned long fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::flip_attempt_count unsigned long fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::flip_attempt_count ()) const
-inline

A getter function that returns a value of a state variable.

-

Every time a flip is attempted, a private internal state variable flip_attempt is incremented by flip_MC_updater() and flip_MC_updater(fp::Node<Real, Index> const& node, Index index_in_nn_ids). This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater.

Returns
current state of flip_attempt.
+

Every time a flip is attempted, a private internal state variable flip_attempt is incremented by flip_MC_updater() and flip_MC_updater(fp::Node const& node, Index index_in_nn_ids). This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater.

Returns
current state of flip_attempt.
- -

◆ bond_length_flip_rejection_count()

+ +

◆ bond_length_flip_rejection_count()

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >
+inlinenodiscard
- + - +
unsigned long fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::bond_length_flip_rejection_count unsigned long fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::bond_length_flip_rejection_count ()) const
-inline

A getter function that returns a value of a state variable.

-

If a flip would turn a valid bond into a bond that is too long, the flip is rejected, a private internal state variable bond_length_flip_rejection is incremented by flip_MC_updater() and flip_MC_updater(fp::Node<Real, Index> const& node, Index index_in_nn_ids). The rejection of flips is handled by the Triangulation class itself and reported through the BondFlipData to the flip functions of the updater. This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater.

Returns
current state of bond_length_flip_rejection.
-
See also
Triangulation::flip_bond(Index, Index, Real, Real) Triangulation::unflip_bond(Index, Index, BondFlipData<Index> const&)
+

If a flip would turn a valid bond into a bond that is too long, the flip is rejected, a private internal state variable bond_length_flip_rejection is incremented by flip_MC_updater() and flip_MC_updater(fp::Node const& node, Index index_in_nn_ids). The rejection of flips is handled by the Triangulation class itself and reported through the BondFlipData to the flip functions of the updater. This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater.

Returns
current state of bond_length_flip_rejection.
+
See also
Triangulation::flip_bond(Index, Index, Real, Real) Triangulation::unflip_bond(Index, Index, BondFlipData const&)
- -

◆ flip_back_count()

+ +

◆ flip_back_count()

-template<floating_point_number Real, indexing_number Index, typename EnergyFunctionParameters , typename RandomNumberEngine , TriangulationType triangulation_type>
+template<typename EnergyFunctionParameters , typename RandomNumberEngine >
+inlinenodiscard
- + - +
unsigned long fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >::flip_back_count unsigned long fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >::flip_back_count ()) const
-inline

A getter function that returns a value of a state variable.

-

Every time a flip is rejected because the energy requirement was not satisfied, a private internal state variable flip_back is incremented by flip_MC_updater() and flip_MC_updater(fp::Node<Real, Index> const& node, Index index_in_nn_ids). The rejection of flips is handled by the Triangulation class itself and reported through the BondFlipData to the flip functions of the updater. This variable does not track the rejections resulting from bond length restriction violations. This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater.

Returns
current state of flip_back.
-
See also
Triangulation:: unflip_bond(Index node_id, Index nn_id, BondFlipData<Index> const& common_nns) bond_length_flip_rejection_count()
+

Every time a flip is rejected because the energy requirement was not satisfied, a private internal state variable flip_back is incremented by flip_MC_updater() and flip_MC_updater(fp::Node const& node, Index index_in_nn_ids). The rejection of flips is handled by the Triangulation class itself and reported through the BondFlipData to the flip functions of the updater. This variable does not track the rejections resulting from bond length restriction violations. This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater.

Returns
current state of flip_back.
+
See also
Triangulation:: unflip_bond(Index node_id, Index nn_id, BondFlipData const& common_nns) bond_length_flip_rejection_count()
@@ -867,7 +941,7 @@

diff --git a/docs/classfp_1_1_monte_carlo_updater.js b/docs/classfp_1_1_monte_carlo_updater.js old mode 100644 new mode 100755 index 6dab891..22f88bb --- a/docs/classfp_1_1_monte_carlo_updater.js +++ b/docs/classfp_1_1_monte_carlo_updater.js @@ -1,19 +1,19 @@ var classfp_1_1_monte_carlo_updater = [ - [ "MonteCarloUpdater", "classfp_1_1_monte_carlo_updater.html#ac3e7246b13537a6c2df34e5334289c80", null ], - [ "move_needs_undoing", "classfp_1_1_monte_carlo_updater.html#a7e172728bb0764e21ba1e44aa76cce83", null ], - [ "new_neighbour_distances_are_between_min_and_max_length", "classfp_1_1_monte_carlo_updater.html#ada3c8ad8d719671d9dedecd3ec9bbd2b", null ], - [ "new_next_neighbour_distances_are_between_min_and_max_length", "classfp_1_1_monte_carlo_updater.html#ad985050d8f094aa3d577df33eac9242d", null ], - [ "new_verlet_neighbour_distances_are_between_min_and_max_length", "classfp_1_1_monte_carlo_updater.html#a6a064bcdc7395374ab73913e364f1f81", null ], - [ "move_MC_updater", "classfp_1_1_monte_carlo_updater.html#ac3e40c3b93bf2bf6f2b08291357503be", null ], - [ "flip_MC_updater", "classfp_1_1_monte_carlo_updater.html#a8de725c1ae28fd44d096ffb82467b598", null ], - [ "flip_MC_updater", "classfp_1_1_monte_carlo_updater.html#acf28ad26646a0e87dce57eed5ca5047c", null ], - [ "reset_kBT", "classfp_1_1_monte_carlo_updater.html#a919b68a956bf4875eecab53dbc950a57", null ], - [ "kBT", "classfp_1_1_monte_carlo_updater.html#a4e3b7ba1838866d8e4968a404deb5c94", null ], - [ "move_attempt_count", "classfp_1_1_monte_carlo_updater.html#a419e39432ab410ba04dd1ea6fcad38e3", null ], - [ "bond_length_move_rejection_count", "classfp_1_1_monte_carlo_updater.html#aedba837fd1d1336a03900b0cbf771cd8", null ], - [ "move_back_count", "classfp_1_1_monte_carlo_updater.html#a0afcfe92c1f0f52affb1572521d88df4", null ], - [ "flip_attempt_count", "classfp_1_1_monte_carlo_updater.html#a1b16f05da5a695e7171c415327b6bf49", null ], - [ "bond_length_flip_rejection_count", "classfp_1_1_monte_carlo_updater.html#a43985749fca7d36119d07c163de7f792", null ], - [ "flip_back_count", "classfp_1_1_monte_carlo_updater.html#ad98d8bef250c2b7c533b6694e8e00d2d", null ] + [ "MonteCarloUpdater", "classfp_1_1_monte_carlo_updater.html#afb5cbe50420e978c618d5ce7f909c588", null ], + [ "move_needs_undoing", "classfp_1_1_monte_carlo_updater.html#af4528387b65d1058714b1f6aa0fdb90b", null ], + [ "new_neighbour_distances_are_between_min_and_max_length", "classfp_1_1_monte_carlo_updater.html#a173b77e5381e7d98ceb77aaa040b29dd", null ], + [ "new_next_neighbour_distances_are_between_min_and_max_length", "classfp_1_1_monte_carlo_updater.html#adff0b592bb81bdc289bcdbd170b78401", null ], + [ "new_verlet_neighbour_distances_are_between_min_and_max_length", "classfp_1_1_monte_carlo_updater.html#aaf82cdb55f4bf12468ca2a744ac81ffe", null ], + [ "move_MC_updater", "classfp_1_1_monte_carlo_updater.html#aa8bc9d09da6cb006c077e3c18da174d1", null ], + [ "flip_MC_updater", "classfp_1_1_monte_carlo_updater.html#a1a5484a8ab66cf9106ca48b8993e30d2", null ], + [ "flip_MC_updater", "classfp_1_1_monte_carlo_updater.html#abab166d4505421306c99986145f0c183", null ], + [ "reset_kBT", "classfp_1_1_monte_carlo_updater.html#a73273eb46dc52825fb2a7eed413de565", null ], + [ "kBT", "classfp_1_1_monte_carlo_updater.html#ac130f551ac1590c7f706351e72b40c5f", null ], + [ "move_attempt_count", "classfp_1_1_monte_carlo_updater.html#ab44cc6033ff475b9bce9af27742171e3", null ], + [ "bond_length_move_rejection_count", "classfp_1_1_monte_carlo_updater.html#abfd479d2c1cbee2fedc7bb99975a3630", null ], + [ "move_back_count", "classfp_1_1_monte_carlo_updater.html#ab1c8fe7f2288a978f95154d2c8c7d746", null ], + [ "flip_attempt_count", "classfp_1_1_monte_carlo_updater.html#ac02dcce7a2fa253cabe433b579d6cbdb", null ], + [ "bond_length_flip_rejection_count", "classfp_1_1_monte_carlo_updater.html#a5afffea0be3f3e90d2e1a7fce7b6444e", null ], + [ "flip_back_count", "classfp_1_1_monte_carlo_updater.html#ad0166b3e6b463f538cbf93969b1ee2ec", null ] ]; \ No newline at end of file diff --git a/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_cgraph.map b/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_cgraph.map new file mode 100755 index 0000000..e08fc6a --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_cgraph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_cgraph.md5 b/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_cgraph.md5 new file mode 100755 index 0000000..6b722c8 --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_cgraph.md5 @@ -0,0 +1 @@ +4729fb363a1b58417a87319d6f1e8a87 \ No newline at end of file diff --git a/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_cgraph.png b/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_cgraph.png new file mode 100755 index 0000000..49ad03f Binary files /dev/null and b/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_cgraph.png differ diff --git a/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_icgraph.map b/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_icgraph.map new file mode 100755 index 0000000..5bdfed5 --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_icgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_icgraph.md5 b/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_icgraph.md5 new file mode 100755 index 0000000..064b935 --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_icgraph.md5 @@ -0,0 +1 @@ +1882eaca418b6f941250fe720e594712 \ No newline at end of file diff --git a/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_icgraph.png b/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_icgraph.png new file mode 100755 index 0000000..dfeaa8b Binary files /dev/null and b/docs/classfp_1_1_monte_carlo_updater_a173b77e5381e7d98ceb77aaa040b29dd_icgraph.png differ diff --git a/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_cgraph.map b/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_cgraph.map new file mode 100755 index 0000000..64d3aff --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_cgraph.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_cgraph.md5 b/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_cgraph.md5 new file mode 100755 index 0000000..dff505d --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_cgraph.md5 @@ -0,0 +1 @@ +ec3db38059abdefaf7ce57554287ced8 \ No newline at end of file diff --git a/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_cgraph.png b/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_cgraph.png new file mode 100755 index 0000000..42d8b91 Binary files /dev/null and b/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_cgraph.png differ diff --git a/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_icgraph.map b/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_icgraph.map new file mode 100755 index 0000000..4812a63 --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_icgraph.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_icgraph.md5 b/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_icgraph.md5 new file mode 100755 index 0000000..3df6e54 --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_icgraph.md5 @@ -0,0 +1 @@ +d5392c5fc537b4434f8e86b61c5cf1cf \ No newline at end of file diff --git a/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_icgraph.png b/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_icgraph.png new file mode 100755 index 0000000..39e460c Binary files /dev/null and b/docs/classfp_1_1_monte_carlo_updater_a1a5484a8ab66cf9106ca48b8993e30d2_icgraph.png differ diff --git a/docs/classfp_1_1_monte_carlo_updater_a4e3b7ba1838866d8e4968a404deb5c94_icgraph.dot b/docs/classfp_1_1_monte_carlo_updater_a4e3b7ba1838866d8e4968a404deb5c94_icgraph.dot deleted file mode 100644 index b3c20ee..0000000 --- a/docs/classfp_1_1_monte_carlo_updater_a4e3b7ba1838866d8e4968a404deb5c94_icgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::MonteCarloUpdater::kBT" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::MonteCarloUpdater::kBT",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="A getter function that returns a value of a state variable."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::MonteCarloUpdater\l::reset_kBT",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a919b68a956bf4875eecab53dbc950a57",tooltip="Reset the temperature of the Monte Carlo updater, at which the Boltzmann weights are evaluated."]; -} diff --git a/docs/classfp_1_1_monte_carlo_updater_a6a064bcdc7395374ab73913e364f1f81_icgraph.dot b/docs/classfp_1_1_monte_carlo_updater_a6a064bcdc7395374ab73913e364f1f81_icgraph.dot deleted file mode 100644 index 924d1a5..0000000 --- a/docs/classfp_1_1_monte_carlo_updater_a6a064bcdc7395374ab73913e364f1f81_icgraph.dot +++ /dev/null @@ -1,13 +0,0 @@ -digraph "fp::MonteCarloUpdater::new_verlet_neighbour_distances_are_between_min_and_max_length" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::MonteCarloUpdater\l::new_verlet_neighbour\l_distances_are_between\l_min_and_max_length",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Pre-update check to test that the update step will not result in an unphysical configuration."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::MonteCarloUpdater\l::new_neighbour_distances\l_are_between_min_and_max_length",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#ada3c8ad8d719671d9dedecd3ec9bbd2b",tooltip="Pre-update check to test that the update step will not result in an unphysical configuration."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::MonteCarloUpdater\l::move_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#ac3e40c3b93bf2bf6f2b08291357503be",tooltip="Attempt a move Monte Carlo Step."]; -} diff --git a/docs/classfp_1_1_monte_carlo_updater_a73273eb46dc52825fb2a7eed413de565_cgraph.map b/docs/classfp_1_1_monte_carlo_updater_a73273eb46dc52825fb2a7eed413de565_cgraph.map new file mode 100755 index 0000000..9b254f3 --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_a73273eb46dc52825fb2a7eed413de565_cgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1_monte_carlo_updater_a73273eb46dc52825fb2a7eed413de565_cgraph.md5 b/docs/classfp_1_1_monte_carlo_updater_a73273eb46dc52825fb2a7eed413de565_cgraph.md5 new file mode 100755 index 0000000..187754b --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_a73273eb46dc52825fb2a7eed413de565_cgraph.md5 @@ -0,0 +1 @@ +3d0b23ef151a4e8c80f6cd3c9fd195ae \ No newline at end of file diff --git a/docs/classfp_1_1_monte_carlo_updater_a73273eb46dc52825fb2a7eed413de565_cgraph.png b/docs/classfp_1_1_monte_carlo_updater_a73273eb46dc52825fb2a7eed413de565_cgraph.png new file mode 100755 index 0000000..33ef658 Binary files /dev/null and b/docs/classfp_1_1_monte_carlo_updater_a73273eb46dc52825fb2a7eed413de565_cgraph.png differ diff --git a/docs/classfp_1_1_monte_carlo_updater_a7e172728bb0764e21ba1e44aa76cce83_icgraph.dot b/docs/classfp_1_1_monte_carlo_updater_a7e172728bb0764e21ba1e44aa76cce83_icgraph.dot deleted file mode 100644 index 3d77241..0000000 --- a/docs/classfp_1_1_monte_carlo_updater_a7e172728bb0764e21ba1e44aa76cce83_icgraph.dot +++ /dev/null @@ -1,15 +0,0 @@ -digraph "fp::MonteCarloUpdater::move_needs_undoing" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::MonteCarloUpdater\l::move_needs_undoing",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Implementation of the Metropolis algorithm."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a8de725c1ae28fd44d096ffb82467b598",tooltip="Attempt a flip Monte Carlo Step."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#acf28ad26646a0e87dce57eed5ca5047c",tooltip="Attempt a flip Monte Carlo Step."]; - Node1 -> Node4 [id="edge3_Node000001_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::MonteCarloUpdater\l::move_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#ac3e40c3b93bf2bf6f2b08291357503be",tooltip="Attempt a move Monte Carlo Step."]; -} diff --git a/docs/classfp_1_1_monte_carlo_updater_a8de725c1ae28fd44d096ffb82467b598_cgraph.dot b/docs/classfp_1_1_monte_carlo_updater_a8de725c1ae28fd44d096ffb82467b598_cgraph.dot deleted file mode 100644 index d54295a..0000000 --- a/docs/classfp_1_1_monte_carlo_updater_a8de725c1ae28fd44d096ffb82467b598_cgraph.dot +++ /dev/null @@ -1,27 +0,0 @@ -digraph "fp::MonteCarloUpdater::flip_MC_updater" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Attempt a flip Monte Carlo Step."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lflip_bond",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a6833f13e1fd24b039ca1ad2969b8d267",tooltip="Securely flip the bond inside a quadrilateral formed by the nodes given by node_id,..."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::MonteCarloUpdater\l::move_needs_undoing",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a7e172728bb0764e21ba1e44aa76cce83",tooltip="Implementation of the Metropolis algorithm."]; - Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::Triangulation::\lunflip_bond",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a5d1ec431a7a0040d7963e4297a80faaa",tooltip="Un-flip a bond that was just flipped."]; - Node4 -> Node5 [id="edge4_Node000004_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="fp::Triangulation::\lflip_bond_unchecked",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a077d1be6c31f16241e9035c5a0f93652",tooltip=" "]; - Node5 -> Node6 [id="edge5_Node000005_Node000006",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="fp::Triangulation::\lemplace_before",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a11ee6051e9db388def8aaed68b1841d4",tooltip="Adds a new node to the next neighbor list of a given node and calculates their mutual distance."]; - Node4 -> Node7 [id="edge6_Node000004_Node000007",color="steelblue1",style="solid",tooltip=" "]; - Node7 [id="Node000007",label="fp::Triangulation::\lupdate_diamond_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a762c6430c00d719a8ea5a4a3e89715a8",tooltip="Calculates and updates the geometric quantities of the diamond configuration of nodes associated with..."]; - Node7 -> Node8 [id="edge7_Node000007_Node000008",color="steelblue1",style="solid",tooltip=" "]; - Node8 [id="Node000008",label="fp::Triangulation::\lupdate_bulk_node_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a5d5763865ac706a2e800ed306d070d68",tooltip="Update the geometric quantities associated with the given node."]; - Node8 -> Node9 [id="edge8_Node000008_Node000009",color="steelblue1",style="solid",tooltip=" "]; - Node9 [id="Node000009",label="fp::Triangulation::\lmixed_area",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a3e43dfd4b4c9cfd10c5bf4174f2a85d1",tooltip="The node-associated area inside a triangle."]; - Node8 -> Node10 [id="edge9_Node000008_Node000010",color="steelblue1",style="solid",tooltip=" "]; - Node10 [id="Node000010",label="fp::Neighbors::plus_one",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_neighbors.html#a59501864ac7f34bd676aa97d9faf68cc",tooltip=" "]; -} diff --git a/docs/classfp_1_1_monte_carlo_updater_a919b68a956bf4875eecab53dbc950a57_cgraph.dot b/docs/classfp_1_1_monte_carlo_updater_a919b68a956bf4875eecab53dbc950a57_cgraph.dot deleted file mode 100644 index fc2be19..0000000 --- a/docs/classfp_1_1_monte_carlo_updater_a919b68a956bf4875eecab53dbc950a57_cgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::MonteCarloUpdater::reset_kBT" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::MonteCarloUpdater\l::reset_kBT",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Reset the temperature of the Monte Carlo updater, at which the Boltzmann weights are evaluated."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::MonteCarloUpdater::kBT",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a4e3b7ba1838866d8e4968a404deb5c94",tooltip="A getter function that returns a value of a state variable."]; -} diff --git a/docs/classfp_1_1_monte_carlo_updater_aa8bc9d09da6cb006c077e3c18da174d1_cgraph.map b/docs/classfp_1_1_monte_carlo_updater_aa8bc9d09da6cb006c077e3c18da174d1_cgraph.map new file mode 100755 index 0000000..af17c26 --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_aa8bc9d09da6cb006c077e3c18da174d1_cgraph.map @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/docs/classfp_1_1_monte_carlo_updater_aa8bc9d09da6cb006c077e3c18da174d1_cgraph.md5 b/docs/classfp_1_1_monte_carlo_updater_aa8bc9d09da6cb006c077e3c18da174d1_cgraph.md5 new file mode 100755 index 0000000..853e812 --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_aa8bc9d09da6cb006c077e3c18da174d1_cgraph.md5 @@ -0,0 +1 @@ +2303a2dbc3be0ca1342043f9a7971d7a \ No newline at end of file diff --git a/docs/classfp_1_1_monte_carlo_updater_aa8bc9d09da6cb006c077e3c18da174d1_cgraph.png b/docs/classfp_1_1_monte_carlo_updater_aa8bc9d09da6cb006c077e3c18da174d1_cgraph.png new file mode 100755 index 0000000..33662ea Binary files /dev/null and b/docs/classfp_1_1_monte_carlo_updater_aa8bc9d09da6cb006c077e3c18da174d1_cgraph.png differ diff --git a/docs/classfp_1_1_monte_carlo_updater_aaf82cdb55f4bf12468ca2a744ac81ffe_icgraph.map b/docs/classfp_1_1_monte_carlo_updater_aaf82cdb55f4bf12468ca2a744ac81ffe_icgraph.map new file mode 100755 index 0000000..b7588d1 --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_aaf82cdb55f4bf12468ca2a744ac81ffe_icgraph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classfp_1_1_monte_carlo_updater_aaf82cdb55f4bf12468ca2a744ac81ffe_icgraph.md5 b/docs/classfp_1_1_monte_carlo_updater_aaf82cdb55f4bf12468ca2a744ac81ffe_icgraph.md5 new file mode 100755 index 0000000..39431ad --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_aaf82cdb55f4bf12468ca2a744ac81ffe_icgraph.md5 @@ -0,0 +1 @@ +055836d64b5bfb8af48fd17ca3c716cf \ No newline at end of file diff --git a/docs/classfp_1_1_monte_carlo_updater_aaf82cdb55f4bf12468ca2a744ac81ffe_icgraph.png b/docs/classfp_1_1_monte_carlo_updater_aaf82cdb55f4bf12468ca2a744ac81ffe_icgraph.png new file mode 100755 index 0000000..1f5f0ee Binary files /dev/null and b/docs/classfp_1_1_monte_carlo_updater_aaf82cdb55f4bf12468ca2a744ac81ffe_icgraph.png differ diff --git a/docs/classfp_1_1_monte_carlo_updater_abab166d4505421306c99986145f0c183_cgraph.map b/docs/classfp_1_1_monte_carlo_updater_abab166d4505421306c99986145f0c183_cgraph.map new file mode 100755 index 0000000..86c0eda --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_abab166d4505421306c99986145f0c183_cgraph.map @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/classfp_1_1_monte_carlo_updater_abab166d4505421306c99986145f0c183_cgraph.md5 b/docs/classfp_1_1_monte_carlo_updater_abab166d4505421306c99986145f0c183_cgraph.md5 new file mode 100755 index 0000000..a076b64 --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_abab166d4505421306c99986145f0c183_cgraph.md5 @@ -0,0 +1 @@ +f330ae2c8c0a0b5e1ffbe9e0e798136c \ No newline at end of file diff --git a/docs/classfp_1_1_monte_carlo_updater_abab166d4505421306c99986145f0c183_cgraph.png b/docs/classfp_1_1_monte_carlo_updater_abab166d4505421306c99986145f0c183_cgraph.png new file mode 100755 index 0000000..f37e19d Binary files /dev/null and b/docs/classfp_1_1_monte_carlo_updater_abab166d4505421306c99986145f0c183_cgraph.png differ diff --git a/docs/classfp_1_1_monte_carlo_updater_ac130f551ac1590c7f706351e72b40c5f_icgraph.map b/docs/classfp_1_1_monte_carlo_updater_ac130f551ac1590c7f706351e72b40c5f_icgraph.map new file mode 100755 index 0000000..7be8bef --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_ac130f551ac1590c7f706351e72b40c5f_icgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1_monte_carlo_updater_ac130f551ac1590c7f706351e72b40c5f_icgraph.md5 b/docs/classfp_1_1_monte_carlo_updater_ac130f551ac1590c7f706351e72b40c5f_icgraph.md5 new file mode 100755 index 0000000..299ca82 --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_ac130f551ac1590c7f706351e72b40c5f_icgraph.md5 @@ -0,0 +1 @@ +ef5ed7e9cea7725dbe58c425372334f8 \ No newline at end of file diff --git a/docs/classfp_1_1_monte_carlo_updater_ac130f551ac1590c7f706351e72b40c5f_icgraph.png b/docs/classfp_1_1_monte_carlo_updater_ac130f551ac1590c7f706351e72b40c5f_icgraph.png new file mode 100755 index 0000000..9ae2105 Binary files /dev/null and b/docs/classfp_1_1_monte_carlo_updater_ac130f551ac1590c7f706351e72b40c5f_icgraph.png differ diff --git a/docs/classfp_1_1_monte_carlo_updater_ac3e40c3b93bf2bf6f2b08291357503be_cgraph.dot b/docs/classfp_1_1_monte_carlo_updater_ac3e40c3b93bf2bf6f2b08291357503be_cgraph.dot deleted file mode 100644 index a584794..0000000 --- a/docs/classfp_1_1_monte_carlo_updater_ac3e40c3b93bf2bf6f2b08291357503be_cgraph.dot +++ /dev/null @@ -1,23 +0,0 @@ -digraph "fp::MonteCarloUpdater::move_MC_updater" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::MonteCarloUpdater\l::move_MC_updater",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Attempt a move Monte Carlo Step."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::MonteCarloUpdater\l::move_needs_undoing",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a7e172728bb0764e21ba1e44aa76cce83",tooltip="Implementation of the Metropolis algorithm."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Triangulation::\lmove_node",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#ad8102adbe7dab80cda3209844a939e30",tooltip="Move an individual node of the triangulation and update all the geometric quantities of the triangula..."]; - Node3 -> Node4 [id="edge3_Node000003_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::Triangulation::\lget_two_ring_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a3c660cb2bec69afe055843975698cfd0",tooltip="Aggregates and Returns the geometric quantities of the center node and its next neighbor nodes."]; - Node3 -> Node5 [id="edge4_Node000003_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="fp::Triangulation::\lupdate_two_ring_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a1d7b2a1e57f742d1d401eeb09b057beb",tooltip="Updates the geometric quantities of the center node and its next neighbor nodes."]; - Node1 -> Node6 [id="edge5_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="fp::MonteCarloUpdater\l::new_neighbour_distances\l_are_between_min_and_max_length",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#ada3c8ad8d719671d9dedecd3ec9bbd2b",tooltip="Pre-update check to test that the update step will not result in an unphysical configuration."]; - Node6 -> Node7 [id="edge6_Node000006_Node000007",color="steelblue1",style="solid",tooltip=" "]; - Node7 [id="Node000007",label="fp::MonteCarloUpdater\l::new_next_neighbour\l_distances_are_between\l_min_and_max_length",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#ad985050d8f094aa3d577df33eac9242d",tooltip="Pre-update check to test that the update step will not result in an unphysical configuration."]; - Node6 -> Node8 [id="edge7_Node000006_Node000008",color="steelblue1",style="solid",tooltip=" "]; - Node8 [id="Node000008",label="fp::MonteCarloUpdater\l::new_verlet_neighbour\l_distances_are_between\l_min_and_max_length",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a6a064bcdc7395374ab73913e364f1f81",tooltip="Pre-update check to test that the update step will not result in an unphysical configuration."]; -} diff --git a/docs/classfp_1_1_monte_carlo_updater_acf28ad26646a0e87dce57eed5ca5047c_cgraph.dot b/docs/classfp_1_1_monte_carlo_updater_acf28ad26646a0e87dce57eed5ca5047c_cgraph.dot deleted file mode 100644 index d54295a..0000000 --- a/docs/classfp_1_1_monte_carlo_updater_acf28ad26646a0e87dce57eed5ca5047c_cgraph.dot +++ /dev/null @@ -1,27 +0,0 @@ -digraph "fp::MonteCarloUpdater::flip_MC_updater" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Attempt a flip Monte Carlo Step."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lflip_bond",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a6833f13e1fd24b039ca1ad2969b8d267",tooltip="Securely flip the bond inside a quadrilateral formed by the nodes given by node_id,..."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::MonteCarloUpdater\l::move_needs_undoing",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a7e172728bb0764e21ba1e44aa76cce83",tooltip="Implementation of the Metropolis algorithm."]; - Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::Triangulation::\lunflip_bond",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a5d1ec431a7a0040d7963e4297a80faaa",tooltip="Un-flip a bond that was just flipped."]; - Node4 -> Node5 [id="edge4_Node000004_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="fp::Triangulation::\lflip_bond_unchecked",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a077d1be6c31f16241e9035c5a0f93652",tooltip=" "]; - Node5 -> Node6 [id="edge5_Node000005_Node000006",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="fp::Triangulation::\lemplace_before",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a11ee6051e9db388def8aaed68b1841d4",tooltip="Adds a new node to the next neighbor list of a given node and calculates their mutual distance."]; - Node4 -> Node7 [id="edge6_Node000004_Node000007",color="steelblue1",style="solid",tooltip=" "]; - Node7 [id="Node000007",label="fp::Triangulation::\lupdate_diamond_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a762c6430c00d719a8ea5a4a3e89715a8",tooltip="Calculates and updates the geometric quantities of the diamond configuration of nodes associated with..."]; - Node7 -> Node8 [id="edge7_Node000007_Node000008",color="steelblue1",style="solid",tooltip=" "]; - Node8 [id="Node000008",label="fp::Triangulation::\lupdate_bulk_node_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a5d5763865ac706a2e800ed306d070d68",tooltip="Update the geometric quantities associated with the given node."]; - Node8 -> Node9 [id="edge8_Node000008_Node000009",color="steelblue1",style="solid",tooltip=" "]; - Node9 [id="Node000009",label="fp::Triangulation::\lmixed_area",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a3e43dfd4b4c9cfd10c5bf4174f2a85d1",tooltip="The node-associated area inside a triangle."]; - Node8 -> Node10 [id="edge9_Node000008_Node000010",color="steelblue1",style="solid",tooltip=" "]; - Node10 [id="Node000010",label="fp::Neighbors::plus_one",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_neighbors.html#a59501864ac7f34bd676aa97d9faf68cc",tooltip=" "]; -} diff --git a/docs/classfp_1_1_monte_carlo_updater_ad985050d8f094aa3d577df33eac9242d_icgraph.dot b/docs/classfp_1_1_monte_carlo_updater_ad985050d8f094aa3d577df33eac9242d_icgraph.dot deleted file mode 100644 index 0b3e783..0000000 --- a/docs/classfp_1_1_monte_carlo_updater_ad985050d8f094aa3d577df33eac9242d_icgraph.dot +++ /dev/null @@ -1,13 +0,0 @@ -digraph "fp::MonteCarloUpdater::new_next_neighbour_distances_are_between_min_and_max_length" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::MonteCarloUpdater\l::new_next_neighbour\l_distances_are_between\l_min_and_max_length",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Pre-update check to test that the update step will not result in an unphysical configuration."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::MonteCarloUpdater\l::new_neighbour_distances\l_are_between_min_and_max_length",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#ada3c8ad8d719671d9dedecd3ec9bbd2b",tooltip="Pre-update check to test that the update step will not result in an unphysical configuration."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::MonteCarloUpdater\l::move_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#ac3e40c3b93bf2bf6f2b08291357503be",tooltip="Attempt a move Monte Carlo Step."]; -} diff --git a/docs/classfp_1_1_monte_carlo_updater_ada3c8ad8d719671d9dedecd3ec9bbd2b_cgraph.dot b/docs/classfp_1_1_monte_carlo_updater_ada3c8ad8d719671d9dedecd3ec9bbd2b_cgraph.dot deleted file mode 100644 index f332fe1..0000000 --- a/docs/classfp_1_1_monte_carlo_updater_ada3c8ad8d719671d9dedecd3ec9bbd2b_cgraph.dot +++ /dev/null @@ -1,13 +0,0 @@ -digraph "fp::MonteCarloUpdater::new_neighbour_distances_are_between_min_and_max_length" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::MonteCarloUpdater\l::new_neighbour_distances\l_are_between_min_and_max_length",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Pre-update check to test that the update step will not result in an unphysical configuration."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::MonteCarloUpdater\l::new_next_neighbour\l_distances_are_between\l_min_and_max_length",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#ad985050d8f094aa3d577df33eac9242d",tooltip="Pre-update check to test that the update step will not result in an unphysical configuration."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::MonteCarloUpdater\l::new_verlet_neighbour\l_distances_are_between\l_min_and_max_length",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a6a064bcdc7395374ab73913e364f1f81",tooltip="Pre-update check to test that the update step will not result in an unphysical configuration."]; -} diff --git a/docs/classfp_1_1_monte_carlo_updater_ada3c8ad8d719671d9dedecd3ec9bbd2b_icgraph.dot b/docs/classfp_1_1_monte_carlo_updater_ada3c8ad8d719671d9dedecd3ec9bbd2b_icgraph.dot deleted file mode 100644 index d08a770..0000000 --- a/docs/classfp_1_1_monte_carlo_updater_ada3c8ad8d719671d9dedecd3ec9bbd2b_icgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::MonteCarloUpdater::new_neighbour_distances_are_between_min_and_max_length" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::MonteCarloUpdater\l::new_neighbour_distances\l_are_between_min_and_max_length",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Pre-update check to test that the update step will not result in an unphysical configuration."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::MonteCarloUpdater\l::move_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#ac3e40c3b93bf2bf6f2b08291357503be",tooltip="Attempt a move Monte Carlo Step."]; -} diff --git a/docs/classfp_1_1_monte_carlo_updater_adff0b592bb81bdc289bcdbd170b78401_icgraph.map b/docs/classfp_1_1_monte_carlo_updater_adff0b592bb81bdc289bcdbd170b78401_icgraph.map new file mode 100755 index 0000000..8771aa8 --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_adff0b592bb81bdc289bcdbd170b78401_icgraph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classfp_1_1_monte_carlo_updater_adff0b592bb81bdc289bcdbd170b78401_icgraph.md5 b/docs/classfp_1_1_monte_carlo_updater_adff0b592bb81bdc289bcdbd170b78401_icgraph.md5 new file mode 100755 index 0000000..46ba7af --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_adff0b592bb81bdc289bcdbd170b78401_icgraph.md5 @@ -0,0 +1 @@ +42c02296eb972b56b39273455f6849fe \ No newline at end of file diff --git a/docs/classfp_1_1_monte_carlo_updater_adff0b592bb81bdc289bcdbd170b78401_icgraph.png b/docs/classfp_1_1_monte_carlo_updater_adff0b592bb81bdc289bcdbd170b78401_icgraph.png new file mode 100755 index 0000000..fc080ec Binary files /dev/null and b/docs/classfp_1_1_monte_carlo_updater_adff0b592bb81bdc289bcdbd170b78401_icgraph.png differ diff --git a/docs/classfp_1_1_monte_carlo_updater_af4528387b65d1058714b1f6aa0fdb90b_icgraph.map b/docs/classfp_1_1_monte_carlo_updater_af4528387b65d1058714b1f6aa0fdb90b_icgraph.map new file mode 100755 index 0000000..b1417a7 --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_af4528387b65d1058714b1f6aa0fdb90b_icgraph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classfp_1_1_monte_carlo_updater_af4528387b65d1058714b1f6aa0fdb90b_icgraph.md5 b/docs/classfp_1_1_monte_carlo_updater_af4528387b65d1058714b1f6aa0fdb90b_icgraph.md5 new file mode 100755 index 0000000..a330468 --- /dev/null +++ b/docs/classfp_1_1_monte_carlo_updater_af4528387b65d1058714b1f6aa0fdb90b_icgraph.md5 @@ -0,0 +1 @@ +78fd6b8a8931b4d22daca0f2b4741b42 \ No newline at end of file diff --git a/docs/classfp_1_1_monte_carlo_updater_af4528387b65d1058714b1f6aa0fdb90b_icgraph.png b/docs/classfp_1_1_monte_carlo_updater_af4528387b65d1058714b1f6aa0fdb90b_icgraph.png new file mode 100755 index 0000000..0d26f58 Binary files /dev/null and b/docs/classfp_1_1_monte_carlo_updater_af4528387b65d1058714b1f6aa0fdb90b_icgraph.png differ diff --git a/docs/classfp_1_1_triangulation-members.html b/docs/classfp_1_1_triangulation-members.html old mode 100644 new mode 100755 index 39b2132..0004d32 --- a/docs/classfp_1_1_triangulation-members.html +++ b/docs/classfp_1_1_triangulation-members.html @@ -3,16 +3,18 @@ - + flippy: Member List + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -99,49 +106,45 @@
-
fp::Triangulation< Real, Index, triangulation_type > Member List
+
fp::Triangulation Member List
-

This is the complete list of members for fp::Triangulation< Real, Index, triangulation_type >, including all inherited members.

+

This is the complete list of members for fp::Triangulation, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + +
boundary_nodes_ids_set() constfp::Triangulation< Real, Index, triangulation_type >inline
calculate_diamond_geometry(Index node_id, Index nn_id, Index cnn_0, Index cnn_1) constfp::Triangulation< Real, Index, triangulation_type >inline
calculate_mass_center() constfp::Triangulation< Real, Index, triangulation_type >inline
emplace_before(Index center_node_id, Index anchor_id, Index new_value)fp::Triangulation< Real, Index, triangulation_type >inline
experimental_load_sphere_from_stl(std::filesystem::path const &stl_file_path, Real verlet_radius_inp)fp::Triangulation< Real, Index, triangulation_type >inlinestatic
flip_bond(Index node_id, Index nn_id, Real min_bond_length_square, Real max_bond_length_square)fp::Triangulation< Real, Index, triangulation_type >inline
flip_bond_unchecked(Index node_id, Index nn_id, Index common_nn_j_m_1, Index common_nn_j_p_1)fp::Triangulation< Real, Index, triangulation_type >inline
get_two_ring_geometry(Index node_id) constfp::Triangulation< Real, Index, triangulation_type >inline
global_geometry() constfp::Triangulation< Real, Index, triangulation_type >inline
make_egg_data() constfp::Triangulation< Real, Index, triangulation_type >inline
make_global_geometry()fp::Triangulation< Real, Index, triangulation_type >inline
make_verlet_list()fp::Triangulation< Real, Index, triangulation_type >inline
mixed_area(vec3< Real > const &lij, vec3< Real > const &lij_p_1, Real triangle_area, Real cot_at_j, Real cot_at_j_p_1)fp::Triangulation< Real, Index, triangulation_type >inlinestatic
mixed_area(vec3< Real > const &lij, vec3< Real > const &lij_p_1, Real const &triangle_area)fp::Triangulation< Real, Index, triangulation_type >inlinestatic
move_node(Index node_id, vec3< Real > const &displacement_vector)fp::Triangulation< Real, Index, triangulation_type >inline
nodes() constfp::Triangulation< Real, Index, triangulation_type >inline
operator[](Index idx) constfp::Triangulation< Real, Index, triangulation_type >inline
partial_voronoi_area_and_face_normal_of_node_in_a_triangle(vec3< Real > const &lij, vec3< Real > const &lij_p_1)fp::Triangulation< Real, Index, triangulation_type >inlinestatic
scale_node_coordinates(Real x_stretch, Real y_stretch=1, Real z_stretch=1)fp::Triangulation< Real, Index, triangulation_type >inline
set_verlet_radius(Real R)fp::Triangulation< Real, Index, triangulation_type >related
size() constfp::Triangulation< Real, Index, triangulation_type >inline
translate_all_nodes(vec3< Real > const &translation_vector)fp::Triangulation< Real, Index, triangulation_type >inline
Triangulation()=default (defined in fp::Triangulation< Real, Index, triangulation_type >)fp::Triangulation< Real, Index, triangulation_type >
Triangulation(Json const &nodes_input, Real verlet_radius_inp)fp::Triangulation< Real, Index, triangulation_type >inline
Triangulation(Index n_nodes_iter, Real R_initial_input, Real verlet_radius_inp)fp::Triangulation< Real, Index, triangulation_type >inline
Triangulation(Index n_length, Index n_width, Real length, Real width, Real verlet_radius_inp)fp::Triangulation< Real, Index, triangulation_type >inline
unflip_bond(Index node_id, Index nn_id, BondFlipData< Index > const &common_nns)fp::Triangulation< Real, Index, triangulation_type >inline
update_boundary_node_geometry(Index node_id)fp::Triangulation< Real, Index, triangulation_type >inline
update_bulk_node_geometry(Index node_id)fp::Triangulation< Real, Index, triangulation_type >inline
update_diamond_geometry(Index node_id, Index nn_id, Index cnn_0, Index cnn_1)fp::Triangulation< Real, Index, triangulation_type >inline
update_two_ring_geometry(Index node_id)fp::Triangulation< Real, Index, triangulation_type >inline
calculate_diamond_geometry(Index node_id, Index nn_id, Index cnn_0, Index cnn_1) constfp::Triangulationinline
calculate_mass_center() constfp::Triangulationinline
emplace_before(Index center_node_id, Index anchor_id, Index new_value)fp::Triangulationinline
experimental_load_sphere_from_stl(std::filesystem::path const &stl_file_path, Real verlet_radius_inp)fp::Triangulationinlinestatic
flip_bond(Index node_id, Index nn_id, Real min_bond_length_square, Real max_bond_length_square)fp::Triangulationinline
flip_bond_unchecked(Index node_id, Index nn_id, Index common_nn_j_m_1, Index common_nn_j_p_1)fp::Triangulationinline
get_two_ring_geometry(Index node_id) constfp::Triangulationinline
global_geometry() constfp::Triangulationinline
make_egg_data() constfp::Triangulationinline
make_global_geometry()fp::Triangulationinline
make_verlet_list()fp::Triangulationinline
mixed_area(vec3< Real > const &lij, vec3< Real > const &lij_p_1, Real triangle_area, Real cot_at_j, Real cot_at_j_p_1)fp::Triangulationinlinestatic
move_node(Index node_id, vec3< Real > const &displacement_vector)fp::Triangulationinline
nodes() constfp::Triangulationinline
operator[](Index idx) constfp::Triangulationinline
previous_and_next_neighbour_global_ids(Index node_id, Index nn_id) constfp::Triangulationinline
scale_node_coordinates(Real x_stretch, Real y_stretch=1, Real z_stretch=1)fp::Triangulationinline
set_verlet_radius(Real R)fp::Triangulationrelated
size() constfp::Triangulationinline
translate_all_nodes(vec3< Real > const &translation_vector)fp::Triangulationinline
Triangulation()=default (defined in fp::Triangulation)fp::Triangulation
Triangulation(Json const &nodes_input, Real verlet_radius_inp)fp::Triangulationinline
Triangulation(Index n_nodes_iter, Real R_initial_input, Real verlet_radius_inp)fp::Triangulationinline
unflip_bond(Index node_id, Index nn_id, BondFlipData const &common_nns)fp::Triangulationinline
update_bulk_node_geometry(Index node_id)fp::Triangulationinline
update_diamond_geometry(Index node_id, Index nn_id, Index cnn_0, Index cnn_1)fp::Triangulationinline
update_two_ring_geometry(Index node_id)fp::Triangulationinline
diff --git a/docs/classfp_1_1_triangulation.html b/docs/classfp_1_1_triangulation.html old mode 100644 new mode 100755 index 0958ec1..06dcfdc --- a/docs/classfp_1_1_triangulation.html +++ b/docs/classfp_1_1_triangulation.html @@ -3,16 +3,18 @@ - + -flippy: fp::Triangulation< Real, Index, triangulation_type > Class Template Reference +flippy: fp::Triangulation Class Reference + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@ -
fp::Triangulation< Real, Index, triangulation_type > Class Template Reference
+
fp::Triangulation Class Reference

Implementation of Triangulation of two-dimensional surfaces in 3D. - More...

+ More...

#include <Triangulation.hpp>

-
-Inheritance diagram for fp::Triangulation< Real, Index, triangulation_type >:
-
-
Inheritance graph
-
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 Triangulation (Json const &nodes_input, Real verlet_radius_inp)
 Constructor that can re-initiate a triangulation from the stored data.
 
 Triangulation (Index n_nodes_iter, Real R_initial_input, Real verlet_radius_inp)
 Constructor that can initiate a spherical triangulation from scratch.
 
 Triangulation (Index n_length, Index n_width, Real length, Real width, Real verlet_radius_inp)
 Constructor that can initiate a planar triangulation from scratch.
 
void make_verlet_list ()
 Create a Verlet list.
 
void translate_all_nodes (vec3< Real > const &translation_vector)
 Adds the same 3D vector to the positions of each node of the triangulation.
 
vec3< Real > calculate_mass_center () const
 Calculate the area-weighted average of node positions.
 
void move_node (Index node_id, vec3< Real > const &displacement_vector)
 Move an individual node of the triangulation and update all the geometric quantities of the triangulation that changed.
 
void emplace_before (Index center_node_id, Index anchor_id, Index new_value)
 Adds a new node to the next neighbor list of a given node and calculates their mutual distance.
 
BondFlipData< Index > flip_bond (Index node_id, Index nn_id, Real min_bond_length_square, Real max_bond_length_square)
 Securely flip the bond inside a quadrilateral formed by the nodes given by node_id, nn_id and their two common next neighbors, if all topological requirements are satisfied.
 
void unflip_bond (Index node_id, Index nn_id, BondFlipData< Index > const &common_nns)
 Un-flip a bond that was just flipped.
 
BondFlipData< Index > flip_bond_unchecked (Index node_id, Index nn_id, Index common_nn_j_m_1, Index common_nn_j_p_1)
 
void update_bulk_node_geometry (Index node_id)
 Update the geometric quantities associated with the given node.
 
Geometry< Real, Index > get_two_ring_geometry (Index node_id) const
 Aggregates and Returns the geometric quantities of the center node and its next neighbor nodes.
 
void update_two_ring_geometry (Index node_id)
 Updates the geometric quantities of the center node and its next neighbor nodes.
 
void scale_node_coordinates (Real x_stretch, Real y_stretch=1, Real z_stretch=1)
 Method for stretching or squeezing the initial triangulation shape.
 
Geometry< Real, Index > calculate_diamond_geometry (Index node_id, Index nn_id, Index cnn_0, Index cnn_1) const
 Aggregates the geometric quantities of the diamond configuration of nodes associated with a bond flip.
 
void update_diamond_geometry (Index node_id, Index nn_id, Index cnn_0, Index cnn_1)
 Calculates and updates the geometric quantities of the diamond configuration of nodes associated with a bond flip.
 
Index size () const
 Returns the number of nodes in the triangulation.
 
const Node< Real, Index > & operator[] (Index idx) const
 Returns a constant reference to the node with the given id.
 
const Nodes< Real, Index > & nodes () const
 Returns a constant reference to the underlying Nodes container.
 
Json make_egg_data () const
 Creates a JSON object with the data of the triangulation.
 
const Geometry< Real, Index > & global_geometry () const
 Information about the global geometric quantities of the triangulation, like global area, volume, and total unit bending energy.
 
void make_global_geometry ()
 Initiates the global geometry of the triangulation.
 
std::set< Index > boundary_nodes_ids_set () const
 Returns the ids of all nodes that are not on the boundary.
 
void update_boundary_node_geometry (Index node_id)
 Updates the local geometry of a boundary node (for triangulation types that have a boundary).
 
 Triangulation (Json const &nodes_input, Real verlet_radius_inp)
 Constructor that can re-initiate a triangulation from the stored data.
 
 Triangulation (Index n_nodes_iter, Real R_initial_input, Real verlet_radius_inp)
 Constructor that can initiate a spherical triangulation from scratch.
 
void make_verlet_list ()
 Create a Verlet list.
 
void translate_all_nodes (vec3< Real > const &translation_vector)
 Adds the same 3D vector to the positions of each node of the triangulation.
 
vec3< Real > calculate_mass_center () const
 Calculate the area-weighted average of node positions.
 
void move_node (Index node_id, vec3< Real > const &displacement_vector)
 Move an individual node of the triangulation and update all the geometric quantities of the triangulation that changed.
 
void emplace_before (Index center_node_id, Index anchor_id, Index new_value)
 Adds a new node to the next neighbor list of a given node and calculates their mutual distance.
 
BondFlipData flip_bond (Index node_id, Index nn_id, Real min_bond_length_square, Real max_bond_length_square)
 Securely flip the bond inside a quadrilateral formed by the nodes given by node_id, nn_id and their two common next neighbors, if all topological requirements are satisfied.
 
void unflip_bond (Index node_id, Index nn_id, BondFlipData const &common_nns)
 Un-flip a bond that was just flipped.
 
BondFlipData flip_bond_unchecked (Index node_id, Index nn_id, Index common_nn_j_m_1, Index common_nn_j_p_1)
 
void update_bulk_node_geometry (Index node_id)
 Update the geometric quantities associated with the given node.
 
Geometry get_two_ring_geometry (Index node_id) const
 Aggregates and Returns the geometric quantities of the center node and its next neighbor nodes.
 
void update_two_ring_geometry (Index node_id)
 Updates the geometric quantities of the center node and its next neighbor nodes.
 
void scale_node_coordinates (Real x_stretch, Real y_stretch=1, Real z_stretch=1)
 Method for stretching or squeezing the initial triangulation shape.
 
Geometry calculate_diamond_geometry (Index node_id, Index nn_id, Index cnn_0, Index cnn_1) const
 Aggregates the geometric quantities of the diamond configuration of nodes associated with a bond flip.
 
void update_diamond_geometry (Index node_id, Index nn_id, Index cnn_0, Index cnn_1)
 Calculates and updates the geometric quantities of the diamond configuration of nodes associated with a bond flip.
 
Index size () const
 Returns the number of nodes in the triangulation.
 
const Nodeoperator[] (Index idx) const
 Returns a constant reference to the node with the given id.
 
const Nodesnodes () const
 Returns a constant reference to the underlying Nodes container.
 
Json make_egg_data () const
 Creates a JSON object with the data of the triangulation.
 
const Geometryglobal_geometry () const
 Information about the global geometric quantities of the triangulation, like global area, volume, and total unit bending energy.
 
void make_global_geometry ()
 Initiates the global geometry of the triangulation.
 
Neighbors previous_and_next_neighbour_global_ids (Index node_id, Index nn_id) const
 
- - - - - - - - - - - - + + + + + +

Static Public Member Functions

static Triangulation< Real, Index, SPHERICAL_TRIANGULATIONexperimental_load_sphere_from_stl (std::filesystem::path const &stl_file_path, Real verlet_radius_inp)
 Special constructor that can initialize a triangulation with spherical topology from a binary stl stl file.
 
static std::tuple< Real, vec3< Real > > partial_voronoi_area_and_face_normal_of_node_in_a_triangle (vec3< Real > const &lij, vec3< Real > const &lij_p_1)
 This function is deprecated!
 
static Real mixed_area (vec3< Real > const &lij, vec3< Real > const &lij_p_1, Real triangle_area, Real cot_at_j, Real cot_at_j_p_1)
 The node-associated area inside a triangle.
 
static Real mixed_area (vec3< Real > const &lij, vec3< Real > const &lij_p_1, Real const &triangle_area)
 This function is deprecated!
 
static Triangulation experimental_load_sphere_from_stl (std::filesystem::path const &stl_file_path, Real verlet_radius_inp)
 Special constructor that can initialize a triangulation with spherical topology from a binary stl stl file.
 
static Real mixed_area (vec3< Real > const &lij, vec3< Real > const &lij_p_1, Real triangle_area, Real cot_at_j, Real cot_at_j_p_1)
 The node-associated area inside a triangle.
 
- +

Related Symbols

(Note that these are not member symbols.)

void set_verlet_radius (Real R)
void set_verlet_radius (Real R)
 Set the radius of the Verlet list to a new value.
 

Detailed Description

-
template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
-class fp::Triangulation< Real, Index, triangulation_type >

Implementation of Triangulation of two-dimensional surfaces in 3D.

-
+

Implementation of Triangulation of two-dimensional surfaces in 3D.

+

*‍/

+

/**

Figure tr 1. Visualization of the triangulation.
-

Visualization of the triangulation. A: Triangulated sphere with \(N_{\mathrm{nodes}}=2252\). Black edges highlight the local neighborhood of a node. Circular arrows show the counterclockwise orientation of the nodes. This choice guarantees that all normal vectors point to the outside of the sphere. B: An arbitrary node \(i\), with its curvature vector \(\vec{K}_{i}\) and a highlighted angle \(\alpha^j_{i,j+1}\) at neighbour \(j\) opposite to the edge \(i, j+1\). Superscript \(j\) denotes the neighboring node to which the angle belongs and subscript \(i,j+1\) denotes the edge opposite of the angle. C: Node \(i\) with its associated Voronoi area \(A_i\) highlighted in red. The node has an associated area inside each triangle it is part of. We also highlight the triangle \(i,j,j+1\) (light red with stripes) with the face normal \(\vec{n}_{i,j,j+1}\) and the area \(A_{i,j,j+1}\). The part of this triangle that is associated with node \(i\) is highlighted in dark red and has the area \(A_{ij}\). The convention is to use the central and rightmost nodes in the subscript. Since the nodes are ordered counterclockwise, this convention is unambiguous. D: Volume associated with node \(i\) is made up of tetrahedrons that have as their base the triangles that make up the Voronoi cell of the node. The head of the tetrahedron points to some lab frame origin \(\cal{O}\). \(V_{ij}\) is the part of the volume associated to node \(i\) that has its base in the triangle \(i,j,j+1\).

-
Template Parameters
- - - - -
Realtype that will be used for all floating point numbers inside this class/struct. Any data type that satisfies the floating_point_number concept is allowed, for example, float.
Indextype that will be used for all integer numbers inside this class/struct. Any data type that satisfies the indexing_number concept is allowed, for example, unsigned int.
triangulation_typeTemplate parameter that specifies the type of triangulation to be created. This parameter must be chosen from the fp::TriangulationType enum. Defaulted to fp::SPHERICAL_TRIANGULATION.
-
-
+

Visualization of the triangulation. A: Triangulated sphere with \(N_{\mathrm{nodes}}=2252\). Black edges highlight the local neighborhood of a node. Circular arrows show the counterclockwise orientation of the nodes. This choice guarantees that all normal vectors point to the outside of the sphere. B: An arbitrary node \(i\), with its curvature vector \(\vec{K}_{i}\) and a highlighted angle \(\alpha^j_{i,j+1}\) at neighbour \(j\) opposite to the edge \(i, j+1\). Superscript \(j\) denotes the neighboring node to which the angle belongs and subscript \(i,j+1\) denotes the edge opposite of the angle. C: Node \(i\) with its associated Voronoi area \(A_i\) highlighted in red. The node has an associated area inside each triangle it is part of. We also highlight the triangle \(i,j,j+1\) (light red with stripes) with the face normal \(\vec{n}_{i,j,j+1}\) and the area \(A_{i,j,j+1}\). The part of this triangle that is associated with node \(i\) is highlighted in dark red and has the area \(A_{ij}\). The convention is to use the central and rightmost nodes in the subscript. Since the nodes are ordered counterclockwise, this convention is unambiguous. D: Volume associated with node \(i\) is made up of tetrahedrons that have as their base the triangles that make up the Voronoi cell of the node. The head of the tetrahedron points to some lab frame origin \(\cal{O}\). \(V_{ij}\) is the part of the volume associated to node \(i\) that has its base in the triangle \(i,j,j+1\).

Constructor & Destructor Documentation

- -

◆ Triangulation() [1/3]

+ +

◆ Triangulation() [1/2]

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
@@ -274,7 +246,7 @@

Parameters

- + - - + - - - - - - - +
fp::Triangulation< Real, Index, triangulation_type >::Triangulation fp::Triangulation::Triangulation (Json constnodes_input, Json const & nodes_input,
Real verlet_radius_inp 
)Real verlet_radius_inp )
- +
nodes_inputjson object that contains data generated by make_egg_data() function, or similarly structured data.
nodes_inputjson object that contains data generated by make_egg_data() function, or similarly structured data.
verlet_radius_inpValue for Verlet radius.
@@ -282,39 +254,29 @@

-

◆ Triangulation() [2/3]

+ +

◆ Triangulation() [2/2]

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
@@ -334,105 +296,27 @@

-

◆ Triangulation() [3/3]

- -
-
-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
-

- + - - + - - + - - - - - - - +
fp::Triangulation< Real, Index, triangulation_type >::Triangulation fp::Triangulation::Triangulation (Index n_nodes_iter, Index n_nodes_iter,
Real R_initial_input, Real R_initial_input,
Real verlet_radius_inp 
)Real verlet_radius_inp )
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
fp::Triangulation< Real, Index, triangulation_type >::Triangulation (Index n_length,
Index n_width,
Real length,
Real width,
Real verlet_radius_inp 
)
-
-inline
-
- -

Constructor that can initiate a planar triangulation from scratch.

-

This overload initiates a planar triangulation with free floating (non-periodic boundaries). Edge nodes only serve a topological function and they do not contribute curvature or area to the membrane.

Warning
This method belongs to the linear triangulation, which is not fully functional yet.
-
Parameters
- - - - - - -
n_lengthNumber of nodes along the length of the triangulation (at the boundary).
n_widthNumber of nodes along the width of the triangulation (at the boundary).
lengthLength of the planar membrane.
widthWidth of the planar membrane
verlet_radius_inpValue for Verlet radius.
-
-
-

Member Function Documentation

- -

◆ experimental_load_sphere_from_stl()

+ +

◆ experimental_load_sphere_from_stl()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
@@ -447,34 +331,39 @@

Parameters

- + - - + - - - - - - - +
static Triangulation< Real, Index, SPHERICAL_TRIANGULATION > fp::Triangulation< Real, Index, triangulation_type >::experimental_load_sphere_from_stl static Triangulation fp::Triangulation::experimental_load_sphere_from_stl (std::filesystem::path conststl_file_path, std::filesystem::path const & stl_file_path,
Real verlet_radius_inp 
)Real verlet_radius_inp )
- +
stl_file_pathan absolute or relative path to a binary stl file
verlet_radius_inp
verlet_radius_inpstl_file specification has no provision for additional information, thus verlet radius of the triangulation must be provided additionally.
-
Returns
+
Returns
This function tries to construct and return a spherical triangulation. If the stl file contains a triangulation of a different topology then the returned triangulation object will be malformed.
Here is the call graph for this function:
-
+
+ + + + + + +
- -

◆ make_verlet_list()

+ +

◆ make_verlet_list()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
+inlinenodiscardconstexpr
- + - +
void fp::Triangulation< Real, Index, triangulation_type >::make_verlet_list void fp::Triangulation::make_verlet_list ())
@@ -486,26 +375,35 @@

Create a Verlet list.

-

This method creates a Verlet list for each node of the triangulation. All nodes that are inside the verlet_radius, of a given node, are included in its Verlet list (Node.verlet_list),

+

This method creates a Verlet list for each node of the triangulation. All nodes that are inside the verlet_radius, of a given node, are included in its Verlet list (Node.verlet_list),

+
+Here is the call graph for this function:
+
+
+ + + + + + + +
- -

◆ translate_all_nodes()

+ +

◆ translate_all_nodes()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
- - +
- + - - +
void fp::Triangulation< Real, Index, triangulation_type >::translate_all_nodes void fp::Triangulation::translate_all_nodes (vec3< Real > consttranslation_vector)vec3< Real > const & translation_vector)
@@ -526,26 +424,33 @@

Here is the call graph for this function:
-
+
+ + + + + + + + +
-
-

◆ calculate_mass_center()

+ +

◆ calculate_mass_center()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
- + - +
vec3< Real > fp::Triangulation< Real, Index, triangulation_type >::calculate_mass_center vec3< Real > fp::Triangulation::calculate_mass_center ()) const
@@ -558,36 +463,37 @@

Returns
position of the mass center.
+
+Here is the call graph for this function:
+
+
+ + + + + +
-
-

◆ move_node()

+ +

◆ move_node()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
@@ -608,49 +514,53 @@

Here is the call graph for this function:
-
+
+ + + + +
Here is the caller graph for this function:
-
+
+ + + + + + + + +
-
-

◆ emplace_before()

+ +

◆ emplace_before()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>

- + - - + - - - - - - - +
void fp::Triangulation< Real, Index, triangulation_type >::move_node void fp::Triangulation::move_node (Index node_id, Index node_id,
vec3< Real > constdisplacement_vector 
)vec3< Real > const & displacement_vector )
@@ -661,62 +571,77 @@

Adds a new node to the next neighbor list of a given node and calculates their mutual distance.

-
Note
The direct use of this method is discouraged unless a very specific type of edge flipping is required. Triangulation::flip_bond is a more high-level method, suitable for most basic bond-flipping needs.
-

This method finds the anchor node in the Nodes::nn_ids vector of the center_node and uses Node classes own method Node::emplace_nn_id to emplace the new_value there (together with its distance to the center_node).

Parameters
+
Note
The direct use of this method is discouraged unless a very specific type of edge flipping is required. Triangulation::flip_bond is a more high-level method, suitable for most basic bond-flipping needs.
+

This method finds the anchor node in the Nodes::nn_ids vector of the center_node and uses Node classes own method Node::emplace_nn_id to emplace the new_value there (together with its distance to the center_node).

Parameters

- + - - + - - + - - - - - - - +
void fp::Triangulation< Real, Index, triangulation_type >::emplace_before void fp::Triangulation::emplace_before (Index center_node_id, Index center_node_id,
Index anchor_id, Index anchor_id,
Index new_value 
)Index new_value )
- - + +
center_node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1. The new node is emplaced in the Node.nn_ids vector of this node.
anchor_idLocal index in the Node::nn_ids vector, a number between 0 and Node::nn_ids.size() - 1. This is the index of the next neighbor (inside nn_ids vector of the node center_node_id), before which the new node id is emplaced.
center_node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1. The new node is emplaced in the Node.nn_ids vector of this node.
anchor_idLocal index in the Node::nn_ids vector, a number between 0 and Node::nn_ids.size() - 1. This is the index of the next neighbor (inside nn_ids vector of the node center_node_id), before which the new node id is emplaced.
new_valueGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1. The id of the new node.
+Here is the call graph for this function:
+
+
+ + + + + + + + + +
+
Here is the caller graph for this function:
-
+
+ + + + + + + + + + + +
- -

◆ flip_bond()

+ +

◆ flip_bond()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
@@ -745,49 +670,83 @@

Returns
If the flip was successful, the returned BondFlipData struct will contain a boolean state variable BondFlipData::flipped = true. The members BondFlipData::common_nn_0 and BondFlipData::common_nn_1 will contain global ids of new end nodes of the flipped bond. If the flip was not successful, then a default initialized BondFlipData struct will be returned with BondFlipData::flipped = false.
+
Returns
If the flip was successful, the returned BondFlipData struct will contain a boolean state variable BondFlipData::flipped = true. The members BondFlipData::common_nn_0 and BondFlipData::common_nn_1 will contain global ids of new end nodes of the flipped bond. If the flip was not successful, then a default initialized BondFlipData struct will be returned with BondFlipData::flipped = false.
Note
Regardless of the return values, the primary purpose of the function, that of flipping a bond, is accomplished as a side-effect.
+Here is the call graph for this function:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Here is the caller graph for this function:
-
+
+ + + + +
- -

◆ unflip_bond()

+ +

◆ unflip_bond()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>

- + - - + - - + - - + - - - - - - - +
BondFlipData< Index > fp::Triangulation< Real, Index, triangulation_type >::flip_bond BondFlipData fp::Triangulation::flip_bond (Index node_id, Index node_id,
Index nn_id, Index nn_id,
Real min_bond_length_square, Real min_bond_length_square,
Real max_bond_length_square 
)Real max_bond_length_square )
@@ -801,24 +760,25 @@

BondFlipData that holds the information on the current bond holders.

This means that node_id and nn_id are (pre-flip) owners of the bond. And common_nns contains the id's of the current bond owners (to which the bond was flipped to). The edge will be taken away from the current two neighbors and added to the previous owners. All geometric information of the triangulation will be updated.

Warning
This method only works correctly if there were no bond flips after that flip which is being reversed. I.e., this method can only reverse the last flip. Furthermore, the method assumes that the arguments are provided correctly and will result in an illegal triangulation if this is not the case.
-
Note
This method does not check the validity of its input to provide a fast way of flip reversal. It relies on the fact that the user usually has the exact knowledge of all four node id's that participated in a flip and can provide those id's in the correct order. For a safer way of un-fliping, the Triangulation::flip_bond method can be used twice, with interchanged order of arguments.
-

The following example implementation of a Monte Carlo flip update method shows the proper way to use the Triangulation.flip_bond and Triangulation.unflip_bond methods.

+
Note
This method does not check the validity of its input to provide a fast way of flip reversal. It relies on the fact that the user usually has the exact knowledge of all four node id's that participated in a flip and can provide those id's in the correct order. For a safer way of un-fliping, the Triangulation::flip_bond method can be used twice, with interchanged order of arguments.
+

The following example implementation of a Monte Carlo flip update method shows the proper way to use the Triangulation.flip_bond and Triangulation.unflip_bond methods.

++
// `e_old`, `e_new`, `triangulation and `parameters` are data members of the updater
- +
void mc_flipp_update(fp::Node const& node)
{
-
e_old = energy_function(node, triangulation, parameters);
-
Index number_nn_ids = node.nn_ids.size();
-
Index nn_id = node.nn_ids[std::uniform_int_distribution<Index>(0, number_nn_ids-1)(rng)];
-
auto bond_flip_data = triangulation.flip_bond(node.id, nn_id, min_bond_length_square, max_bond_length_square);
- -
e_new = energy_function(node, triangulation, parameters);
-
if (move_needs_undoing()) { triangulation.unflip_bond(node.id, nn_id, bond_flip_data); }
+
e_old = energy_function(node, triangulation, parameters);
+
Index number_nn_ids = node.nn_ids.size();
+
Index nn_id = node.nn_ids[std::uniform_int_distribution<Index>(0, number_nn_ids-1)(rng)];
+
auto bond_flip_data = triangulation.flip_bond(node.id, nn_id, min_bond_length_square, max_bond_length_square);
+
if (bond_flip_data.flipped) {
+
e_new = energy_function(node, triangulation, parameters);
+
if (move_needs_undoing()) { triangulation.unflip_bond(node.id, nn_id, bond_flip_data); }
}
}
-
A helper struct; keeps track of bond flips.
Definition Triangulation.hpp:84
-
bool flipped
track if the bond was flipped.
Definition Triangulation.hpp:85
-
See also
Triangulation.flip_bond BondFlipData
+
A data structure containing all geometric and topological information associated with a node.
Definition Nodes.hpp:30
+
Index id
Global id of the Node, which is a number between 0 and max_number_of_nodes - 1.
Definition Nodes.hpp:32
+
std::vector< Index > nn_ids
A vector containing the global ids of the current node's next neighbors.
Definition Nodes.hpp:81
+
See also
Triangulation.flip_bond BondFlipData
Parameters

- + - - + - - + - - - - - - - +
void fp::Triangulation< Real, Index, triangulation_type >::unflip_bond void fp::Triangulation::unflip_bond (Index node_id, Index node_id,
Index nn_id, Index nn_id,
BondFlipData< Index > constcommon_nns 
)BondFlipData const & common_nns )
@@ -830,55 +790,79 @@

Here is the call graph for this function:
-
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Here is the caller graph for this function:
-
+
+ + + + +
-
-

◆ flip_bond_unchecked()

+ +

◆ flip_bond_unchecked()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>

node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
@@ -888,8 +872,8 @@

Exchange the next neighborhood between four nodes in a manner that will correspond to a bond flip if the provided information was correct.

Warning
This method may lead to an unphysical state (broken lattice that no longer represents a triangulation) if the provided arguments are not correct.
-
Note
For most use-cases the high level methods Triangulation::flip_bond and Triangulation::unflilp_bond are recommended. They guarantee that the performed flips result in a legal triangulation and reject the flip otherwise. This method should only be used by advanced users that have very specific needs for a flip updater.
-

The correct functioning of this method requires that, node_id and nn_id need to be next neighbours, and common_nn_j_m_1 and common_nn_j_p_1 need to be common next neighbors of both node_id and nn_id. Moreover, the nodes need to be ordered in the Node::nn_ids vector of the Node represented by node_id as follows: ... common_nn_j_m_1, node_id, common_nn_j_p_1 ..., or a cyclic permutation thereof.

Parameters
+
Note
For most use-cases the high level methods Triangulation::flip_bond and Triangulation::unflilp_bond are recommended. They guarantee that the performed flips result in a legal triangulation and reject the flip otherwise. This method should only be used by advanced users that have very specific needs for a flip updater.
+

The correct functioning of this method requires that, node_id and nn_id need to be next neighbours, and common_nn_j_m_1 and common_nn_j_p_1 need to be common next neighbors of both node_id and nn_id. Moreover, the nodes need to be ordered in the Node::nn_ids vector of the Node represented by node_id as follows: ... common_nn_j_m_1, node_id, common_nn_j_p_1 ..., or a cyclic permutation thereof.

Parameters

- + - - + - - + - - + - - - - - - - +
BondFlipData< Index > fp::Triangulation< Real, Index, triangulation_type >::flip_bond_unchecked BondFlipData fp::Triangulation::flip_bond_unchecked (Index node_id, Index node_id,
Index nn_id, Index nn_id,
Index common_nn_j_m_1, Index common_nn_j_m_1,
Index common_nn_j_p_1 
)Index common_nn_j_p_1 )
@@ -902,32 +886,50 @@

Here is the call graph for this function:
-
+
+ + + + + + + + + + +
Here is the caller graph for this function:
-
+
+ + + + + + + + + +
-
-

◆ update_bulk_node_geometry()

+ +

◆ update_bulk_node_geometry()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>

node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
nn_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1.
- - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + +
- + - - +
void fp::Triangulation< Real, Index, triangulation_type >::update_bulk_node_geometry void fp::Triangulation::update_bulk_node_geometry (Index node_id)Index node_id)
@@ -940,7 +942,7 @@

See also
Node::curvature_vec, Node::area, Node::volume, Node::unit_bending_energy
+
See also
Node::curvature_vec, Node::area, Node::volume, Node::unit_bending_energy
Parameters
@@ -950,115 +952,81 @@

Here is the call graph for this function:
-
+
+ + + + + + + + + + + + + + + +
Here is the caller graph for this function:
-
-
- - - -
-

◆ partial_voronoi_area_and_face_normal_of_node_in_a_triangle()

- -
-
-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
-

node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
- - - - -
- - - - - - - - - - - - - - - - - - -
static std::tuple< Real, vec3< Real > > fp::Triangulation< Real, Index, triangulation_type >::partial_voronoi_area_and_face_normal_of_node_in_a_triangle (vec3< Real > constlij,
vec3< Real > constlij_p_1 
)
-
-inlinestatic
-
- -

This function is deprecated!

-
Warning
This function is here for legacy reasons! It is deprecated and will be removed in future minor updates. This function returns values of eqn.'s (82) & (84) from the paper Gueguen et al. 2017. Every node has its associated Voronoi area, and each Voronoi area can be subdivided into parts that are associated with each triangle that the node is part of. This function returns that sub-area and the face normal of that triangle.
-
Parameters
- - - -
lijdistance between a node and its jth next neighbor
lij_p_1distance between a node and its j+1th next neighbor
-
-
-
Returns
tuple of the area associated with the node inside the triangle (i,j,j+1) and the face normal of the triangle.
-
-Here is the call graph for this function:
-
-
-
- -
- - -

◆ mixed_area() [1/2]

+
+ + + + + + + + + + + + + + + + + + + + + +

◆ mixed_area()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
@@ -1082,91 +1050,60 @@

Returns
Area associated with the node inside the triangle. See Area \(A_{ij}\) in Figure tr1. C.
-Here is the caller graph for this function:
+Here is the call graph for this function:
-
-
- - +
+ + + + + -
-

◆ mixed_area() [2/2]

- -
-
-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
-

- + - - + - - + - - + - - + - - - - - - - +
static Real fp::Triangulation< Real, Index, triangulation_type >::mixed_area static Real fp::Triangulation::mixed_area (vec3< Real > constlij, vec3< Real > const & lij,
vec3< Real > constlij_p_1, vec3< Real > const & lij_p_1,
Real triangle_area, Real triangle_area,
Real cot_at_j, Real cot_at_j,
Real cot_at_j_p_1 
)Real cot_at_j_p_1 )
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
static Real fp::Triangulation< Real, Index, triangulation_type >::mixed_area (vec3< Real > constlij,
vec3< Real > constlij_p_1,
Real consttriangle_area 
)
-
-inlinestatic
-
- -

This function is deprecated!

-
Warning
This function is here for legacy reasons! It is deprecated and will be removed in future minor updates. Use the alternative mixed_area function instead!
-
Parameters
- - - - -
lijDistance vector between the node and its next neighbor. (Next neighbors are ordered according to the right-hand rule. See Figure tr1. A and C)
lij_p_1Distance vector between the node and its next neighbor. (Next neighbors are ordered according to the right-hand rule)
triangle_areaarea of the triangle \(i,j,j+1\). See Area \(A_{i,j,j+1}\) in Figure tr1. C.
-
-
-
Returns
Area associated with the node inside the triangle. See Area \(A_{ij}\) in Figure tr1. C.
- -
-
- -

◆ get_two_ring_geometry()

+
+Here is the caller graph for this function:
+
+
+ + + + + + + + + + + + + + + + + + +
+ + + + +

◆ get_two_ring_geometry()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
+inlinenodiscard
- + - - +
Geometry< Real, Index > fp::Triangulation< Real, Index, triangulation_type >::get_two_ring_geometry Geometry fp::Triangulation::get_two_ring_geometry (Index node_id)Index node_id) const
-inline
+
Returns
Geometry object containing the geometric quantities of the center node and its next neighbor nodes.
Here is the caller graph for this function:
-
+
+ + + + + + + + + + +
- -

◆ update_two_ring_geometry()

+ +

◆ update_two_ring_geometry()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
- + - - +
void fp::Triangulation< Real, Index, triangulation_type >::update_two_ring_geometry void fp::Triangulation::update_two_ring_geometry (Index node_id)Index node_id)
@@ -1222,46 +1167,54 @@

-Here is the caller graph for this function: +Here is the call graph for this function:
-
-
- - - -
-

◆ scale_node_coordinates()

+
+ + + + + + + + + + + + + + + + + + + + + + + +

◆ scale_node_coordinates()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
@@ -1286,71 +1239,67 @@

Here is the call graph for this function:
-
+
+ + + + + + +
-
-

◆ calculate_diamond_geometry()

+ +

◆ calculate_diamond_geometry()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>

- + - - + - - + - - - - - - - +
void fp::Triangulation< Real, Index, triangulation_type >::scale_node_coordinates void fp::Triangulation::scale_node_coordinates (Real x_stretch, Real x_stretch,
Real y_stretch = 1, Real y_stretch = 1,
Real z_stretch = 1 
)Real z_stretch = 1 )
+inlinenodiscard
- + - - + - - + - - + - - - - - - - +
Geometry< Real, Index > fp::Triangulation< Real, Index, triangulation_type >::calculate_diamond_geometry Geometry fp::Triangulation::calculate_diamond_geometry (Index node_id, Index node_id,
Index nn_id, Index nn_id,
Index cnn_0, Index cnn_0,
Index cnn_1 
) constIndex cnn_1 ) const
-inline

Aggregates the geometric quantities of the diamond configuration of nodes associated with a bond flip.

-
- +
State of the diamond, which contains all nodes that participate in a bond flip.
+
before the flip
- +
common nn 1
/ \
/ \
-
node --------- nn
+
node --------- nn
\ /
\ /
- -
const Nodes< Real, Index > & nodes() const
Returns a constant reference to the underlying Nodes container.
Definition Triangulation.hpp:946
+
common nn 0
+
const Nodes & nodes() const
Returns a constant reference to the underlying Nodes container.
Definition Triangulation.hpp:841
Parameters
@@ -1361,48 +1310,49 @@

Returns
Geometric quantities aggregated over the diamond configuration of nodes associated with a bond flip.
+
+Here is the caller graph for this function:
+
+
+ + + + + + + +
-
-

◆ update_diamond_geometry()

+ +

◆ update_diamond_geometry()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>

node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
@@ -1413,16 +1363,16 @@

Calculates and updates the geometric quantities of the diamond configuration of nodes associated with a bond flip.

-
- +
State of the diamond, which contains all nodes that participate in a bond flip.
+
before the flip
- +
common nn 1
/ \
/ \
-
node --------- nn
+
node --------- nn
\ /
\ /
- +
common nn 0
Parameters

- + - - + - - + - - + - - - - - - - +
void fp::Triangulation< Real, Index, triangulation_type >::update_diamond_geometry void fp::Triangulation::update_diamond_geometry (Index node_id, Index node_id,
Index nn_id, Index nn_id,
Index cnn_0, Index cnn_0,
Index cnn_1 
)Index cnn_1 )
@@ -1435,62 +1385,95 @@

Here is the call graph for this function:
-
+
+ + + + + + + + + + + + + + + + + +
Here is the caller graph for this function:
-
+
+ + + + + + + + + +
-
-

◆ size()

+ +

◆ size()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>

node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
+inlinenodiscard
- + - +
Index fp::Triangulation< Real, Index, triangulation_type >::size Index fp::Triangulation::size ()) const
-inline

Returns the number of nodes in the triangulation.

Returns
Number of the nodes in the triangulation.
+
+Here is the call graph for this function:
+
+
+ + + + + +
- -

◆ operator[]()

+ +

◆ operator[]()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
- + - - +
const Node< Real, Index > & fp::Triangulation< Real, Index, triangulation_type >::operator[] const Node & fp::Triangulation::operator[] (Index idx)Index idx) const
@@ -1512,21 +1495,19 @@

-

◆ nodes()

+ +

◆ nodes()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
+static std::vector< stlTriangle< Real, Index > > 
- + - +
const Nodes< Real, Index > & fp::Triangulation< Real, Index, triangulation_type >::nodes const Nodes & fp::Triangulation::nodes ()) const
@@ -1542,63 +1523,74 @@

Here is the caller graph for this function:
-
+
+ + + + +
-
-

◆ make_egg_data()

+ +

◆ make_egg_data()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
+inlinenodiscard
- + - +
Json fp::Triangulation< Real, Index, triangulation_type >::make_egg_data Json fp::Triangulation::make_egg_data ()) const
-inline

Creates a JSON object with the data of the triangulation.

-

Egg refers to the fact that the data can be used to recreate the triangulation using the Triangulation(Json const& nodes_input, Real verlet_radius_inp) constructor.

Note
The Triangulation(Json const& nodes_input, Real verlet_radius_inp) constructor is currently only implemented for a spherical Triangulation!
+

Egg refers to the fact that the data can be used to recreate the triangulation using the Triangulation(Json const& nodes_input, Real verlet_radius_inp) constructor.

Note
The Triangulation(Json const& nodes_input, Real verlet_radius_inp) constructor is currently only implemented for a spherical Triangulation!
Returns
Triangulation data in JSON format.
+
+Here is the call graph for this function:
+
+
+ + + + + +
- -

◆ global_geometry()

+ +

◆ global_geometry()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
+inlinenodiscard
- + - +
const Geometry< Real, Index > & fp::Triangulation< Real, Index, triangulation_type >::global_geometry const Geometry & fp::Triangulation::global_geometry ()) const
-inline
@@ -1608,21 +1600,19 @@

-

◆ make_global_geometry()

+ +

◆ make_global_geometry()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
- + - +
void fp::Triangulation< Real, Index, triangulation_type >::make_global_geometry void fp::Triangulation::make_global_geometry ())
@@ -1638,58 +1628,47 @@

Here is the call graph for this function:
-
-
- - - -
-

◆ boundary_nodes_ids_set()

+
+ + + + + + + + + + + + + + + + + + + + + + + +

◆ previous_and_next_neighbour_global_ids()

-
-template<floating_point_number Real, indexing_number Index, TriangulationType triangulation_type = SPHERICAL_TRIANGULATION>
- - -
- + - - + -
std::set< Index > fp::Triangulation< Real, Index, triangulation_type >::boundary_nodes_ids_set Neighbors fp::Triangulation::previous_and_next_neighbour_global_ids () constIndex node_id,
-
-inline
-
- -

Returns the ids of all nodes that are not on the boundary.

-

Only works for triangulations that have a boundary.

Returns
unique set of global ids of all nodes that are not on the boundary.
- -
-
- -

◆ update_boundary_node_geometry()

- -
- @@ -1721,17 +1700,14 @@

-
- + - - +
void set_verlet_radius void set_verlet_radius (Real R)Real R)
@@ -1761,7 +1737,7 @@

diff --git a/docs/classfp_1_1_triangulation.js b/docs/classfp_1_1_triangulation.js old mode 100644 new mode 100755 index cec1110..e77c5bf --- a/docs/classfp_1_1_triangulation.js +++ b/docs/classfp_1_1_triangulation.js @@ -1,33 +1,29 @@ var classfp_1_1_triangulation = [ - [ "Triangulation", "classfp_1_1_triangulation.html#ab21e803940915dca4750bb5bd86cd659", null ], - [ "Triangulation", "classfp_1_1_triangulation.html#a758e5f3e3f31aeef799219932b639ded", null ], - [ "Triangulation", "classfp_1_1_triangulation.html#a411d76190690d29b6f7040e8367b95ec", null ], - [ "experimental_load_sphere_from_stl", "classfp_1_1_triangulation.html#a62af174bd11d3db03de25587638ffeb4", null ], - [ "make_verlet_list", "classfp_1_1_triangulation.html#a7a4162ec7ad98f342eeae67ee9451b02", null ], - [ "translate_all_nodes", "classfp_1_1_triangulation.html#aaef436fe4758c409b21a135b329edc17", null ], - [ "calculate_mass_center", "classfp_1_1_triangulation.html#af28b60961d8f8404a796b33b4a769c02", null ], - [ "move_node", "classfp_1_1_triangulation.html#ad8102adbe7dab80cda3209844a939e30", null ], - [ "emplace_before", "classfp_1_1_triangulation.html#a11ee6051e9db388def8aaed68b1841d4", null ], - [ "flip_bond", "classfp_1_1_triangulation.html#a6833f13e1fd24b039ca1ad2969b8d267", null ], - [ "unflip_bond", "classfp_1_1_triangulation.html#a5d1ec431a7a0040d7963e4297a80faaa", null ], - [ "flip_bond_unchecked", "classfp_1_1_triangulation.html#a077d1be6c31f16241e9035c5a0f93652", null ], - [ "update_bulk_node_geometry", "classfp_1_1_triangulation.html#a5d5763865ac706a2e800ed306d070d68", null ], - [ "partial_voronoi_area_and_face_normal_of_node_in_a_triangle", "classfp_1_1_triangulation.html#a75e93af077cc8434bb76a1a4a39f3adf", null ], - [ "mixed_area", "classfp_1_1_triangulation.html#a3e43dfd4b4c9cfd10c5bf4174f2a85d1", null ], - [ "mixed_area", "classfp_1_1_triangulation.html#a847fc218cc1807b7027b069a4239c7db", null ], - [ "get_two_ring_geometry", "classfp_1_1_triangulation.html#a3c660cb2bec69afe055843975698cfd0", null ], - [ "update_two_ring_geometry", "classfp_1_1_triangulation.html#a1d7b2a1e57f742d1d401eeb09b057beb", null ], - [ "scale_node_coordinates", "classfp_1_1_triangulation.html#a692685c96cd6a0cdba72b50adf3fb49b", null ], - [ "calculate_diamond_geometry", "classfp_1_1_triangulation.html#acde5fe59e2fae6494d38f5e957404a70", null ], - [ "update_diamond_geometry", "classfp_1_1_triangulation.html#a762c6430c00d719a8ea5a4a3e89715a8", null ], - [ "size", "classfp_1_1_triangulation.html#a6622782e18f9333c65cfc2403d8a5bfe", null ], - [ "operator[]", "classfp_1_1_triangulation.html#a49a847019900dc667e873d9510ff402a", null ], - [ "nodes", "classfp_1_1_triangulation.html#aeeb65b7f5974560fc57e20b50cf73b41", null ], - [ "make_egg_data", "classfp_1_1_triangulation.html#aca161d492a4ba155d41000e382a95555", null ], - [ "global_geometry", "classfp_1_1_triangulation.html#a9890d90831a7a834e8fffa1c432200d3", null ], - [ "make_global_geometry", "classfp_1_1_triangulation.html#a1afce8afd92f1b88fb15ce7d9cb31edd", null ], - [ "boundary_nodes_ids_set", "classfp_1_1_triangulation.html#a699133c53fc98a6f3ec463bf1567dec6", null ], - [ "update_boundary_node_geometry", "classfp_1_1_triangulation.html#a6ad51f097deab1674fce1800d2f2cf31", null ], + [ "Triangulation", "classfp_1_1_triangulation.html#a77fcff4ef9a09cf5c56fc3e654a99752", null ], + [ "Triangulation", "classfp_1_1_triangulation.html#a940c044d7ab56c67434e7ce118212642", null ], + [ "experimental_load_sphere_from_stl", "classfp_1_1_triangulation.html#a00bb575ea2a3eb3a256e9bb25a885938", null ], + [ "make_verlet_list", "classfp_1_1_triangulation.html#af67a77a76afa6b91149bdebe6a6a247f", null ], + [ "translate_all_nodes", "classfp_1_1_triangulation.html#a405a8a4488dfb19c2b2145ed19fefb2b", null ], + [ "calculate_mass_center", "classfp_1_1_triangulation.html#a6dc2bfefe6d120c1957bfd68fa475851", null ], + [ "move_node", "classfp_1_1_triangulation.html#a37457b9568e1338750e153471a4b7b59", null ], + [ "emplace_before", "classfp_1_1_triangulation.html#a3ba929020c70e27f53acf961f8e88cb2", null ], + [ "flip_bond", "classfp_1_1_triangulation.html#af9b5579bc1812246b7cf96a5c208d7bc", null ], + [ "unflip_bond", "classfp_1_1_triangulation.html#a2b6043010d90086720ac6b2b2e1a9cfa", null ], + [ "flip_bond_unchecked", "classfp_1_1_triangulation.html#a7f32f7136f2123610cbd3ef798329eb8", null ], + [ "update_bulk_node_geometry", "classfp_1_1_triangulation.html#a3b7b50584514fb20c9922b43cf684a31", null ], + [ "mixed_area", "classfp_1_1_triangulation.html#add5f9a26549294b8b94c623056a58b0d", null ], + [ "get_two_ring_geometry", "classfp_1_1_triangulation.html#aa7d571edcee24274dfd464f08d0f187f", null ], + [ "update_two_ring_geometry", "classfp_1_1_triangulation.html#ac1d5244fb8525f776d0adad0b9a0f666", null ], + [ "scale_node_coordinates", "classfp_1_1_triangulation.html#aa3c8d5e088c1c876e8031aced9a1493c", null ], + [ "calculate_diamond_geometry", "classfp_1_1_triangulation.html#a21cb71c7c23dd3ab2cbbc9a1e9ea5c90", null ], + [ "update_diamond_geometry", "classfp_1_1_triangulation.html#af804d75575d1eeb9e02d8c0e97a94004", null ], + [ "size", "classfp_1_1_triangulation.html#a66275f647ea355aa64086353310a7ba9", null ], + [ "operator[]", "classfp_1_1_triangulation.html#a684520ed10082be92bd0c8c5ae326724", null ], + [ "nodes", "classfp_1_1_triangulation.html#a386d52961986a595f42f286cbcd15b01", null ], + [ "make_egg_data", "classfp_1_1_triangulation.html#a702095556e9512260ed57535b85c63ac", null ], + [ "global_geometry", "classfp_1_1_triangulation.html#ace0af615b2b663ef785c72f947479bc4", null ], + [ "make_global_geometry", "classfp_1_1_triangulation.html#a05812c9b913aadc99b3bf7a126316467", null ], + [ "previous_and_next_neighbour_global_ids", "classfp_1_1_triangulation.html#ac9a4311a2afb3a41d08bf1216e0c52eb", null ], [ "set_verlet_radius", "classfp_1_1_triangulation.html#a58c6d3d8705bb041d4114e88bfd32b71", null ] ]; \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation__inherit__graph.dot b/docs/classfp_1_1_triangulation__inherit__graph.dot deleted file mode 100644 index 84bedd4..0000000 --- a/docs/classfp_1_1_triangulation__inherit__graph.dot +++ /dev/null @@ -1,10 +0,0 @@ -digraph "fp::Triangulation< Real, Index, triangulation_type >" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="fp::Triangulation\<\l Real, Index, triangulation\l_type \>",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Implementation of Triangulation of two-dimensional surfaces in 3D."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="orange",style="dashed",tooltip=" ",label=" \< Real, Index, triangulation\l_type \>",fontcolor="grey" ]; - Node2 [id="Node000002",label="fp::Triangulation\<\l Real, Index, triangulation\l_type \>",height=0.2,width=0.4,color="gray40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html",tooltip=" "]; -} diff --git a/docs/classfp_1_1_triangulation_a00bb575ea2a3eb3a256e9bb25a885938_cgraph.map b/docs/classfp_1_1_triangulation_a00bb575ea2a3eb3a256e9bb25a885938_cgraph.map new file mode 100755 index 0000000..ffcf56b --- /dev/null +++ b/docs/classfp_1_1_triangulation_a00bb575ea2a3eb3a256e9bb25a885938_cgraph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classfp_1_1_triangulation_a00bb575ea2a3eb3a256e9bb25a885938_cgraph.md5 b/docs/classfp_1_1_triangulation_a00bb575ea2a3eb3a256e9bb25a885938_cgraph.md5 new file mode 100755 index 0000000..a60fc70 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a00bb575ea2a3eb3a256e9bb25a885938_cgraph.md5 @@ -0,0 +1 @@ +b914ae5b637f6daff7eca64b9b1ec238 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a00bb575ea2a3eb3a256e9bb25a885938_cgraph.png b/docs/classfp_1_1_triangulation_a00bb575ea2a3eb3a256e9bb25a885938_cgraph.png new file mode 100755 index 0000000..e88268d Binary files /dev/null and b/docs/classfp_1_1_triangulation_a00bb575ea2a3eb3a256e9bb25a885938_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a05812c9b913aadc99b3bf7a126316467_cgraph.map b/docs/classfp_1_1_triangulation_a05812c9b913aadc99b3bf7a126316467_cgraph.map new file mode 100755 index 0000000..aec5171 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a05812c9b913aadc99b3bf7a126316467_cgraph.map @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_a05812c9b913aadc99b3bf7a126316467_cgraph.md5 b/docs/classfp_1_1_triangulation_a05812c9b913aadc99b3bf7a126316467_cgraph.md5 new file mode 100755 index 0000000..0e81507 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a05812c9b913aadc99b3bf7a126316467_cgraph.md5 @@ -0,0 +1 @@ +49206295996d43123c63402a992171ff \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a05812c9b913aadc99b3bf7a126316467_cgraph.png b/docs/classfp_1_1_triangulation_a05812c9b913aadc99b3bf7a126316467_cgraph.png new file mode 100755 index 0000000..a0b0d10 Binary files /dev/null and b/docs/classfp_1_1_triangulation_a05812c9b913aadc99b3bf7a126316467_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a077d1be6c31f16241e9035c5a0f93652_cgraph.dot b/docs/classfp_1_1_triangulation_a077d1be6c31f16241e9035c5a0f93652_cgraph.dot deleted file mode 100644 index 3e4971c..0000000 --- a/docs/classfp_1_1_triangulation_a077d1be6c31f16241e9035c5a0f93652_cgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::Triangulation::flip_bond_unchecked" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::Triangulation::\lflip_bond_unchecked",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lemplace_before",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a11ee6051e9db388def8aaed68b1841d4",tooltip="Adds a new node to the next neighbor list of a given node and calculates their mutual distance."]; -} diff --git a/docs/classfp_1_1_triangulation_a077d1be6c31f16241e9035c5a0f93652_icgraph.dot b/docs/classfp_1_1_triangulation_a077d1be6c31f16241e9035c5a0f93652_icgraph.dot deleted file mode 100644 index 404d5eb..0000000 --- a/docs/classfp_1_1_triangulation_a077d1be6c31f16241e9035c5a0f93652_icgraph.dot +++ /dev/null @@ -1,15 +0,0 @@ -digraph "fp::Triangulation::flip_bond_unchecked" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Triangulation::\lflip_bond_unchecked",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lunflip_bond",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a5d1ec431a7a0040d7963e4297a80faaa",tooltip="Un-flip a bond that was just flipped."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a8de725c1ae28fd44d096ffb82467b598",tooltip="Attempt a flip Monte Carlo Step."]; - Node2 -> Node4 [id="edge3_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#acf28ad26646a0e87dce57eed5ca5047c",tooltip="Attempt a flip Monte Carlo Step."]; -} diff --git a/docs/classfp_1_1_triangulation_a11ee6051e9db388def8aaed68b1841d4_icgraph.dot b/docs/classfp_1_1_triangulation_a11ee6051e9db388def8aaed68b1841d4_icgraph.dot deleted file mode 100644 index fe9f922..0000000 --- a/docs/classfp_1_1_triangulation_a11ee6051e9db388def8aaed68b1841d4_icgraph.dot +++ /dev/null @@ -1,17 +0,0 @@ -digraph "fp::Triangulation::emplace_before" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Triangulation::\lemplace_before",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Adds a new node to the next neighbor list of a given node and calculates their mutual distance."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lflip_bond_unchecked",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a077d1be6c31f16241e9035c5a0f93652",tooltip=" "]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Triangulation::\lunflip_bond",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a5d1ec431a7a0040d7963e4297a80faaa",tooltip="Un-flip a bond that was just flipped."]; - Node3 -> Node4 [id="edge3_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a8de725c1ae28fd44d096ffb82467b598",tooltip="Attempt a flip Monte Carlo Step."]; - Node3 -> Node5 [id="edge4_Node000003_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#acf28ad26646a0e87dce57eed5ca5047c",tooltip="Attempt a flip Monte Carlo Step."]; -} diff --git a/docs/classfp_1_1_triangulation_a1afce8afd92f1b88fb15ce7d9cb31edd_cgraph.dot b/docs/classfp_1_1_triangulation_a1afce8afd92f1b88fb15ce7d9cb31edd_cgraph.dot deleted file mode 100644 index 64f8632..0000000 --- a/docs/classfp_1_1_triangulation_a1afce8afd92f1b88fb15ce7d9cb31edd_cgraph.dot +++ /dev/null @@ -1,17 +0,0 @@ -digraph "fp::Triangulation::make_global_geometry" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::Triangulation::\lmake_global_geometry",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Initiates the global geometry of the triangulation."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lupdate_boundary_node\l_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a6ad51f097deab1674fce1800d2f2cf31",tooltip="Updates the local geometry of a boundary node (for triangulation types that have a boundary)."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Triangulation::\lupdate_bulk_node_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a5d5763865ac706a2e800ed306d070d68",tooltip="Update the geometric quantities associated with the given node."]; - Node3 -> Node4 [id="edge3_Node000003_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::Triangulation::\lmixed_area",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a3e43dfd4b4c9cfd10c5bf4174f2a85d1",tooltip="The node-associated area inside a triangle."]; - Node3 -> Node5 [id="edge4_Node000003_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="fp::Neighbors::plus_one",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_neighbors.html#a59501864ac7f34bd676aa97d9faf68cc",tooltip=" "]; -} diff --git a/docs/classfp_1_1_triangulation_a1d7b2a1e57f742d1d401eeb09b057beb_icgraph.dot b/docs/classfp_1_1_triangulation_a1d7b2a1e57f742d1d401eeb09b057beb_icgraph.dot deleted file mode 100644 index eca4059..0000000 --- a/docs/classfp_1_1_triangulation_a1d7b2a1e57f742d1d401eeb09b057beb_icgraph.dot +++ /dev/null @@ -1,17 +0,0 @@ -digraph "fp::Triangulation::update_two_ring_geometry" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Triangulation::\lupdate_two_ring_geometry",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Updates the geometric quantities of the center node and its next neighbor nodes."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lmove_node",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#ad8102adbe7dab80cda3209844a939e30",tooltip="Move an individual node of the triangulation and update all the geometric quantities of the triangula..."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::MonteCarloUpdater\l::move_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#ac3e40c3b93bf2bf6f2b08291357503be",tooltip="Attempt a move Monte Carlo Step."]; - Node2 -> Node4 [id="edge3_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::Triangulation::\lscale_node_coordinates",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a692685c96cd6a0cdba72b50adf3fb49b",tooltip="Method for stretching or squeezing the initial triangulation shape."]; - Node2 -> Node5 [id="edge4_Node000002_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="fp::Triangulation::\ltranslate_all_nodes",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#aaef436fe4758c409b21a135b329edc17",tooltip="Adds the same 3D vector to the positions of each node of the triangulation."]; -} diff --git a/docs/classfp_1_1_triangulation_a21cb71c7c23dd3ab2cbbc9a1e9ea5c90_icgraph.map b/docs/classfp_1_1_triangulation_a21cb71c7c23dd3ab2cbbc9a1e9ea5c90_icgraph.map new file mode 100755 index 0000000..d913eec --- /dev/null +++ b/docs/classfp_1_1_triangulation_a21cb71c7c23dd3ab2cbbc9a1e9ea5c90_icgraph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classfp_1_1_triangulation_a21cb71c7c23dd3ab2cbbc9a1e9ea5c90_icgraph.md5 b/docs/classfp_1_1_triangulation_a21cb71c7c23dd3ab2cbbc9a1e9ea5c90_icgraph.md5 new file mode 100755 index 0000000..2e0b305 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a21cb71c7c23dd3ab2cbbc9a1e9ea5c90_icgraph.md5 @@ -0,0 +1 @@ +4c7cfc4cd9a9dbbccb70d51a944e6f57 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a21cb71c7c23dd3ab2cbbc9a1e9ea5c90_icgraph.png b/docs/classfp_1_1_triangulation_a21cb71c7c23dd3ab2cbbc9a1e9ea5c90_icgraph.png new file mode 100755 index 0000000..af18821 Binary files /dev/null and b/docs/classfp_1_1_triangulation_a21cb71c7c23dd3ab2cbbc9a1e9ea5c90_icgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_cgraph.map b/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_cgraph.map new file mode 100755 index 0000000..55663a4 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_cgraph.map @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_cgraph.md5 b/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_cgraph.md5 new file mode 100755 index 0000000..417a16a --- /dev/null +++ b/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_cgraph.md5 @@ -0,0 +1 @@ +bb9746845458a2a086d71fc93906c446 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_cgraph.png b/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_cgraph.png new file mode 100755 index 0000000..f53f6e3 Binary files /dev/null and b/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_icgraph.map b/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_icgraph.map new file mode 100755 index 0000000..b274c13 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_icgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_icgraph.md5 b/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_icgraph.md5 new file mode 100755 index 0000000..8c3f973 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_icgraph.md5 @@ -0,0 +1 @@ +69286b5d96b66ede5ba09e6170cca075 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_icgraph.png b/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_icgraph.png new file mode 100755 index 0000000..4bb1cb0 Binary files /dev/null and b/docs/classfp_1_1_triangulation_a2b6043010d90086720ac6b2b2e1a9cfa_icgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_cgraph.map b/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_cgraph.map new file mode 100755 index 0000000..a35182f --- /dev/null +++ b/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_cgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_cgraph.md5 b/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_cgraph.md5 new file mode 100755 index 0000000..4a73176 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_cgraph.md5 @@ -0,0 +1 @@ +99d2a249bd72c7b5e5b49474bdb635df \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_cgraph.png b/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_cgraph.png new file mode 100755 index 0000000..c7f66b9 Binary files /dev/null and b/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_icgraph.map b/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_icgraph.map new file mode 100755 index 0000000..26d63a8 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_icgraph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_icgraph.md5 b/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_icgraph.md5 new file mode 100755 index 0000000..bff68dd --- /dev/null +++ b/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_icgraph.md5 @@ -0,0 +1 @@ +437692f50d5cc6fca66cbc81d7aa4d17 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_icgraph.png b/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_icgraph.png new file mode 100755 index 0000000..5c2e35b Binary files /dev/null and b/docs/classfp_1_1_triangulation_a37457b9568e1338750e153471a4b7b59_icgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a386d52961986a595f42f286cbcd15b01_icgraph.map b/docs/classfp_1_1_triangulation_a386d52961986a595f42f286cbcd15b01_icgraph.map new file mode 100755 index 0000000..e0ee800 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a386d52961986a595f42f286cbcd15b01_icgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1_triangulation_a386d52961986a595f42f286cbcd15b01_icgraph.md5 b/docs/classfp_1_1_triangulation_a386d52961986a595f42f286cbcd15b01_icgraph.md5 new file mode 100755 index 0000000..4141d33 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a386d52961986a595f42f286cbcd15b01_icgraph.md5 @@ -0,0 +1 @@ +fe3964de6e332b6a3385cfd105cf5636 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a386d52961986a595f42f286cbcd15b01_icgraph.png b/docs/classfp_1_1_triangulation_a386d52961986a595f42f286cbcd15b01_icgraph.png new file mode 100755 index 0000000..2e29db9 Binary files /dev/null and b/docs/classfp_1_1_triangulation_a386d52961986a595f42f286cbcd15b01_icgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_cgraph.map b/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_cgraph.map new file mode 100755 index 0000000..a9998ec --- /dev/null +++ b/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_cgraph.map @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_cgraph.md5 b/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_cgraph.md5 new file mode 100755 index 0000000..3960738 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_cgraph.md5 @@ -0,0 +1 @@ +b5aa318cc6ed8ddd82579723b59d7892 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_cgraph.png b/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_cgraph.png new file mode 100755 index 0000000..2ea34dc Binary files /dev/null and b/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_icgraph.map b/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_icgraph.map new file mode 100755 index 0000000..08b87cf --- /dev/null +++ b/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_icgraph.map @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_icgraph.md5 b/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_icgraph.md5 new file mode 100755 index 0000000..e0f47c8 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_icgraph.md5 @@ -0,0 +1 @@ +217ac7c4793b93df03a23c4e8c6c3fe0 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_icgraph.png b/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_icgraph.png new file mode 100755 index 0000000..940f7ed Binary files /dev/null and b/docs/classfp_1_1_triangulation_a3b7b50584514fb20c9922b43cf684a31_icgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_cgraph.map b/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_cgraph.map new file mode 100755 index 0000000..687ea8f --- /dev/null +++ b/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_cgraph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_cgraph.md5 b/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_cgraph.md5 new file mode 100755 index 0000000..e8f8995 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_cgraph.md5 @@ -0,0 +1 @@ +48bf7d7a22d658db7a3a136f0e137a40 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_cgraph.png b/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_cgraph.png new file mode 100755 index 0000000..f5400d0 Binary files /dev/null and b/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_icgraph.map b/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_icgraph.map new file mode 100755 index 0000000..de35db4 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_icgraph.map @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_icgraph.md5 b/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_icgraph.md5 new file mode 100755 index 0000000..561c10c --- /dev/null +++ b/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_icgraph.md5 @@ -0,0 +1 @@ +7c303a0c648437e10203fb30730b00fe \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_icgraph.png b/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_icgraph.png new file mode 100755 index 0000000..65fe822 Binary files /dev/null and b/docs/classfp_1_1_triangulation_a3ba929020c70e27f53acf961f8e88cb2_icgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a3c660cb2bec69afe055843975698cfd0_icgraph.dot b/docs/classfp_1_1_triangulation_a3c660cb2bec69afe055843975698cfd0_icgraph.dot deleted file mode 100644 index 5f0c8fe..0000000 --- a/docs/classfp_1_1_triangulation_a3c660cb2bec69afe055843975698cfd0_icgraph.dot +++ /dev/null @@ -1,17 +0,0 @@ -digraph "fp::Triangulation::get_two_ring_geometry" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Triangulation::\lget_two_ring_geometry",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Aggregates and Returns the geometric quantities of the center node and its next neighbor nodes."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lmove_node",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#ad8102adbe7dab80cda3209844a939e30",tooltip="Move an individual node of the triangulation and update all the geometric quantities of the triangula..."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::MonteCarloUpdater\l::move_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#ac3e40c3b93bf2bf6f2b08291357503be",tooltip="Attempt a move Monte Carlo Step."]; - Node2 -> Node4 [id="edge3_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::Triangulation::\lscale_node_coordinates",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a692685c96cd6a0cdba72b50adf3fb49b",tooltip="Method for stretching or squeezing the initial triangulation shape."]; - Node2 -> Node5 [id="edge4_Node000002_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="fp::Triangulation::\ltranslate_all_nodes",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#aaef436fe4758c409b21a135b329edc17",tooltip="Adds the same 3D vector to the positions of each node of the triangulation."]; -} diff --git a/docs/classfp_1_1_triangulation_a3e43dfd4b4c9cfd10c5bf4174f2a85d1_icgraph.dot b/docs/classfp_1_1_triangulation_a3e43dfd4b4c9cfd10c5bf4174f2a85d1_icgraph.dot deleted file mode 100644 index cb6fae8..0000000 --- a/docs/classfp_1_1_triangulation_a3e43dfd4b4c9cfd10c5bf4174f2a85d1_icgraph.dot +++ /dev/null @@ -1,23 +0,0 @@ -digraph "fp::Triangulation::mixed_area" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Triangulation::\lmixed_area",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="The node-associated area inside a triangle."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lpartial_voronoi_area\l_and_face_normal_of_node\l_in_a_triangle",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a75e93af077cc8434bb76a1a4a39f3adf",tooltip="This function is deprecated!"]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Triangulation::\lupdate_bulk_node_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a5d5763865ac706a2e800ed306d070d68",tooltip="Update the geometric quantities associated with the given node."]; - Node3 -> Node4 [id="edge3_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::Triangulation::\lmake_global_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a1afce8afd92f1b88fb15ce7d9cb31edd",tooltip="Initiates the global geometry of the triangulation."]; - Node3 -> Node5 [id="edge4_Node000003_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="fp::Triangulation::\lupdate_diamond_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a762c6430c00d719a8ea5a4a3e89715a8",tooltip="Calculates and updates the geometric quantities of the diamond configuration of nodes associated with..."]; - Node5 -> Node6 [id="edge5_Node000005_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="fp::Triangulation::\lunflip_bond",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a5d1ec431a7a0040d7963e4297a80faaa",tooltip="Un-flip a bond that was just flipped."]; - Node6 -> Node7 [id="edge6_Node000006_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node7 [id="Node000007",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a8de725c1ae28fd44d096ffb82467b598",tooltip="Attempt a flip Monte Carlo Step."]; - Node6 -> Node8 [id="edge7_Node000006_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node8 [id="Node000008",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#acf28ad26646a0e87dce57eed5ca5047c",tooltip="Attempt a flip Monte Carlo Step."]; -} diff --git a/docs/classfp_1_1_triangulation_a405a8a4488dfb19c2b2145ed19fefb2b_cgraph.map b/docs/classfp_1_1_triangulation_a405a8a4488dfb19c2b2145ed19fefb2b_cgraph.map new file mode 100755 index 0000000..4da739c --- /dev/null +++ b/docs/classfp_1_1_triangulation_a405a8a4488dfb19c2b2145ed19fefb2b_cgraph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_a405a8a4488dfb19c2b2145ed19fefb2b_cgraph.md5 b/docs/classfp_1_1_triangulation_a405a8a4488dfb19c2b2145ed19fefb2b_cgraph.md5 new file mode 100755 index 0000000..58e349b --- /dev/null +++ b/docs/classfp_1_1_triangulation_a405a8a4488dfb19c2b2145ed19fefb2b_cgraph.md5 @@ -0,0 +1 @@ +368aa2d0901028e15520b05e001a8aeb \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a405a8a4488dfb19c2b2145ed19fefb2b_cgraph.png b/docs/classfp_1_1_triangulation_a405a8a4488dfb19c2b2145ed19fefb2b_cgraph.png new file mode 100755 index 0000000..7fdb2e3 Binary files /dev/null and b/docs/classfp_1_1_triangulation_a405a8a4488dfb19c2b2145ed19fefb2b_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a5d1ec431a7a0040d7963e4297a80faaa_cgraph.dot b/docs/classfp_1_1_triangulation_a5d1ec431a7a0040d7963e4297a80faaa_cgraph.dot deleted file mode 100644 index d1512e9..0000000 --- a/docs/classfp_1_1_triangulation_a5d1ec431a7a0040d7963e4297a80faaa_cgraph.dot +++ /dev/null @@ -1,21 +0,0 @@ -digraph "fp::Triangulation::unflip_bond" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::Triangulation::\lunflip_bond",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Un-flip a bond that was just flipped."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lflip_bond_unchecked",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a077d1be6c31f16241e9035c5a0f93652",tooltip=" "]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Triangulation::\lemplace_before",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a11ee6051e9db388def8aaed68b1841d4",tooltip="Adds a new node to the next neighbor list of a given node and calculates their mutual distance."]; - Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::Triangulation::\lupdate_diamond_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a762c6430c00d719a8ea5a4a3e89715a8",tooltip="Calculates and updates the geometric quantities of the diamond configuration of nodes associated with..."]; - Node4 -> Node5 [id="edge4_Node000004_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="fp::Triangulation::\lupdate_bulk_node_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a5d5763865ac706a2e800ed306d070d68",tooltip="Update the geometric quantities associated with the given node."]; - Node5 -> Node6 [id="edge5_Node000005_Node000006",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="fp::Triangulation::\lmixed_area",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a3e43dfd4b4c9cfd10c5bf4174f2a85d1",tooltip="The node-associated area inside a triangle."]; - Node5 -> Node7 [id="edge6_Node000005_Node000007",color="steelblue1",style="solid",tooltip=" "]; - Node7 [id="Node000007",label="fp::Neighbors::plus_one",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_neighbors.html#a59501864ac7f34bd676aa97d9faf68cc",tooltip=" "]; -} diff --git a/docs/classfp_1_1_triangulation_a5d1ec431a7a0040d7963e4297a80faaa_icgraph.dot b/docs/classfp_1_1_triangulation_a5d1ec431a7a0040d7963e4297a80faaa_icgraph.dot deleted file mode 100644 index 958b7cc..0000000 --- a/docs/classfp_1_1_triangulation_a5d1ec431a7a0040d7963e4297a80faaa_icgraph.dot +++ /dev/null @@ -1,13 +0,0 @@ -digraph "fp::Triangulation::unflip_bond" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Triangulation::\lunflip_bond",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Un-flip a bond that was just flipped."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a8de725c1ae28fd44d096ffb82467b598",tooltip="Attempt a flip Monte Carlo Step."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#acf28ad26646a0e87dce57eed5ca5047c",tooltip="Attempt a flip Monte Carlo Step."]; -} diff --git a/docs/classfp_1_1_triangulation_a5d5763865ac706a2e800ed306d070d68_cgraph.dot b/docs/classfp_1_1_triangulation_a5d5763865ac706a2e800ed306d070d68_cgraph.dot deleted file mode 100644 index 098ded1..0000000 --- a/docs/classfp_1_1_triangulation_a5d5763865ac706a2e800ed306d070d68_cgraph.dot +++ /dev/null @@ -1,13 +0,0 @@ -digraph "fp::Triangulation::update_bulk_node_geometry" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::Triangulation::\lupdate_bulk_node_geometry",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Update the geometric quantities associated with the given node."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lmixed_area",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a3e43dfd4b4c9cfd10c5bf4174f2a85d1",tooltip="The node-associated area inside a triangle."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Neighbors::plus_one",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_neighbors.html#a59501864ac7f34bd676aa97d9faf68cc",tooltip=" "]; -} diff --git a/docs/classfp_1_1_triangulation_a5d5763865ac706a2e800ed306d070d68_icgraph.dot b/docs/classfp_1_1_triangulation_a5d5763865ac706a2e800ed306d070d68_icgraph.dot deleted file mode 100644 index 1e8a6b7..0000000 --- a/docs/classfp_1_1_triangulation_a5d5763865ac706a2e800ed306d070d68_icgraph.dot +++ /dev/null @@ -1,19 +0,0 @@ -digraph "fp::Triangulation::update_bulk_node_geometry" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Triangulation::\lupdate_bulk_node_geometry",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Update the geometric quantities associated with the given node."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lmake_global_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a1afce8afd92f1b88fb15ce7d9cb31edd",tooltip="Initiates the global geometry of the triangulation."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Triangulation::\lupdate_diamond_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a762c6430c00d719a8ea5a4a3e89715a8",tooltip="Calculates and updates the geometric quantities of the diamond configuration of nodes associated with..."]; - Node3 -> Node4 [id="edge3_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::Triangulation::\lunflip_bond",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a5d1ec431a7a0040d7963e4297a80faaa",tooltip="Un-flip a bond that was just flipped."]; - Node4 -> Node5 [id="edge4_Node000004_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a8de725c1ae28fd44d096ffb82467b598",tooltip="Attempt a flip Monte Carlo Step."]; - Node4 -> Node6 [id="edge5_Node000004_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#acf28ad26646a0e87dce57eed5ca5047c",tooltip="Attempt a flip Monte Carlo Step."]; -} diff --git a/docs/classfp_1_1_triangulation_a62af174bd11d3db03de25587638ffeb4_cgraph.dot b/docs/classfp_1_1_triangulation_a62af174bd11d3db03de25587638ffeb4_cgraph.dot deleted file mode 100644 index 1d2d2b3..0000000 --- a/docs/classfp_1_1_triangulation_a62af174bd11d3db03de25587638ffeb4_cgraph.dot +++ /dev/null @@ -1,13 +0,0 @@ -digraph "fp::Triangulation::experimental_load_sphere_from_stl" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::Triangulation::\lexperimental_load_sphere\l_from_stl",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Special constructor that can initialize a triangulation with spherical topology from a binary stl stl..."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::is_member",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$group___globals.html#ga42171e60ff447e5c0776969445616702",tooltip="Convenient wrapper around std::find, which only works for std::vectors."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Triangulation::\lnodes",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#aeeb65b7f5974560fc57e20b50cf73b41",tooltip="Returns a constant reference to the underlying Nodes container."]; -} diff --git a/docs/classfp_1_1_triangulation_a66275f647ea355aa64086353310a7ba9_cgraph.map b/docs/classfp_1_1_triangulation_a66275f647ea355aa64086353310a7ba9_cgraph.map new file mode 100755 index 0000000..367e139 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a66275f647ea355aa64086353310a7ba9_cgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1_triangulation_a66275f647ea355aa64086353310a7ba9_cgraph.md5 b/docs/classfp_1_1_triangulation_a66275f647ea355aa64086353310a7ba9_cgraph.md5 new file mode 100755 index 0000000..2a97df2 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a66275f647ea355aa64086353310a7ba9_cgraph.md5 @@ -0,0 +1 @@ +9809ad824f01df3fc581fa5f5ca248b4 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a66275f647ea355aa64086353310a7ba9_cgraph.png b/docs/classfp_1_1_triangulation_a66275f647ea355aa64086353310a7ba9_cgraph.png new file mode 100755 index 0000000..d1c8812 Binary files /dev/null and b/docs/classfp_1_1_triangulation_a66275f647ea355aa64086353310a7ba9_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a6833f13e1fd24b039ca1ad2969b8d267_icgraph.dot b/docs/classfp_1_1_triangulation_a6833f13e1fd24b039ca1ad2969b8d267_icgraph.dot deleted file mode 100644 index a7ea64e..0000000 --- a/docs/classfp_1_1_triangulation_a6833f13e1fd24b039ca1ad2969b8d267_icgraph.dot +++ /dev/null @@ -1,13 +0,0 @@ -digraph "fp::Triangulation::flip_bond" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Triangulation::\lflip_bond",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Securely flip the bond inside a quadrilateral formed by the nodes given by node_id,..."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a8de725c1ae28fd44d096ffb82467b598",tooltip="Attempt a flip Monte Carlo Step."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#acf28ad26646a0e87dce57eed5ca5047c",tooltip="Attempt a flip Monte Carlo Step."]; -} diff --git a/docs/classfp_1_1_triangulation_a692685c96cd6a0cdba72b50adf3fb49b_cgraph.dot b/docs/classfp_1_1_triangulation_a692685c96cd6a0cdba72b50adf3fb49b_cgraph.dot deleted file mode 100644 index ffd35c1..0000000 --- a/docs/classfp_1_1_triangulation_a692685c96cd6a0cdba72b50adf3fb49b_cgraph.dot +++ /dev/null @@ -1,15 +0,0 @@ -digraph "fp::Triangulation::scale_node_coordinates" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::Triangulation::\lscale_node_coordinates",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Method for stretching or squeezing the initial triangulation shape."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lmove_node",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#ad8102adbe7dab80cda3209844a939e30",tooltip="Move an individual node of the triangulation and update all the geometric quantities of the triangula..."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Triangulation::\lget_two_ring_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a3c660cb2bec69afe055843975698cfd0",tooltip="Aggregates and Returns the geometric quantities of the center node and its next neighbor nodes."]; - Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::Triangulation::\lupdate_two_ring_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a1d7b2a1e57f742d1d401eeb09b057beb",tooltip="Updates the geometric quantities of the center node and its next neighbor nodes."]; -} diff --git a/docs/classfp_1_1_triangulation_a6ad51f097deab1674fce1800d2f2cf31_icgraph.dot b/docs/classfp_1_1_triangulation_a6ad51f097deab1674fce1800d2f2cf31_icgraph.dot deleted file mode 100644 index 2f48b63..0000000 --- a/docs/classfp_1_1_triangulation_a6ad51f097deab1674fce1800d2f2cf31_icgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::Triangulation::update_boundary_node_geometry" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Triangulation::\lupdate_boundary_node\l_geometry",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Updates the local geometry of a boundary node (for triangulation types that have a boundary)."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lmake_global_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a1afce8afd92f1b88fb15ce7d9cb31edd",tooltip="Initiates the global geometry of the triangulation."]; -} diff --git a/docs/classfp_1_1_triangulation_a6dc2bfefe6d120c1957bfd68fa475851_cgraph.map b/docs/classfp_1_1_triangulation_a6dc2bfefe6d120c1957bfd68fa475851_cgraph.map new file mode 100755 index 0000000..a00062f --- /dev/null +++ b/docs/classfp_1_1_triangulation_a6dc2bfefe6d120c1957bfd68fa475851_cgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1_triangulation_a6dc2bfefe6d120c1957bfd68fa475851_cgraph.md5 b/docs/classfp_1_1_triangulation_a6dc2bfefe6d120c1957bfd68fa475851_cgraph.md5 new file mode 100755 index 0000000..83626dc --- /dev/null +++ b/docs/classfp_1_1_triangulation_a6dc2bfefe6d120c1957bfd68fa475851_cgraph.md5 @@ -0,0 +1 @@ +822855f4e833fe9f64eae7b913fd7ac8 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a6dc2bfefe6d120c1957bfd68fa475851_cgraph.png b/docs/classfp_1_1_triangulation_a6dc2bfefe6d120c1957bfd68fa475851_cgraph.png new file mode 100755 index 0000000..8f731e5 Binary files /dev/null and b/docs/classfp_1_1_triangulation_a6dc2bfefe6d120c1957bfd68fa475851_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a702095556e9512260ed57535b85c63ac_cgraph.map b/docs/classfp_1_1_triangulation_a702095556e9512260ed57535b85c63ac_cgraph.map new file mode 100755 index 0000000..2fcd063 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a702095556e9512260ed57535b85c63ac_cgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1_triangulation_a702095556e9512260ed57535b85c63ac_cgraph.md5 b/docs/classfp_1_1_triangulation_a702095556e9512260ed57535b85c63ac_cgraph.md5 new file mode 100755 index 0000000..06a5070 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a702095556e9512260ed57535b85c63ac_cgraph.md5 @@ -0,0 +1 @@ +2ade583e298d8e4050ef494dd90ba08e \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a702095556e9512260ed57535b85c63ac_cgraph.png b/docs/classfp_1_1_triangulation_a702095556e9512260ed57535b85c63ac_cgraph.png new file mode 100755 index 0000000..294a6e2 Binary files /dev/null and b/docs/classfp_1_1_triangulation_a702095556e9512260ed57535b85c63ac_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a75e93af077cc8434bb76a1a4a39f3adf_cgraph.dot b/docs/classfp_1_1_triangulation_a75e93af077cc8434bb76a1a4a39f3adf_cgraph.dot deleted file mode 100644 index 10629fa..0000000 --- a/docs/classfp_1_1_triangulation_a75e93af077cc8434bb76a1a4a39f3adf_cgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::Triangulation::partial_voronoi_area_and_face_normal_of_node_in_a_triangle" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::Triangulation::\lpartial_voronoi_area\l_and_face_normal_of_node\l_in_a_triangle",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="This function is deprecated!"]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lmixed_area",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a3e43dfd4b4c9cfd10c5bf4174f2a85d1",tooltip="The node-associated area inside a triangle."]; -} diff --git a/docs/classfp_1_1_triangulation_a762c6430c00d719a8ea5a4a3e89715a8_cgraph.dot b/docs/classfp_1_1_triangulation_a762c6430c00d719a8ea5a4a3e89715a8_cgraph.dot deleted file mode 100644 index 9556971..0000000 --- a/docs/classfp_1_1_triangulation_a762c6430c00d719a8ea5a4a3e89715a8_cgraph.dot +++ /dev/null @@ -1,15 +0,0 @@ -digraph "fp::Triangulation::update_diamond_geometry" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::Triangulation::\lupdate_diamond_geometry",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Calculates and updates the geometric quantities of the diamond configuration of nodes associated with..."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lupdate_bulk_node_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a5d5763865ac706a2e800ed306d070d68",tooltip="Update the geometric quantities associated with the given node."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Triangulation::\lmixed_area",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a3e43dfd4b4c9cfd10c5bf4174f2a85d1",tooltip="The node-associated area inside a triangle."]; - Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::Neighbors::plus_one",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_neighbors.html#a59501864ac7f34bd676aa97d9faf68cc",tooltip=" "]; -} diff --git a/docs/classfp_1_1_triangulation_a762c6430c00d719a8ea5a4a3e89715a8_icgraph.dot b/docs/classfp_1_1_triangulation_a762c6430c00d719a8ea5a4a3e89715a8_icgraph.dot deleted file mode 100644 index 9602afa..0000000 --- a/docs/classfp_1_1_triangulation_a762c6430c00d719a8ea5a4a3e89715a8_icgraph.dot +++ /dev/null @@ -1,15 +0,0 @@ -digraph "fp::Triangulation::update_diamond_geometry" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Triangulation::\lupdate_diamond_geometry",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Calculates and updates the geometric quantities of the diamond configuration of nodes associated with..."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lunflip_bond",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a5d1ec431a7a0040d7963e4297a80faaa",tooltip="Un-flip a bond that was just flipped."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a8de725c1ae28fd44d096ffb82467b598",tooltip="Attempt a flip Monte Carlo Step."]; - Node2 -> Node4 [id="edge3_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#acf28ad26646a0e87dce57eed5ca5047c",tooltip="Attempt a flip Monte Carlo Step."]; -} diff --git a/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_cgraph.map b/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_cgraph.map new file mode 100755 index 0000000..9a743ba --- /dev/null +++ b/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_cgraph.map @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_cgraph.md5 b/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_cgraph.md5 new file mode 100755 index 0000000..a787115 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_cgraph.md5 @@ -0,0 +1 @@ +f7ab8d73d6aeaf83a41303156efe8eb8 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_cgraph.png b/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_cgraph.png new file mode 100755 index 0000000..c9601a7 Binary files /dev/null and b/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_icgraph.map b/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_icgraph.map new file mode 100755 index 0000000..2cbb2a1 --- /dev/null +++ b/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_icgraph.map @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_icgraph.md5 b/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_icgraph.md5 new file mode 100755 index 0000000..d4708ae --- /dev/null +++ b/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_icgraph.md5 @@ -0,0 +1 @@ +e9a106bbb50a3d9c01f7bc50e6488ca6 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_icgraph.png b/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_icgraph.png new file mode 100755 index 0000000..cc5b1e3 Binary files /dev/null and b/docs/classfp_1_1_triangulation_a7f32f7136f2123610cbd3ef798329eb8_icgraph.png differ diff --git a/docs/classfp_1_1_triangulation_aa3c8d5e088c1c876e8031aced9a1493c_cgraph.map b/docs/classfp_1_1_triangulation_aa3c8d5e088c1c876e8031aced9a1493c_cgraph.map new file mode 100755 index 0000000..cccee3a --- /dev/null +++ b/docs/classfp_1_1_triangulation_aa3c8d5e088c1c876e8031aced9a1493c_cgraph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classfp_1_1_triangulation_aa3c8d5e088c1c876e8031aced9a1493c_cgraph.md5 b/docs/classfp_1_1_triangulation_aa3c8d5e088c1c876e8031aced9a1493c_cgraph.md5 new file mode 100755 index 0000000..e3dd82b --- /dev/null +++ b/docs/classfp_1_1_triangulation_aa3c8d5e088c1c876e8031aced9a1493c_cgraph.md5 @@ -0,0 +1 @@ +c9e5069a5e2fa01285df3ac1cee038f1 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_aa3c8d5e088c1c876e8031aced9a1493c_cgraph.png b/docs/classfp_1_1_triangulation_aa3c8d5e088c1c876e8031aced9a1493c_cgraph.png new file mode 100755 index 0000000..e06e8cd Binary files /dev/null and b/docs/classfp_1_1_triangulation_aa3c8d5e088c1c876e8031aced9a1493c_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_aa7d571edcee24274dfd464f08d0f187f_icgraph.map b/docs/classfp_1_1_triangulation_aa7d571edcee24274dfd464f08d0f187f_icgraph.map new file mode 100755 index 0000000..e6f85f9 --- /dev/null +++ b/docs/classfp_1_1_triangulation_aa7d571edcee24274dfd464f08d0f187f_icgraph.map @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_aa7d571edcee24274dfd464f08d0f187f_icgraph.md5 b/docs/classfp_1_1_triangulation_aa7d571edcee24274dfd464f08d0f187f_icgraph.md5 new file mode 100755 index 0000000..b5bea07 --- /dev/null +++ b/docs/classfp_1_1_triangulation_aa7d571edcee24274dfd464f08d0f187f_icgraph.md5 @@ -0,0 +1 @@ +c02e560a363c4bb3314356688251f380 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_aa7d571edcee24274dfd464f08d0f187f_icgraph.png b/docs/classfp_1_1_triangulation_aa7d571edcee24274dfd464f08d0f187f_icgraph.png new file mode 100755 index 0000000..3c80c14 Binary files /dev/null and b/docs/classfp_1_1_triangulation_aa7d571edcee24274dfd464f08d0f187f_icgraph.png differ diff --git a/docs/classfp_1_1_triangulation_aaef436fe4758c409b21a135b329edc17_cgraph.dot b/docs/classfp_1_1_triangulation_aaef436fe4758c409b21a135b329edc17_cgraph.dot deleted file mode 100644 index 5d3ebd2..0000000 --- a/docs/classfp_1_1_triangulation_aaef436fe4758c409b21a135b329edc17_cgraph.dot +++ /dev/null @@ -1,15 +0,0 @@ -digraph "fp::Triangulation::translate_all_nodes" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::Triangulation::\ltranslate_all_nodes",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Adds the same 3D vector to the positions of each node of the triangulation."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lmove_node",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#ad8102adbe7dab80cda3209844a939e30",tooltip="Move an individual node of the triangulation and update all the geometric quantities of the triangula..."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Triangulation::\lget_two_ring_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a3c660cb2bec69afe055843975698cfd0",tooltip="Aggregates and Returns the geometric quantities of the center node and its next neighbor nodes."]; - Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::Triangulation::\lupdate_two_ring_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a1d7b2a1e57f742d1d401eeb09b057beb",tooltip="Updates the geometric quantities of the center node and its next neighbor nodes."]; -} diff --git a/docs/classfp_1_1_triangulation_ac1d5244fb8525f776d0adad0b9a0f666_cgraph.map b/docs/classfp_1_1_triangulation_ac1d5244fb8525f776d0adad0b9a0f666_cgraph.map new file mode 100755 index 0000000..aa35d3d --- /dev/null +++ b/docs/classfp_1_1_triangulation_ac1d5244fb8525f776d0adad0b9a0f666_cgraph.map @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_ac1d5244fb8525f776d0adad0b9a0f666_cgraph.md5 b/docs/classfp_1_1_triangulation_ac1d5244fb8525f776d0adad0b9a0f666_cgraph.md5 new file mode 100755 index 0000000..58f6eec --- /dev/null +++ b/docs/classfp_1_1_triangulation_ac1d5244fb8525f776d0adad0b9a0f666_cgraph.md5 @@ -0,0 +1 @@ +df53ecb54f26b8690ce456dabebd0725 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_ac1d5244fb8525f776d0adad0b9a0f666_cgraph.png b/docs/classfp_1_1_triangulation_ac1d5244fb8525f776d0adad0b9a0f666_cgraph.png new file mode 100755 index 0000000..273cc34 Binary files /dev/null and b/docs/classfp_1_1_triangulation_ac1d5244fb8525f776d0adad0b9a0f666_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_ac9a4311a2afb3a41d08bf1216e0c52eb_icgraph.map b/docs/classfp_1_1_triangulation_ac9a4311a2afb3a41d08bf1216e0c52eb_icgraph.map new file mode 100755 index 0000000..065b6ba --- /dev/null +++ b/docs/classfp_1_1_triangulation_ac9a4311a2afb3a41d08bf1216e0c52eb_icgraph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_ac9a4311a2afb3a41d08bf1216e0c52eb_icgraph.md5 b/docs/classfp_1_1_triangulation_ac9a4311a2afb3a41d08bf1216e0c52eb_icgraph.md5 new file mode 100755 index 0000000..d66d9c2 --- /dev/null +++ b/docs/classfp_1_1_triangulation_ac9a4311a2afb3a41d08bf1216e0c52eb_icgraph.md5 @@ -0,0 +1 @@ +15ea940112ec9d1c976451db512b1926 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_ac9a4311a2afb3a41d08bf1216e0c52eb_icgraph.png b/docs/classfp_1_1_triangulation_ac9a4311a2afb3a41d08bf1216e0c52eb_icgraph.png new file mode 100755 index 0000000..e2e8f53 Binary files /dev/null and b/docs/classfp_1_1_triangulation_ac9a4311a2afb3a41d08bf1216e0c52eb_icgraph.png differ diff --git a/docs/classfp_1_1_triangulation_ad8102adbe7dab80cda3209844a939e30_cgraph.dot b/docs/classfp_1_1_triangulation_ad8102adbe7dab80cda3209844a939e30_cgraph.dot deleted file mode 100644 index b97a188..0000000 --- a/docs/classfp_1_1_triangulation_ad8102adbe7dab80cda3209844a939e30_cgraph.dot +++ /dev/null @@ -1,13 +0,0 @@ -digraph "fp::Triangulation::move_node" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::Triangulation::\lmove_node",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Move an individual node of the triangulation and update all the geometric quantities of the triangula..."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lget_two_ring_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a3c660cb2bec69afe055843975698cfd0",tooltip="Aggregates and Returns the geometric quantities of the center node and its next neighbor nodes."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Triangulation::\lupdate_two_ring_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a1d7b2a1e57f742d1d401eeb09b057beb",tooltip="Updates the geometric quantities of the center node and its next neighbor nodes."]; -} diff --git a/docs/classfp_1_1_triangulation_ad8102adbe7dab80cda3209844a939e30_icgraph.dot b/docs/classfp_1_1_triangulation_ad8102adbe7dab80cda3209844a939e30_icgraph.dot deleted file mode 100644 index 11e0d4b..0000000 --- a/docs/classfp_1_1_triangulation_ad8102adbe7dab80cda3209844a939e30_icgraph.dot +++ /dev/null @@ -1,15 +0,0 @@ -digraph "fp::Triangulation::move_node" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Triangulation::\lmove_node",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Move an individual node of the triangulation and update all the geometric quantities of the triangula..."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::MonteCarloUpdater\l::move_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#ac3e40c3b93bf2bf6f2b08291357503be",tooltip="Attempt a move Monte Carlo Step."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Triangulation::\lscale_node_coordinates",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a692685c96cd6a0cdba72b50adf3fb49b",tooltip="Method for stretching or squeezing the initial triangulation shape."]; - Node1 -> Node4 [id="edge3_Node000001_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::Triangulation::\ltranslate_all_nodes",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#aaef436fe4758c409b21a135b329edc17",tooltip="Adds the same 3D vector to the positions of each node of the triangulation."]; -} diff --git a/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_cgraph.map b/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_cgraph.map new file mode 100755 index 0000000..675dc1b --- /dev/null +++ b/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_cgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_cgraph.md5 b/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_cgraph.md5 new file mode 100755 index 0000000..a0a160b --- /dev/null +++ b/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_cgraph.md5 @@ -0,0 +1 @@ +71372ad576629fe3e2f57a3777cca0ba \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_cgraph.png b/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_cgraph.png new file mode 100755 index 0000000..e1e6d16 Binary files /dev/null and b/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_icgraph.map b/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_icgraph.map new file mode 100755 index 0000000..3834649 --- /dev/null +++ b/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_icgraph.map @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_icgraph.md5 b/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_icgraph.md5 new file mode 100755 index 0000000..8903c3b --- /dev/null +++ b/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_icgraph.md5 @@ -0,0 +1 @@ +5f481849094f9c8b8d51c6f6892718a0 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_icgraph.png b/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_icgraph.png new file mode 100755 index 0000000..9974997 Binary files /dev/null and b/docs/classfp_1_1_triangulation_add5f9a26549294b8b94c623056a58b0d_icgraph.png differ diff --git a/docs/classfp_1_1_triangulation_aeeb65b7f5974560fc57e20b50cf73b41_icgraph.dot b/docs/classfp_1_1_triangulation_aeeb65b7f5974560fc57e20b50cf73b41_icgraph.dot deleted file mode 100644 index 5f501cc..0000000 --- a/docs/classfp_1_1_triangulation_aeeb65b7f5974560fc57e20b50cf73b41_icgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::Triangulation::nodes" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Triangulation::\lnodes",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Returns a constant reference to the underlying Nodes container."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lexperimental_load_sphere\l_from_stl",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a62af174bd11d3db03de25587638ffeb4",tooltip="Special constructor that can initialize a triangulation with spherical topology from a binary stl stl..."]; -} diff --git a/docs/classfp_1_1_triangulation_af67a77a76afa6b91149bdebe6a6a247f_cgraph.map b/docs/classfp_1_1_triangulation_af67a77a76afa6b91149bdebe6a6a247f_cgraph.map new file mode 100755 index 0000000..7341a1e --- /dev/null +++ b/docs/classfp_1_1_triangulation_af67a77a76afa6b91149bdebe6a6a247f_cgraph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classfp_1_1_triangulation_af67a77a76afa6b91149bdebe6a6a247f_cgraph.md5 b/docs/classfp_1_1_triangulation_af67a77a76afa6b91149bdebe6a6a247f_cgraph.md5 new file mode 100755 index 0000000..1f20bec --- /dev/null +++ b/docs/classfp_1_1_triangulation_af67a77a76afa6b91149bdebe6a6a247f_cgraph.md5 @@ -0,0 +1 @@ +6e537fac4b30de3234ff46aaaf03d43c \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_af67a77a76afa6b91149bdebe6a6a247f_cgraph.png b/docs/classfp_1_1_triangulation_af67a77a76afa6b91149bdebe6a6a247f_cgraph.png new file mode 100755 index 0000000..2e82bb2 Binary files /dev/null and b/docs/classfp_1_1_triangulation_af67a77a76afa6b91149bdebe6a6a247f_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_cgraph.map b/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_cgraph.map new file mode 100755 index 0000000..bf48721 --- /dev/null +++ b/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_cgraph.map @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_cgraph.md5 b/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_cgraph.md5 new file mode 100755 index 0000000..9568c23 --- /dev/null +++ b/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_cgraph.md5 @@ -0,0 +1 @@ +b3cbc46d62669de6d48b0378b296ff74 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_cgraph.png b/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_cgraph.png new file mode 100755 index 0000000..168a0e6 Binary files /dev/null and b/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_icgraph.map b/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_icgraph.map new file mode 100755 index 0000000..5318eb8 --- /dev/null +++ b/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_icgraph.map @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_icgraph.md5 b/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_icgraph.md5 new file mode 100755 index 0000000..6e4a7d4 --- /dev/null +++ b/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_icgraph.md5 @@ -0,0 +1 @@ +807509678d5b1c889d7180b3fc973619 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_icgraph.png b/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_icgraph.png new file mode 100755 index 0000000..928a275 Binary files /dev/null and b/docs/classfp_1_1_triangulation_af804d75575d1eeb9e02d8c0e97a94004_icgraph.png differ diff --git a/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_cgraph.map b/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_cgraph.map new file mode 100755 index 0000000..94c3837 --- /dev/null +++ b/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_cgraph.map @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_cgraph.md5 b/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_cgraph.md5 new file mode 100755 index 0000000..23c0049 --- /dev/null +++ b/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_cgraph.md5 @@ -0,0 +1 @@ +0c857c6d5c524ad658a4e3ec545782e7 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_cgraph.png b/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_cgraph.png new file mode 100755 index 0000000..7ee5702 Binary files /dev/null and b/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_cgraph.png differ diff --git a/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_icgraph.map b/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_icgraph.map new file mode 100755 index 0000000..48bc861 --- /dev/null +++ b/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_icgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_icgraph.md5 b/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_icgraph.md5 new file mode 100755 index 0000000..e01a883 --- /dev/null +++ b/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_icgraph.md5 @@ -0,0 +1 @@ +1a86a2f5febe2efdbc8db0569482e017 \ No newline at end of file diff --git a/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_icgraph.png b/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_icgraph.png new file mode 100755 index 0000000..fc2ebb9 Binary files /dev/null and b/docs/classfp_1_1_triangulation_af9b5579bc1812246b7cf96a5c208d7bc_icgraph.png differ diff --git a/docs/classfp_1_1experimental_1_1_data_saver-members.html b/docs/classfp_1_1experimental_1_1_data_saver-members.html new file mode 100755 index 0000000..590bedd --- /dev/null +++ b/docs/classfp_1_1experimental_1_1_data_saver-members.html @@ -0,0 +1,127 @@ + + + + + + + +flippy: Member List + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
fp::experimental::DataSaver Member List
+
+
+ +

This is the complete list of members for fp::experimental::DataSaver, including all inherited members.

+ + + + +
flush_data_to_file() (defined in fp::experimental::DataSaver)fp::experimental::DataSaverinline
reset_memory()=0 (defined in fp::experimental::DataSaver)fp::experimental::DataSaverpure virtual
stream_data_to_file()=0 (defined in fp::experimental::DataSaver)fp::experimental::DataSaverpure virtual
+
+ + + + diff --git a/docs/classfp_1_1experimental_1_1_data_saver.html b/docs/classfp_1_1experimental_1_1_data_saver.html new file mode 100755 index 0000000..c4d4250 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1_data_saver.html @@ -0,0 +1,155 @@ + + + + + + + +flippy: fp::experimental::DataSaver Class Reference + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
fp::experimental::DataSaver Class Referenceabstract
+
+
+
+Inheritance diagram for fp::experimental::DataSaver:
+
+
Inheritance graph
+ + + + + + + + + +
[legend]
+ + + + + + + + +

+Public Member Functions

+virtual void reset_memory ()=0
 
+virtual void stream_data_to_file ()=0
 
+void flush_data_to_file ()
 
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/docs/classfp_1_1experimental_1_1_data_saver__inherit__graph.map b/docs/classfp_1_1experimental_1_1_data_saver__inherit__graph.map new file mode 100755 index 0000000..54eb7c8 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1_data_saver__inherit__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/classfp_1_1experimental_1_1_data_saver__inherit__graph.md5 b/docs/classfp_1_1experimental_1_1_data_saver__inherit__graph.md5 new file mode 100755 index 0000000..632d2f5 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1_data_saver__inherit__graph.md5 @@ -0,0 +1 @@ +04dba5fd9b482e4e5bf55bd344725e2b \ No newline at end of file diff --git a/docs/classfp_1_1experimental_1_1_data_saver__inherit__graph.png b/docs/classfp_1_1experimental_1_1_data_saver__inherit__graph.png new file mode 100755 index 0000000..34ce27d Binary files /dev/null and b/docs/classfp_1_1experimental_1_1_data_saver__inherit__graph.png differ diff --git a/docs/classfp_1_1experimental_1_1csv_globals_saver-members.html b/docs/classfp_1_1experimental_1_1csv_globals_saver-members.html new file mode 100755 index 0000000..a5caca7 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1csv_globals_saver-members.html @@ -0,0 +1,130 @@ + + + + + + + +flippy: Member List + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
fp::experimental::csvGlobalsSaver Member List
+
+
+ +

This is the complete list of members for fp::experimental::csvGlobalsSaver, including all inherited members.

+ + + + + + + +
csvGlobalsSaver(std::string filename_inp, std::vector< std::string > names_inp, std::string sep_inp=",") (defined in fp::experimental::csvGlobalsSaver)fp::experimental::csvGlobalsSaverinline
flush_data_to_file() (defined in fp::experimental::DataSaver)fp::experimental::DataSaverinline
reset_memory() override (defined in fp::experimental::csvGlobalsSaver)fp::experimental::csvGlobalsSaverinlinevirtual
save_current_state_in_memory(std::vector< double >const &values_inp) (defined in fp::experimental::csvGlobalsSaver)fp::experimental::csvGlobalsSaverinline
stream_data_to_file() override (defined in fp::experimental::csvGlobalsSaver)fp::experimental::csvGlobalsSaverinlinevirtual
~csvGlobalsSaver() (defined in fp::experimental::csvGlobalsSaver)fp::experimental::csvGlobalsSaverinline
+
+ + + + diff --git a/docs/classfp_1_1experimental_1_1csv_globals_saver.html b/docs/classfp_1_1experimental_1_1csv_globals_saver.html new file mode 100755 index 0000000..b431773 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1csv_globals_saver.html @@ -0,0 +1,221 @@ + + + + + + + +flippy: fp::experimental::csvGlobalsSaver Class Reference + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
fp::experimental::csvGlobalsSaver Class Reference
+
+
+
+Inheritance diagram for fp::experimental::csvGlobalsSaver:
+
+
Inheritance graph
+ + + + + +
[legend]
+
+Collaboration diagram for fp::experimental::csvGlobalsSaver:
+
+
Collaboration graph
+ + + + + +
[legend]
+ + + + + + + + + + + + + +

+Public Member Functions

csvGlobalsSaver (std::string filename_inp, std::vector< std::string > names_inp, std::string sep_inp=",")
 
void reset_memory () override
 
+void save_current_state_in_memory (std::vector< double >const &values_inp)
 
void stream_data_to_file () override
 
- Public Member Functions inherited from fp::experimental::DataSaver
+void flush_data_to_file ()
 
+

Member Function Documentation

+ +

◆ reset_memory()

+ +
+
+ + + + + +
+ + + + + + + +
void fp::experimental::csvGlobalsSaver::reset_memory ()
+
+inlineoverridevirtual
+
+ +

Implements fp::experimental::DataSaver.

+ +
+
+ +

◆ stream_data_to_file()

+ +
+
+ + + + + +
+ + + + + + + +
void fp::experimental::csvGlobalsSaver::stream_data_to_file ()
+
+inlineoverridevirtual
+
+ +

Implements fp::experimental::DataSaver.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/docs/classfp_1_1experimental_1_1csv_globals_saver__coll__graph.map b/docs/classfp_1_1experimental_1_1csv_globals_saver__coll__graph.map new file mode 100755 index 0000000..4755246 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1csv_globals_saver__coll__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1experimental_1_1csv_globals_saver__coll__graph.md5 b/docs/classfp_1_1experimental_1_1csv_globals_saver__coll__graph.md5 new file mode 100755 index 0000000..7fce975 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1csv_globals_saver__coll__graph.md5 @@ -0,0 +1 @@ +b9214df6dfcec68e720a51891e6fc050 \ No newline at end of file diff --git a/docs/classfp_1_1experimental_1_1csv_globals_saver__coll__graph.png b/docs/classfp_1_1experimental_1_1csv_globals_saver__coll__graph.png new file mode 100755 index 0000000..afdb71f Binary files /dev/null and b/docs/classfp_1_1experimental_1_1csv_globals_saver__coll__graph.png differ diff --git a/docs/classfp_1_1experimental_1_1csv_globals_saver__inherit__graph.map b/docs/classfp_1_1experimental_1_1csv_globals_saver__inherit__graph.map new file mode 100755 index 0000000..4755246 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1csv_globals_saver__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1experimental_1_1csv_globals_saver__inherit__graph.md5 b/docs/classfp_1_1experimental_1_1csv_globals_saver__inherit__graph.md5 new file mode 100755 index 0000000..7fce975 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1csv_globals_saver__inherit__graph.md5 @@ -0,0 +1 @@ +b9214df6dfcec68e720a51891e6fc050 \ No newline at end of file diff --git a/docs/classfp_1_1experimental_1_1csv_globals_saver__inherit__graph.png b/docs/classfp_1_1experimental_1_1csv_globals_saver__inherit__graph.png new file mode 100755 index 0000000..afdb71f Binary files /dev/null and b/docs/classfp_1_1experimental_1_1csv_globals_saver__inherit__graph.png differ diff --git a/docs/classfp_1_1experimental_1_1json_data_saver-members.html b/docs/classfp_1_1experimental_1_1json_data_saver-members.html new file mode 100755 index 0000000..26447c7 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1json_data_saver-members.html @@ -0,0 +1,129 @@ + + + + + + + +flippy: Member List + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
fp::experimental::jsonDataSaver Member List
+
+
+ +

This is the complete list of members for fp::experimental::jsonDataSaver, including all inherited members.

+ + + + + + +
flush_data_to_file() (defined in fp::experimental::DataSaver)fp::experimental::DataSaverinline
jsonDataSaver(std::filesystem::path const &save_file_path) (defined in fp::experimental::jsonDataSaver)fp::experimental::jsonDataSaverinlineexplicit
reset_memory() override (defined in fp::experimental::jsonDataSaver)fp::experimental::jsonDataSaverinlinevirtual
save_current_state_in_memory(Triangulation const &triangulation) (defined in fp::experimental::jsonDataSaver)fp::experimental::jsonDataSaverinline
stream_data_to_file() override (defined in fp::experimental::jsonDataSaver)fp::experimental::jsonDataSaverinlinevirtual
+
+ + + + diff --git a/docs/classfp_1_1experimental_1_1json_data_saver.html b/docs/classfp_1_1experimental_1_1json_data_saver.html new file mode 100755 index 0000000..fc5fd16 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1json_data_saver.html @@ -0,0 +1,221 @@ + + + + + + + +flippy: fp::experimental::jsonDataSaver Class Reference + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
fp::experimental::jsonDataSaver Class Reference
+
+
+
+Inheritance diagram for fp::experimental::jsonDataSaver:
+
+
Inheritance graph
+ + + + + +
[legend]
+
+Collaboration diagram for fp::experimental::jsonDataSaver:
+
+
Collaboration graph
+ + + + + +
[legend]
+ + + + + + + + + + + + + +

+Public Member Functions

jsonDataSaver (std::filesystem::path const &save_file_path)
 
void reset_memory () override
 
+void save_current_state_in_memory (Triangulation const &triangulation)
 
void stream_data_to_file () override
 
- Public Member Functions inherited from fp::experimental::DataSaver
+void flush_data_to_file ()
 
+

Member Function Documentation

+ +

◆ reset_memory()

+ +
+
+ + + + + +
+ + + + + + + +
void fp::experimental::jsonDataSaver::reset_memory ()
+
+inlineoverridevirtual
+
+ +

Implements fp::experimental::DataSaver.

+ +
+
+ +

◆ stream_data_to_file()

+ +
+
+ + + + + +
+ + + + + + + +
void fp::experimental::jsonDataSaver::stream_data_to_file ()
+
+inlineoverridevirtual
+
+ +

Implements fp::experimental::DataSaver.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/docs/classfp_1_1experimental_1_1json_data_saver__coll__graph.map b/docs/classfp_1_1experimental_1_1json_data_saver__coll__graph.map new file mode 100755 index 0000000..ad3f74b --- /dev/null +++ b/docs/classfp_1_1experimental_1_1json_data_saver__coll__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1experimental_1_1json_data_saver__coll__graph.md5 b/docs/classfp_1_1experimental_1_1json_data_saver__coll__graph.md5 new file mode 100755 index 0000000..353a0b2 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1json_data_saver__coll__graph.md5 @@ -0,0 +1 @@ +605ad388a8e2444db72212f5779eea5f \ No newline at end of file diff --git a/docs/classfp_1_1experimental_1_1json_data_saver__coll__graph.png b/docs/classfp_1_1experimental_1_1json_data_saver__coll__graph.png new file mode 100755 index 0000000..640b58c Binary files /dev/null and b/docs/classfp_1_1experimental_1_1json_data_saver__coll__graph.png differ diff --git a/docs/classfp_1_1experimental_1_1json_data_saver__inherit__graph.map b/docs/classfp_1_1experimental_1_1json_data_saver__inherit__graph.map new file mode 100755 index 0000000..ad3f74b --- /dev/null +++ b/docs/classfp_1_1experimental_1_1json_data_saver__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1experimental_1_1json_data_saver__inherit__graph.md5 b/docs/classfp_1_1experimental_1_1json_data_saver__inherit__graph.md5 new file mode 100755 index 0000000..353a0b2 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1json_data_saver__inherit__graph.md5 @@ -0,0 +1 @@ +605ad388a8e2444db72212f5779eea5f \ No newline at end of file diff --git a/docs/classfp_1_1experimental_1_1json_data_saver__inherit__graph.png b/docs/classfp_1_1experimental_1_1json_data_saver__inherit__graph.png new file mode 100755 index 0000000..640b58c Binary files /dev/null and b/docs/classfp_1_1experimental_1_1json_data_saver__inherit__graph.png differ diff --git a/docs/classfp_1_1experimental_1_1xyz_data_saver-members.html b/docs/classfp_1_1experimental_1_1xyz_data_saver-members.html new file mode 100755 index 0000000..da3d008 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1xyz_data_saver-members.html @@ -0,0 +1,129 @@ + + + + + + + +flippy: Member List + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
fp::experimental::xyzDataSaver Member List
+
+
+ +

This is the complete list of members for fp::experimental::xyzDataSaver, including all inherited members.

+ + + + + + +
flush_data_to_file() (defined in fp::experimental::DataSaver)fp::experimental::DataSaverinline
reset_memory() override (defined in fp::experimental::xyzDataSaver)fp::experimental::xyzDataSaverinlinevirtual
save_current_state_in_memory(Triangulation const &triangulation, GlobalsMakerFuncType const &globals_maker) (defined in fp::experimental::xyzDataSaver)fp::experimental::xyzDataSaverinline
stream_data_to_file() override (defined in fp::experimental::xyzDataSaver)fp::experimental::xyzDataSaverinlinevirtual
xyzDataSaver(std::filesystem::path const &save_file_path, std::vector< xyzProperty > const &properties_inp, StreamParticleFuncType stream_particle_inp) (defined in fp::experimental::xyzDataSaver)fp::experimental::xyzDataSaverinlineexplicit
+
+ + + + diff --git a/docs/classfp_1_1experimental_1_1xyz_data_saver.html b/docs/classfp_1_1experimental_1_1xyz_data_saver.html new file mode 100755 index 0000000..a7da9ab --- /dev/null +++ b/docs/classfp_1_1experimental_1_1xyz_data_saver.html @@ -0,0 +1,221 @@ + + + + + + + +flippy: fp::experimental::xyzDataSaver Class Reference + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
fp::experimental::xyzDataSaver Class Reference
+
+
+
+Inheritance diagram for fp::experimental::xyzDataSaver:
+
+
Inheritance graph
+ + + + + +
[legend]
+
+Collaboration diagram for fp::experimental::xyzDataSaver:
+
+
Collaboration graph
+ + + + + +
[legend]
+ + + + + + + + + + + + + +

+Public Member Functions

xyzDataSaver (std::filesystem::path const &save_file_path, std::vector< xyzProperty > const &properties_inp, StreamParticleFuncType stream_particle_inp)
 
void reset_memory () override
 
+void save_current_state_in_memory (Triangulation const &triangulation, GlobalsMakerFuncType const &globals_maker)
 
void stream_data_to_file () override
 
- Public Member Functions inherited from fp::experimental::DataSaver
+void flush_data_to_file ()
 
+

Member Function Documentation

+ +

◆ reset_memory()

+ +
+
+ + + + + +
+ + + + + + + +
void fp::experimental::xyzDataSaver::reset_memory ()
+
+inlineoverridevirtual
+
+ +

Implements fp::experimental::DataSaver.

+ +
+
+ +

◆ stream_data_to_file()

+ +
+
+ + + + + +
+ + + + + + + +
void fp::experimental::xyzDataSaver::stream_data_to_file ()
+
+inlineoverridevirtual
+
+ +

Implements fp::experimental::DataSaver.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/docs/classfp_1_1experimental_1_1xyz_data_saver__coll__graph.map b/docs/classfp_1_1experimental_1_1xyz_data_saver__coll__graph.map new file mode 100755 index 0000000..656fb3f --- /dev/null +++ b/docs/classfp_1_1experimental_1_1xyz_data_saver__coll__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1experimental_1_1xyz_data_saver__coll__graph.md5 b/docs/classfp_1_1experimental_1_1xyz_data_saver__coll__graph.md5 new file mode 100755 index 0000000..1328df8 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1xyz_data_saver__coll__graph.md5 @@ -0,0 +1 @@ +3e71e96e928d60ac56877691152add37 \ No newline at end of file diff --git a/docs/classfp_1_1experimental_1_1xyz_data_saver__coll__graph.png b/docs/classfp_1_1experimental_1_1xyz_data_saver__coll__graph.png new file mode 100755 index 0000000..079be4a Binary files /dev/null and b/docs/classfp_1_1experimental_1_1xyz_data_saver__coll__graph.png differ diff --git a/docs/classfp_1_1experimental_1_1xyz_data_saver__inherit__graph.map b/docs/classfp_1_1experimental_1_1xyz_data_saver__inherit__graph.map new file mode 100755 index 0000000..656fb3f --- /dev/null +++ b/docs/classfp_1_1experimental_1_1xyz_data_saver__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1experimental_1_1xyz_data_saver__inherit__graph.md5 b/docs/classfp_1_1experimental_1_1xyz_data_saver__inherit__graph.md5 new file mode 100755 index 0000000..1328df8 --- /dev/null +++ b/docs/classfp_1_1experimental_1_1xyz_data_saver__inherit__graph.md5 @@ -0,0 +1 @@ +3e71e96e928d60ac56877691152add37 \ No newline at end of file diff --git a/docs/classfp_1_1experimental_1_1xyz_data_saver__inherit__graph.png b/docs/classfp_1_1experimental_1_1xyz_data_saver__inherit__graph.png new file mode 100755 index 0000000..079be4a Binary files /dev/null and b/docs/classfp_1_1experimental_1_1xyz_data_saver__inherit__graph.png differ diff --git a/docs/classfp_1_1implementation_1_1stl_serializer-members.html b/docs/classfp_1_1implementation_1_1stl_serializer-members.html old mode 100644 new mode 100755 index 2db5e54..1b549d0 --- a/docs/classfp_1_1implementation_1_1stl_serializer-members.html +++ b/docs/classfp_1_1implementation_1_1stl_serializer-members.html @@ -3,16 +3,18 @@ - + flippy: Member List + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@

@@ -111,7 +118,7 @@ diff --git a/docs/classfp_1_1implementation_1_1stl_serializer.html b/docs/classfp_1_1implementation_1_1stl_serializer.html old mode 100644 new mode 100755 index 8c482ad..c4ae100 --- a/docs/classfp_1_1implementation_1_1stl_serializer.html +++ b/docs/classfp_1_1implementation_1_1stl_serializer.html @@ -3,16 +3,18 @@ - + flippy: fp::implementation::stlSerializer< Real, Index > Class Template Reference + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -109,7 +116,7 @@

Static Public Member Functions

-static std::vector< stlTriangle< Real, Index > > read_STLSolid_into_triangle_vec (std::filesystem::path const &input_file)
read_STLSolid_into_triangle_vec (std::filesystem::path const &input_file)
 

The documentation for this class was generated from the following file:
    @@ -121,7 +128,7 @@ diff --git a/docs/classfp_1_1implementation_1_1stl_triangle-members.html b/docs/classfp_1_1implementation_1_1stl_triangle-members.html old mode 100644 new mode 100755 index aa653bd..9cc6cd7 --- a/docs/classfp_1_1implementation_1_1stl_triangle-members.html +++ b/docs/classfp_1_1implementation_1_1stl_triangle-members.html @@ -3,16 +3,18 @@ - + flippy: Member List + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -120,7 +127,7 @@ diff --git a/docs/classfp_1_1implementation_1_1stl_triangle.html b/docs/classfp_1_1implementation_1_1stl_triangle.html old mode 100644 new mode 100755 index 2a21f79..006b33c --- a/docs/classfp_1_1implementation_1_1stl_triangle.html +++ b/docs/classfp_1_1implementation_1_1stl_triangle.html @@ -3,16 +3,18 @@ - + flippy: fp::implementation::stlTriangle< Real, Index > Class Template Reference + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -110,30 +117,35 @@ Collaboration diagram for fp::implementation::stlTriangle< Real, Index >:
Collaboration graph
+ + + + +
[legend]
+  +  +  +vec3< float > const &  +rawSTLTriangle  +std::pair< Index, Index >  +stlNode< Real, Index > & 

Public Member Functions

stlTriangle (stlNode< Real, Index > &n1_inp, stlNode< Real, Index > &n2_inp, stlNode< Real, Index > &n3_inp, vec3< float > const &normal_inp)
stlTriangle (stlNode< Real, Index > &n1_inp, stlNode< Real, Index > &n2_inp, stlNode< Real, Index > &n3_inp, vec3< float > const &normal_inp)
 
stlTriangle (stlNode< Real, Index > &n1_inp, stlNode< Real, Index > &n2_inp, stlNode< Real, Index > &n3_inp)
stlTriangle (stlNode< Real, Index > &n1_inp, stlNode< Real, Index > &n2_inp, stlNode< Real, Index > &n3_inp)
 
stlTriangle (rawSTLTriangle const &stl_triangle)
stlTriangle (rawSTLTriangle const &stl_triangle)
 
-vec3< float > constnormal () const
normal () const
 
-rawSTLTriangle to_stl_triangle () const
to_stl_triangle () const
 
-std::pair< Index, Index > other_node_ids (Index loc_node_id)
other_node_ids (Index loc_node_id)
 
-stlNode< Real, Index > & operator[] (Index idx)
operator[] (Index idx)
 

@@ -157,7 +169,7 @@ diff --git a/docs/classfp_1_1implementation_1_1stl_triangle__coll__graph.dot b/docs/classfp_1_1implementation_1_1stl_triangle__coll__graph.dot deleted file mode 100644 index 215244f..0000000 --- a/docs/classfp_1_1implementation_1_1stl_triangle__coll__graph.dot +++ /dev/null @@ -1,10 +0,0 @@ -digraph "fp::implementation::stlTriangle< Real, Index >" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="fp::implementation\l::stlTriangle\< Real,\l Index \>",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; - Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" n1_\nn2_\nn3_",fontcolor="grey" ]; - Node2 [id="Node000002",label="stlNode\< Real, Index \>",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; -} diff --git a/docs/classfp_1_1implementation_1_1stl_triangle__coll__graph.map b/docs/classfp_1_1implementation_1_1stl_triangle__coll__graph.map new file mode 100755 index 0000000..f4fc363 --- /dev/null +++ b/docs/classfp_1_1implementation_1_1stl_triangle__coll__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1implementation_1_1stl_triangle__coll__graph.md5 b/docs/classfp_1_1implementation_1_1stl_triangle__coll__graph.md5 new file mode 100755 index 0000000..977250d --- /dev/null +++ b/docs/classfp_1_1implementation_1_1stl_triangle__coll__graph.md5 @@ -0,0 +1 @@ +375a886decfadca672db58e8c5b24bdf \ No newline at end of file diff --git a/docs/classfp_1_1implementation_1_1stl_triangle__coll__graph.png b/docs/classfp_1_1implementation_1_1stl_triangle__coll__graph.png new file mode 100755 index 0000000..4b108ae Binary files /dev/null and b/docs/classfp_1_1implementation_1_1stl_triangle__coll__graph.png differ diff --git a/docs/classfp_1_1vec3-members.html b/docs/classfp_1_1vec3-members.html old mode 100644 new mode 100755 index 82d4a44..dd2dbbf --- a/docs/classfp_1_1vec3-members.html +++ b/docs/classfp_1_1vec3-members.html @@ -3,16 +3,18 @@ - + flippy: Member List + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -112,32 +119,31 @@

norm() constfp::vec3< Real >inline
norm_square() constfp::vec3< Real >inline
normalize()fp::vec3< Real >inline
operator*fp::vec3< Real >friend
operator*fp::vec3< Real >friend
operator+fp::vec3< Real >friend
operator+=fp::vec3< Real >friend
operator-fp::vec3< Real >friend
operator-fp::vec3< Real >friend
operator-fp::vec3< Real >friend
operator-=fp::vec3< Real >friend
operator/fp::vec3< Real >friend
operator/=fp::vec3< Real >friend
operator<<fp::vec3< Real >friend
operator==(vec3< Real > const &other) const =defaultfp::vec3< Real >
operator[](Index idx)fp::vec3< Real >inline
operator[](Index idx) constfp::vec3< Real >inline
scale(Real s)fp::vec3< Real >inline
size() constfp::vec3< Real >inline
subtract(vec3< Real > const &v)fp::vec3< Real >inline
xfp::vec3< Real >
yfp::vec3< Real >
zfp::vec3< Real >
operator*(Real const &lhs, vec3< Real > rhs)fp::vec3< Real >friend
operator*(vec3< Real > lhs, Real const &rhs)fp::vec3< Real >friend
operator+(vec3< Real > lhs, vec3< Real > const &rhs)fp::vec3< Real >friend
operator+=(vec3< Real > &lhs, vec3< Real > const &rhs)fp::vec3< Real >friend
operator-(vec3< Real > lhs, vec3< Real > const &rhs)fp::vec3< Real >friend
operator-(vec3< Real > v)fp::vec3< Real >friend
operator-=(vec3< Real > &lhs, vec3< Real > const &rhs)fp::vec3< Real >friend
operator/(vec3< Real > lhs, Real const &rhs)fp::vec3< Real >friend
operator/=(vec3< Real > &lhs, Real const &rhs)fp::vec3< Real >friend
operator<<(std::ostream &os, const vec3< Real > &obj)fp::vec3< Real >friend
operator==(vec3< Real > const &other) const =defaultfp::vec3< Real >
operator[](Index idx)fp::vec3< Real >inline
operator[](Index idx) constfp::vec3< Real >inline
scale(Real s)fp::vec3< Real >inline
size() constfp::vec3< Real >inline
subtract(vec3< Real > const &v)fp::vec3< Real >inline
xfp::vec3< Real >
yfp::vec3< Real >
zfp::vec3< Real >
diff --git a/docs/classfp_1_1vec3.html b/docs/classfp_1_1vec3.html old mode 100644 new mode 100755 index 5d9d9bf..93671d2 --- a/docs/classfp_1_1vec3.html +++ b/docs/classfp_1_1vec3.html @@ -3,16 +3,18 @@ - + flippy: fp::vec3< Real > Class Template Reference + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -110,61 +117,66 @@

Internal implementation of a 3D vector. - More...

+ More...

#include <vec3.hpp>

Collaboration diagram for fp::vec3< Real >:
Collaboration graph
+ + + + +
[legend]
- + - + - + - + - + - + - + - + - + - + - - + - - +

Public Member Functions

void add (vec3< Real > const &v)
void add (vec3< Real > const &v)
 In place addition method.
 
void subtract (vec3< Real > const &v)
void subtract (vec3< Real > const &v)
 In place subtraction method.
 
void scale (Real s)
void scale (Real s)
 Scale the vector by a real number s.
 
Real dot (vec3< Real > const &v) const
Real dot (vec3< Real > const &v) const
 Calculate dot product with another vector.
 
constexpr std::size_t size () const
constexpr std::size_t size () const
 Always returns 3.
 
vec3< Real > cross (vec3< Real > const &other) const
vec3< Real > cross (vec3< Real > const &other) const
 Calculate cross product with another vector.
 
Real norm () const
Real norm () const
 Returns the norm of the vector.
 
Real norm_square () const
Real norm_square () const
 Returns the square of the norm of the vector.
 
vec3< Real > constnormalize ()
vec3< Real > const & normalize ()
 Normalize the vector in place. And return a reference to the new normalized vector.
 
bool operator== (vec3< Real > const &other) const =default
bool operator== (vec3< Real > const &other) const =default
 default equality operator.
 
template<typename Index >
+
template<typename Index >
requires std::is_integral_v<Index>
Real & operator[] (Index idx)
Real & operator[] (Index idx)
 element access operator.
 
template<typename Index >
+
template<typename Index >
requires std::is_integral_v<Index>
const Real & operator[] (Index idx) const
const Real & operator[] (Index idx) const
 element access operator for constant environments.
 
- +

Static Public Member Functions

static vec3< Real > cross (vec3< Real > const &a, vec3< Real > const &b)
static vec3< Real > cross (vec3< Real > const &a, vec3< Real > const &b)
 Calculate cross product between two vectors.
 
@@ -186,39 +198,36 @@ +std::ostream &  - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - -

Friends

-std::ostream & operator<< (std::ostream &os, const vec3< Real > &obj)
operator<< (std::ostream &os, const vec3< Real > &obj)
 Streaming operator for easy printing of the vector.
 
vec3< Real > operator+ (vec3< Real > lhs, vec3< Real > const &rhs)
vec3< Real > operator+ (vec3< Real > lhs, vec3< Real > const &rhs)
 Overloaded operator defined in terms of vec2::add.
 
void operator+= (vec3< Real > &lhs, vec3< Real > const &rhs)
 Overloaded operator defined in terms of vec3::add.
void operator+= (vec3< Real > &lhs, vec3< Real > const &rhs)
 Overloaded operator defined in terms of vec3::add.
 
vec3< Real > operator- (vec3< Real > lhs, vec3< Real > const &rhs)
 Overloaded operator defined in terms of vec3::subtract.
vec3< Real > operator- (vec3< Real > lhs, vec3< Real > const &rhs)
 Overloaded operator defined in terms of vec3::subtract.
 
void operator-= (vec3< Real > &lhs, vec3< Real > const &rhs)
 Overloaded operator defined in terms of vec3::subtract.
void operator-= (vec3< Real > &lhs, vec3< Real > const &rhs)
 Overloaded operator defined in terms of vec3::subtract.
 
vec3< Real > operator* (Real const &lhs, vec3< Real > rhs)
 Overloaded operator defined in terms of vec3::scale.
vec3< Real > operator* (Real const &lhs, vec3< Real > rhs)
 Overloaded operator defined in terms of vec3::scale.
 
vec3< Real > operator* (vec3< Real > lhs, Real const &rhs)
 Overloaded operator defined in terms of vec3::scale.
vec3< Real > operator* (vec3< Real > lhs, Real const &rhs)
 Overloaded operator defined in terms of vec3::scale.
 
void operator/= (vec3< Real > &lhs, Real const &rhs)
 Overloaded operator defined in terms of vec3::scale.
void operator/= (vec3< Real > &lhs, Real const &rhs)
 Overloaded operator defined in terms of vec3::scale.
 
vec3< Real > operator/ (vec3< Real > lhs, Real const &rhs)
 Overloaded operator defined in terms of vec3::scale.
vec3< Real > operator/ (vec3< Real > lhs, Real const &rhs)
 Overloaded operator defined in terms of vec3::scale.
 
vec3< Real > operator- (vec3< Real > v)
vec3< Real > operator- (vec3< Real > v)
 Unary minus operator.
 
vec3< Real > operator- (vec3< Real > &&v)
 Unary minus operator for rvalues.
 

Detailed Description

template<floating_point_number Real>
@@ -226,16 +235,16 @@

!!! vec3 does not throw !!! This means that if you ask vec3 to divide a vector by 0 or more realistically if you normalize a zero length vector vec3 will not check for the division by zero and will return a nan result! Since vec3 is used everywhere in flippy, including in very expensive calculations, I decided to omit the security check for the sake of speed.

To keep the external dependencies low, flippy implements it's own 3D vector class with basic functionality like dot product and cross product

Example:

++
-
fp::vec3<double> v1{1,0,0};
-
fp::vec3<double> v2{0,0,1};
+
fp::vec3<double> v1{1,0,0};
+
fp::vec3<double> v2{0,0,1};
assert(v1.dot(v2)==0);
assert(v1.cross(v2).norm()==1);
-
assert(((v1-v2)==fp::vec3<double>{1.,0.,-1.}));
-
A helper struct; keeps track of bond flips.
Definition Triangulation.hpp:84
+
assert(((v1-v2)==fp::vec3<double>{1.,0.,-1.}));
+
Internal implementation of a 3D vector.
Definition vec3.hpp:43
Template Parameters
- +
Realtype that will be used for all floating point numbers inside this class/struct. Any data type that satisfies the floating_point_number concept is allowed, for example, float.
Realtype that will be used for all floating point numbers inside this class/struct. Any data type that satisfies the floating_point_number concept is allowed, for example, float.
@@ -252,10 +261,9 @@

- + - - +
void fp::vec3< Real >::add void fp::vec3< Real >::add (vec3< Real > constv)vec3< Real > const & v)
@@ -268,9 +276,10 @@

++
-
fp::vec3<double> v1{1,0,0};
-
fp::vec3<double> v2{0,0,1};
-
v1.add(v2); // v1 will contain {1, 0, 1}
+
fp::vec3<double> v1{1,0,0};
+
fp::vec3<double> v2{0,0,1};
+
v1.add(v2); // v1 will contain {1, 0, 1}
+
void add(vec3< Real > const &v)
In place addition method.
Definition vec3.hpp:60

Parameters
@@ -292,10 +301,9 @@

vadd this vector elementwise to the vector that is calling the add method.
- + - - +
void fp::vec3< Real >::subtract void fp::vec3< Real >::subtract (vec3< Real > constv)vec3< Real > const & v)
@@ -308,9 +316,10 @@

++
-
fp::vec3<double> v1{2,0,0};
-
fp::vec3<double> v2{1,0,1};
-
v1.subtract(v2); // v1 will contain {1, 0, -1}
+
fp::vec3<double> v1{2,0,0};
+
fp::vec3<double> v2{1,0,1};
+
v1.subtract(v2); // v1 will contain {1, 0, -1}
+
void subtract(vec3< Real > const &v)
In place subtraction method.
Definition vec3.hpp:77

Parameters
@@ -332,10 +341,9 @@

vsubtract this vector elementwise from the vector that is calling the subtract method.
- + - - +
void fp::vec3< Real >::scale void fp::vec3< Real >::scale (Real s)Real s)
@@ -370,8 +378,7 @@

Real fp::vec3< Real >::dot

(vec3< Real > constv)vec3< Real > const & v) const
@@ -383,10 +390,11 @@

Calculate dot product with another vector.

-

Example:

{c++}
-
fp::vec3<double> v1{1,0,0};
-
fp::vec3<double> v2{2,0,1};
-
double res = v1.dot(v2); // res will contain 2*1 + 0*0 + 0*1=2
+

Example:

{c++}
+
fp::vec3<double> v1{1,0,0};
+
fp::vec3<double> v2{2,0,1};
+
double res = v1.dot(v2); // res will contain 2*1 + 0*0 + 0*1=2
+
Real dot(vec3< Real > const &v) const
Calculate dot product with another vector.
Definition vec3.hpp:106
Parameters
@@ -398,6 +406,37 @@

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -414,15 +453,15 @@

vthe other vec3 vector
- + - +
constexpr std::size_t fp::vec3< Real >::size std::size_t fp::vec3< Real >::size ()) const

-inlineconstexpr

@@ -482,6 +514,29 @@

Returns
result of the cross product between the original vector and v.
+
+Here is the caller graph for this function:
+
+
+ + + + + + + + + + + + + + + + + + +
@@ -499,8 +554,7 @@

vec3< Real > fp::vec3< Real >::cross

- - +
afirst vector of the cross product
(vec3< Real > constother)vec3< Real > const & other) const
@@ -512,10 +566,10 @@

Calculate cross product with another vector.

-

Example:

{c++}
-
fp::vec3<double> v1{1,0,0};
-
fp::vec3<double> v2{0,1,0};
-
fp::vec3<double> v3 = v1.cross(v2); // v3 will contain {0,0,1}
+

Example:

{c++}
+
fp::vec3<double> v1{1,0,0};
+
fp::vec3<double> v2{0,1,0};
+
fp::vec3<double> v3 = v1.cross(v2); // v3 will contain {0,0,1}
Parameters
@@ -527,11 +581,19 @@

+ + + +
Here is the caller graph for this function:
+ + + +
@@ -550,7 +612,7 @@

Real fp::vec3< Real >::norm

- +
otherthe other vec3 vector.
()) const
@@ -562,19 +624,45 @@

Returns the norm of the vector.

-

Example:

{c++}
- -
double res = v.norm(); // res will contain 1,4142135624... i.e. sqrt(2)
+

Example:

{c++}
+ +
double res = v.norm(); // res will contain 1,4142135624... i.e. sqrt(2)
+
Real norm() const
Returns the norm of the vector.
Definition vec3.hpp:164
Returns
The euclidian norm of the vector.
Here is the call graph for this function:
+ + + + +
Here is the caller graph for this function:
+ + + + + + + + + + + + + + + + + + + +
@@ -593,7 +681,7 @@

Real fp::vec3< Real >::norm_square ( - ) + ) const @@ -605,14 +693,32 @@

Returns the square of the norm of the vector.

-

Example:

{c++}
- -
double res = v.norm_square(); // res will contain 2
+

Example:

{c++}
+ +
double res = v.norm_square(); // res will contain 2
+
Real norm_square() const
Returns the square of the norm of the vector.
Definition vec3.hpp:175
Returns
Square of the euclidian norm of the vector.
Here is the call graph for this function:
+ + + + + +
+
+Here is the caller graph for this function:
+
+
+ + + + + + +
@@ -629,9 +735,9 @@

- + - +
vec3< Real > const & fp::vec3< Real >::normalize vec3< Real > const & fp::vec3< Real >::normalize ())
@@ -649,6 +755,13 @@

+ + + + + + +

@@ -667,8 +780,7 @@

bool fp::vec3< Real >::operator== ( - vec3< Real > const &  - other) + vec3< Real > const & other) const @@ -698,7 +810,7 @@

template<floating_point_number Real>

-template<typename Index >
+template<typename Index >
requires std::is_integral_v<Index>
@@ -707,8 +819,7 @@

Real & fp::vec3< Real >::operator[]

- - +
(Index idx)Index idx)
@@ -745,17 +856,16 @@

template<floating_point_number Real>

-template<typename Index >
+template<typename Index >
requires std::is_integral_v<Index>
@@ -845,21 +948,14 @@

- + - - +
const Real & fp::vec3< Real >::operator[] const Real & fp::vec3< Real >::operator[] (Index idx)Index idx) const
@@ -797,21 +907,14 @@

- + - - + - - - - - - - +
vec3< Real > operator+ vec3< Real > operator+ (vec3< Real > lhs, vec3< Real > lhs,
vec3< Real > constrhs 
)vec3< Real > const & rhs )

- + - - + - - - - - - - +
void operator+= void operator+= (vec3< Real > & lhs, vec3< Real > & lhs,
vec3< Real > constrhs 
)vec3< Real > const & rhs )
@@ -869,7 +965,7 @@

-

Overloaded operator defined in terms of vec3::add.

+

Overloaded operator defined in terms of vec3::add.

Equivalent to lhs.add(rhs).

Parameters
@@ -881,7 +977,7 @@

-

◆ operator- [1/3]

+

◆ operator- [1/2]

@@ -892,21 +988,14 @@

lhsleft hand side of the += operator
- + - - + - - - - - - - +
vec3< Real > operator- vec3< Real > operator- (vec3< Real > lhs, vec3< Real > lhs,
vec3< Real > constrhs 
)vec3< Real > const & rhs )
@@ -916,7 +1005,7 @@

-

Overloaded operator defined in terms of vec3::subtract.

+

Overloaded operator defined in terms of vec3::subtract.

Parameters
@@ -940,21 +1029,14 @@

lhsleft hand side of the - operator
- + - - + - - - - - - - +
void operator-= void operator-= (vec3< Real > & lhs, vec3< Real > & lhs,
vec3< Real > constrhs 
)vec3< Real > const & rhs )
@@ -964,7 +1046,7 @@

-

Overloaded operator defined in terms of vec3::subtract.

+

Overloaded operator defined in terms of vec3::subtract.

Equivalent to lhs.subtract(rhs).

Parameters
@@ -987,21 +1069,14 @@

lhsleft hand side of the -= operator
- + - - + - - - - - - - +
vec3< Real > operator* vec3< Real > operator* (Real constlhs, Real const & lhs,
vec3< Real > rhs 
)vec3< Real > rhs )
@@ -1011,7 +1086,7 @@

-

Overloaded operator defined in terms of vec3::scale.

+

Overloaded operator defined in terms of vec3::scale.

Left multiplication by a scalar s*v.

Parameters
@@ -1035,21 +1110,14 @@

lhsleft hand side of the * operator
- + - - + - - - - - - - +
vec3< Real > operator* vec3< Real > operator* (vec3< Real > lhs, vec3< Real > lhs,
Real constrhs 
)Real const & rhs )
@@ -1059,7 +1127,7 @@

-

Overloaded operator defined in terms of vec3::scale.

+

Overloaded operator defined in terms of vec3::scale.

Right multiplication by a scalar v*s.

Parameters
@@ -1083,21 +1151,14 @@

lhsleft hand side of the * operator
- + - - + - - - - - - - +
void operator/= void operator/= (vec3< Real > & lhs, vec3< Real > & lhs,
Real constrhs 
)Real const & rhs )
@@ -1107,7 +1168,7 @@

-

Overloaded operator defined in terms of vec3::scale.

+

Overloaded operator defined in terms of vec3::scale.

In place division by a scalar v/s, equivalent to lhs.scale(1/rhs).

Parameters
@@ -1131,21 +1192,14 @@

lhsleft hand side of the /= operator
- + - - + - - - - - - - +
vec3< Real > operator/ vec3< Real > operator/ (vec3< Real > lhs, vec3< Real > lhs,
Real constrhs 
)Real const & rhs )
@@ -1155,7 +1209,7 @@

-

Overloaded operator defined in terms of vec3::scale.

+

Overloaded operator defined in terms of vec3::scale.

Division by a scalar v/s.

Parameters
@@ -1169,7 +1223,7 @@

-

◆ operator- [2/3]

+

◆ operator- [2/2]

@@ -1180,10 +1234,9 @@

lhsleft hand side of the / operator
- + - - +
vec3< Real > operator- vec3< Real > operator- (vec3< Real > v)vec3< Real > v)
@@ -1203,43 +1256,6 @@

Returns
A copy of -v the vector v itself stays unaffected.

-

-
- -

◆ operator- [3/3]

- -
-
-
-template<floating_point_number Real>
- - - - - -
- - - - - - - - -
vec3< Real > operator- (vec3< Real > && v)
-
-friend
-
- -

Unary minus operator for rvalues.

-
Parameters
- - -
van rvalue vec3 vector.
-
-
-
Returns
The rvalue vector v is moved into the function and -v is returned.
-

The documentation for this class was generated from the following file:
    @@ -1251,7 +1267,7 @@

      - +

diff --git a/docs/classfp_1_1vec3.js b/docs/classfp_1_1vec3.js old mode 100644 new mode 100755 index d4e409d..695ce5c --- a/docs/classfp_1_1vec3.js +++ b/docs/classfp_1_1vec3.js @@ -23,7 +23,6 @@ var classfp_1_1vec3 = [ "operator/=", "classfp_1_1vec3.html#a34315674ec0ce3613c42ca5c9ec82c6f", null ], [ "operator/", "classfp_1_1vec3.html#a8d8ccff0006cc4699a6773e85de7e4cb", null ], [ "operator-", "classfp_1_1vec3.html#ac3763454def892f79476dad1079adb18", null ], - [ "operator-", "classfp_1_1vec3.html#adaf7d3b941eeaa8bc1bb3ee5dd865552", null ], [ "x", "classfp_1_1vec3.html#ae5ce71c3ddb550e4e040950462e5b5d4", null ], [ "y", "classfp_1_1vec3.html#a9d726ab99a57c65998f22bcdd12227cf", null ], [ "z", "classfp_1_1vec3.html#a5e845f97a31bd5f821a0e4f92ca4c4b3", null ] diff --git a/docs/classfp_1_1vec3__coll__graph.dot b/docs/classfp_1_1vec3__coll__graph.dot deleted file mode 100644 index f002960..0000000 --- a/docs/classfp_1_1vec3__coll__graph.dot +++ /dev/null @@ -1,10 +0,0 @@ -digraph "fp::vec3< Real >" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="fp::vec3\< Real \>",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Internal implementation of a 3D vector."]; - Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" x\ny\nz",fontcolor="grey" ]; - Node2 [id="Node000002",label="Real",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; -} diff --git a/docs/classfp_1_1vec3__coll__graph.map b/docs/classfp_1_1vec3__coll__graph.map new file mode 100755 index 0000000..36a2054 --- /dev/null +++ b/docs/classfp_1_1vec3__coll__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1vec3__coll__graph.md5 b/docs/classfp_1_1vec3__coll__graph.md5 new file mode 100755 index 0000000..9424332 --- /dev/null +++ b/docs/classfp_1_1vec3__coll__graph.md5 @@ -0,0 +1 @@ +8562db0cceb3e13616d919d969ca88db \ No newline at end of file diff --git a/docs/classfp_1_1vec3__coll__graph.png b/docs/classfp_1_1vec3__coll__graph.png new file mode 100755 index 0000000..f118d3e Binary files /dev/null and b/docs/classfp_1_1vec3__coll__graph.png differ diff --git a/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_cgraph.dot b/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_cgraph.dot deleted file mode 100644 index 57ea79d..0000000 --- a/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_cgraph.dot +++ /dev/null @@ -1,10 +0,0 @@ -digraph "fp::vec3::cross" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::vec3::cross",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Calculate cross product with another vector."]; - Node1 -> Node1 [id="edge1_Node000001_Node000001",color="steelblue1",style="solid",tooltip=" "]; -} diff --git a/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_cgraph.map b/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_cgraph.map new file mode 100755 index 0000000..da3557f --- /dev/null +++ b/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_cgraph.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_cgraph.md5 b/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_cgraph.md5 new file mode 100755 index 0000000..54ed7a4 --- /dev/null +++ b/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_cgraph.md5 @@ -0,0 +1 @@ +d68abc63d04c32a1c1e2bde2b0d6400d \ No newline at end of file diff --git a/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_cgraph.png b/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_cgraph.png new file mode 100755 index 0000000..6ec73ec Binary files /dev/null and b/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_cgraph.png differ diff --git a/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_icgraph.dot b/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_icgraph.dot deleted file mode 100644 index d6c7ea4..0000000 --- a/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_icgraph.dot +++ /dev/null @@ -1,10 +0,0 @@ -digraph "fp::vec3::cross" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::vec3::cross",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Calculate cross product with another vector."]; - Node1 -> Node1 [id="edge1_Node000001_Node000001",dir="back",color="steelblue1",style="solid",tooltip=" "]; -} diff --git a/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_icgraph.map b/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_icgraph.map new file mode 100755 index 0000000..e56edf2 --- /dev/null +++ b/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_icgraph.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_icgraph.md5 b/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_icgraph.md5 new file mode 100755 index 0000000..698ca45 --- /dev/null +++ b/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_icgraph.md5 @@ -0,0 +1 @@ +8a6b1763b5176887fa93578a576b4631 \ No newline at end of file diff --git a/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_icgraph.png b/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_icgraph.png new file mode 100755 index 0000000..0574ec5 Binary files /dev/null and b/docs/classfp_1_1vec3_a2522af9d50779abf605b8be03e146a5f_icgraph.png differ diff --git a/docs/classfp_1_1vec3_a3097ff5c62f8bb0da1c5e87fb9384da9_icgraph.dot b/docs/classfp_1_1vec3_a3097ff5c62f8bb0da1c5e87fb9384da9_icgraph.dot deleted file mode 100644 index 672f126..0000000 --- a/docs/classfp_1_1vec3_a3097ff5c62f8bb0da1c5e87fb9384da9_icgraph.dot +++ /dev/null @@ -1,15 +0,0 @@ -digraph "fp::vec3::dot" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::vec3::dot",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Calculate dot product with another vector."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::vec3::norm",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1vec3.html#a8568d337f067bd43b63508174f047df2",tooltip="Returns the norm of the vector."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::vec3::normalize",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1vec3.html#a3484a50de6cbbadfa7b04d4352410a10",tooltip="Normalize the vector in place. And return a reference to the new normalized vector."]; - Node1 -> Node4 [id="edge3_Node000001_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::vec3::norm_square",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1vec3.html#a8f4f85470de85d92876fe2c93ea0f425",tooltip="Returns the square of the norm of the vector."]; -} diff --git a/docs/classfp_1_1vec3_a3097ff5c62f8bb0da1c5e87fb9384da9_icgraph.map b/docs/classfp_1_1vec3_a3097ff5c62f8bb0da1c5e87fb9384da9_icgraph.map new file mode 100755 index 0000000..0605b94 --- /dev/null +++ b/docs/classfp_1_1vec3_a3097ff5c62f8bb0da1c5e87fb9384da9_icgraph.map @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/classfp_1_1vec3_a3097ff5c62f8bb0da1c5e87fb9384da9_icgraph.md5 b/docs/classfp_1_1vec3_a3097ff5c62f8bb0da1c5e87fb9384da9_icgraph.md5 new file mode 100755 index 0000000..0e9782f --- /dev/null +++ b/docs/classfp_1_1vec3_a3097ff5c62f8bb0da1c5e87fb9384da9_icgraph.md5 @@ -0,0 +1 @@ +e58b9031b396923930f7e9d4e3c841d2 \ No newline at end of file diff --git a/docs/classfp_1_1vec3_a3097ff5c62f8bb0da1c5e87fb9384da9_icgraph.png b/docs/classfp_1_1vec3_a3097ff5c62f8bb0da1c5e87fb9384da9_icgraph.png new file mode 100755 index 0000000..1938942 Binary files /dev/null and b/docs/classfp_1_1vec3_a3097ff5c62f8bb0da1c5e87fb9384da9_icgraph.png differ diff --git a/docs/classfp_1_1vec3_a3484a50de6cbbadfa7b04d4352410a10_cgraph.dot b/docs/classfp_1_1vec3_a3484a50de6cbbadfa7b04d4352410a10_cgraph.dot deleted file mode 100644 index 89d16e4..0000000 --- a/docs/classfp_1_1vec3_a3484a50de6cbbadfa7b04d4352410a10_cgraph.dot +++ /dev/null @@ -1,13 +0,0 @@ -digraph "fp::vec3::normalize" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::vec3::normalize",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Normalize the vector in place. And return a reference to the new normalized vector."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::vec3::norm",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1vec3.html#a8568d337f067bd43b63508174f047df2",tooltip="Returns the norm of the vector."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::vec3::dot",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1vec3.html#a3097ff5c62f8bb0da1c5e87fb9384da9",tooltip="Calculate dot product with another vector."]; -} diff --git a/docs/classfp_1_1vec3_a3484a50de6cbbadfa7b04d4352410a10_cgraph.map b/docs/classfp_1_1vec3_a3484a50de6cbbadfa7b04d4352410a10_cgraph.map new file mode 100755 index 0000000..62ec2af --- /dev/null +++ b/docs/classfp_1_1vec3_a3484a50de6cbbadfa7b04d4352410a10_cgraph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classfp_1_1vec3_a3484a50de6cbbadfa7b04d4352410a10_cgraph.md5 b/docs/classfp_1_1vec3_a3484a50de6cbbadfa7b04d4352410a10_cgraph.md5 new file mode 100755 index 0000000..8ced824 --- /dev/null +++ b/docs/classfp_1_1vec3_a3484a50de6cbbadfa7b04d4352410a10_cgraph.md5 @@ -0,0 +1 @@ +8225155e5f626203d4f73546d74cb453 \ No newline at end of file diff --git a/docs/classfp_1_1vec3_a3484a50de6cbbadfa7b04d4352410a10_cgraph.png b/docs/classfp_1_1vec3_a3484a50de6cbbadfa7b04d4352410a10_cgraph.png new file mode 100755 index 0000000..8686f05 Binary files /dev/null and b/docs/classfp_1_1vec3_a3484a50de6cbbadfa7b04d4352410a10_cgraph.png differ diff --git a/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_cgraph.dot b/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_cgraph.dot deleted file mode 100644 index 2456946..0000000 --- a/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_cgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::vec3::norm" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::vec3::norm",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Returns the norm of the vector."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::vec3::dot",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1vec3.html#a3097ff5c62f8bb0da1c5e87fb9384da9",tooltip="Calculate dot product with another vector."]; -} diff --git a/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_cgraph.map b/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_cgraph.map new file mode 100755 index 0000000..806c02a --- /dev/null +++ b/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_cgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_cgraph.md5 b/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_cgraph.md5 new file mode 100755 index 0000000..280dbc9 --- /dev/null +++ b/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_cgraph.md5 @@ -0,0 +1 @@ +86623068f1886419e1aa5cef118937ef \ No newline at end of file diff --git a/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_cgraph.png b/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_cgraph.png new file mode 100755 index 0000000..5b9eb93 Binary files /dev/null and b/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_cgraph.png differ diff --git a/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_icgraph.dot b/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_icgraph.dot deleted file mode 100644 index e7f80c4..0000000 --- a/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_icgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::vec3::norm" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::vec3::norm",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Returns the norm of the vector."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::vec3::normalize",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1vec3.html#a3484a50de6cbbadfa7b04d4352410a10",tooltip="Normalize the vector in place. And return a reference to the new normalized vector."]; -} diff --git a/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_icgraph.map b/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_icgraph.map new file mode 100755 index 0000000..6e80d0e --- /dev/null +++ b/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_icgraph.map @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_icgraph.md5 b/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_icgraph.md5 new file mode 100755 index 0000000..824a659 --- /dev/null +++ b/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_icgraph.md5 @@ -0,0 +1 @@ +81f42de89b42cd7403f31ee747bc037e \ No newline at end of file diff --git a/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_icgraph.png b/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_icgraph.png new file mode 100755 index 0000000..45f9dce Binary files /dev/null and b/docs/classfp_1_1vec3_a8568d337f067bd43b63508174f047df2_icgraph.png differ diff --git a/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_cgraph.dot b/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_cgraph.dot deleted file mode 100644 index 60d600c..0000000 --- a/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_cgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::vec3::norm_square" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::vec3::norm_square",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Returns the square of the norm of the vector."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::vec3::dot",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1vec3.html#a3097ff5c62f8bb0da1c5e87fb9384da9",tooltip="Calculate dot product with another vector."]; -} diff --git a/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_cgraph.map b/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_cgraph.map new file mode 100755 index 0000000..d98b91d --- /dev/null +++ b/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_cgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_cgraph.md5 b/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_cgraph.md5 new file mode 100755 index 0000000..8266fb3 --- /dev/null +++ b/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_cgraph.md5 @@ -0,0 +1 @@ +4f12db332bcc50d8a4c4d2babce4e094 \ No newline at end of file diff --git a/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_cgraph.png b/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_cgraph.png new file mode 100755 index 0000000..d916a33 Binary files /dev/null and b/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_cgraph.png differ diff --git a/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_icgraph.map b/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_icgraph.map new file mode 100755 index 0000000..17f4ef3 --- /dev/null +++ b/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_icgraph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_icgraph.md5 b/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_icgraph.md5 new file mode 100755 index 0000000..6cadbd0 --- /dev/null +++ b/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_icgraph.md5 @@ -0,0 +1 @@ +926692515df2a7133da2427b278d5084 \ No newline at end of file diff --git a/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_icgraph.png b/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_icgraph.png new file mode 100755 index 0000000..d97f24e Binary files /dev/null and b/docs/classfp_1_1vec3_a8f4f85470de85d92876fe2c93ea0f425_icgraph.png differ diff --git a/docs/classfp_1_1vec3_ae64d6fa0ceec87d5a26cac17560f1d7c_icgraph.map b/docs/classfp_1_1vec3_ae64d6fa0ceec87d5a26cac17560f1d7c_icgraph.map new file mode 100755 index 0000000..76235c3 --- /dev/null +++ b/docs/classfp_1_1vec3_ae64d6fa0ceec87d5a26cac17560f1d7c_icgraph.map @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/docs/classfp_1_1vec3_ae64d6fa0ceec87d5a26cac17560f1d7c_icgraph.md5 b/docs/classfp_1_1vec3_ae64d6fa0ceec87d5a26cac17560f1d7c_icgraph.md5 new file mode 100755 index 0000000..d89ed6c --- /dev/null +++ b/docs/classfp_1_1vec3_ae64d6fa0ceec87d5a26cac17560f1d7c_icgraph.md5 @@ -0,0 +1 @@ +f39c60b32a0752c0404277015e81488f \ No newline at end of file diff --git a/docs/classfp_1_1vec3_ae64d6fa0ceec87d5a26cac17560f1d7c_icgraph.png b/docs/classfp_1_1vec3_ae64d6fa0ceec87d5a26cac17560f1d7c_icgraph.png new file mode 100755 index 0000000..b503128 Binary files /dev/null and b/docs/classfp_1_1vec3_ae64d6fa0ceec87d5a26cac17560f1d7c_icgraph.png differ diff --git a/docs/clipboard.js b/docs/clipboard.js new file mode 100755 index 0000000..42c1fb0 --- /dev/null +++ b/docs/clipboard.js @@ -0,0 +1,61 @@ +/** + +The code below is based on the Doxygen Awesome project, see +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2021 - 2022 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +let clipboard_title = "Copy to clipboard" +let clipboard_icon = `` +let clipboard_successIcon = `` +let clipboard_successDuration = 1000 + +$(function() { + if(navigator.clipboard) { + const fragments = document.getElementsByClassName("fragment") + for(const fragment of fragments) { + const clipboard_div = document.createElement("div") + clipboard_div.classList.add("clipboard") + clipboard_div.innerHTML = clipboard_icon + clipboard_div.title = clipboard_title + $(clipboard_div).click(function() { + const content = this.parentNode.cloneNode(true) + // filter out line number and folded fragments from file listings + content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() }) + let text = content.textContent + // remove trailing newlines and trailing spaces from empty lines + text = text.replace(/^\s*\n/gm,'\n').replace(/\n*$/,'') + navigator.clipboard.writeText(text); + this.classList.add("success") + this.innerHTML = clipboard_successIcon + window.setTimeout(() => { // switch back to normal icon after timeout + this.classList.remove("success") + this.innerHTML = clipboard_icon + }, clipboard_successDuration); + }) + fragment.insertBefore(clipboard_div, fragment.firstChild) + } + } +}) diff --git a/docs/closed.png b/docs/closed.png old mode 100644 new mode 100755 diff --git a/docs/conceptfp_1_1_container.html b/docs/conceptfp_1_1_container.html new file mode 100755 index 0000000..e575c9b --- /dev/null +++ b/docs/conceptfp_1_1_container.html @@ -0,0 +1,140 @@ + + + + + + + +flippy: fp::Container Concept Reference + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
fp::Container Concept Reference
+
+
+

Concept definition

+
+
+ + + + diff --git a/docs/conceptfp_1_1floating__point__number.html b/docs/conceptfp_1_1floating__point__number.html old mode 100644 new mode 100755 index 086606f..033f7cc --- a/docs/conceptfp_1_1floating__point__number.html +++ b/docs/conceptfp_1_1floating__point__number.html @@ -3,16 +3,18 @@ - + flippy: fp::floating_point_number Concept Reference + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -104,7 +111,7 @@

Here we implement the concepts of a floating point number. -More...

+More...

#include <custom_concepts.hpp>

Concept definition

@@ -125,7 +132,7 @@

Concept definition

diff --git a/docs/conceptfp_1_1implementation_1_1_begin_and_end_copy_constructible_and_destructible.html b/docs/conceptfp_1_1implementation_1_1_begin_and_end_copy_constructible_and_destructible.html new file mode 100755 index 0000000..42dbcae --- /dev/null +++ b/docs/conceptfp_1_1implementation_1_1_begin_and_end_copy_constructible_and_destructible.html @@ -0,0 +1,131 @@ + + + + + + + +flippy: fp::implementation::BeginAndEndCopyConstructibleAndDestructible Concept Reference + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
fp::implementation::BeginAndEndCopyConstructibleAndDestructible Concept Reference
+
+
+

Concept definition

+
template<typename C>
+ +
requires std::destructible<decltype(std::begin(c))> &&
+
std::destructible<decltype(std::end(c))> &&
+
std::copy_constructible<decltype(std::begin(c))> &&
+
std::copy_constructible<decltype(std::end(c))>;
+
}
+ +
+
+ + + + diff --git a/docs/conceptfp_1_1implementation_1_1_begin_deref_to_void.html b/docs/conceptfp_1_1implementation_1_1_begin_deref_to_void.html new file mode 100755 index 0000000..199ab16 --- /dev/null +++ b/docs/conceptfp_1_1implementation_1_1_begin_deref_to_void.html @@ -0,0 +1,126 @@ + + + + + + + +flippy: fp::implementation::BeginDerefToVoid Concept Reference + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
fp::implementation::BeginDerefToVoid Concept Reference
+
+
+

Concept definition

+
template<typename C>
+
concept fp::implementation::BeginDerefToVoid = requires(C c) {{ *std::begin(c) } -> std::same_as<void>; }
+
Definition custom_concepts.hpp:44
+
+
+ + + + diff --git a/docs/conceptfp_1_1implementation_1_1_begin_derefable.html b/docs/conceptfp_1_1implementation_1_1_begin_derefable.html new file mode 100755 index 0000000..8106ac6 --- /dev/null +++ b/docs/conceptfp_1_1implementation_1_1_begin_derefable.html @@ -0,0 +1,126 @@ + + + + + + + +flippy: fp::implementation::BeginDerefable Concept Reference + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
fp::implementation::BeginDerefable Concept Reference
+
+
+

Concept definition

+
template<typename C>
+
concept fp::implementation::BeginDerefable = requires(C c) { *std::begin(c); }
+
Definition custom_concepts.hpp:43
+
+
+ + + + diff --git a/docs/conceptfp_1_1implementation_1_1_begin_incrementable.html b/docs/conceptfp_1_1implementation_1_1_begin_incrementable.html new file mode 100755 index 0000000..93d37e8 --- /dev/null +++ b/docs/conceptfp_1_1implementation_1_1_begin_incrementable.html @@ -0,0 +1,126 @@ + + + + + + + +flippy: fp::implementation::BeginIncrementable Concept Reference + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
fp::implementation::BeginIncrementable Concept Reference
+
+
+

Concept definition

+
template<typename C>
+
concept fp::implementation::BeginIncrementable = requires(C c) { std::begin(c)++; }
+
Definition custom_concepts.hpp:42
+
+
+ + + + diff --git a/docs/namespacemembers_eval.html b/docs/conceptfp_1_1implementation_1_1_beginable.html old mode 100644 new mode 100755 similarity index 67% rename from docs/namespacemembers_eval.html rename to docs/conceptfp_1_1implementation_1_1_beginable.html index 85f36fe..904998d --- a/docs/namespacemembers_eval.html +++ b/docs/conceptfp_1_1implementation_1_1_beginable.html @@ -3,16 +3,18 @@ - + -flippy: Namespace Members +flippy: fp::implementation::Beginable Concept Reference + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -98,17 +105,21 @@
+
+
fp::implementation::Beginable Concept Reference
+
-
Here is a list of all documented namespace enum values with links to the namespaces they belong to:
    -
  • EXPERIMENTAL_PLANAR_TRIANGULATION : fp
  • -
  • SPHERICAL_TRIANGULATION : fp
  • -
-
+

Concept definition

+
template<typename C>
+
concept fp::implementation::Beginable = requires(C c) { std::begin(c); }
+
Definition custom_concepts.hpp:39
+
diff --git a/docs/namespacemembers_enum.html b/docs/conceptfp_1_1implementation_1_1_endable.html old mode 100644 new mode 100755 similarity index 67% rename from docs/namespacemembers_enum.html rename to docs/conceptfp_1_1implementation_1_1_endable.html index b602201..fad6174 --- a/docs/namespacemembers_enum.html +++ b/docs/conceptfp_1_1implementation_1_1_endable.html @@ -3,16 +3,18 @@ - + -flippy: Namespace Members +flippy: fp::implementation::Endable Concept Reference + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -98,16 +105,21 @@
+
+
fp::implementation::Endable Concept Reference
+
-
Here is a list of all documented namespace enums with links to the namespaces they belong to:
    -
  • TriangulationType : fp
  • -
-
+

Concept definition

+
template<typename C>
+
concept fp::implementation::Endable = requires(C c) { std::end(c); }
+
Definition custom_concepts.hpp:40
+
diff --git a/docs/conceptfp_1_1implementation_1_1_neqable_begin_and_end.html b/docs/conceptfp_1_1implementation_1_1_neqable_begin_and_end.html new file mode 100755 index 0000000..e9fed7f --- /dev/null +++ b/docs/conceptfp_1_1implementation_1_1_neqable_begin_and_end.html @@ -0,0 +1,126 @@ + + + + + + + +flippy: fp::implementation::NeqableBeginAndEnd Concept Reference + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
fp::implementation::NeqableBeginAndEnd Concept Reference
+
+
+

Concept definition

+
template<typename C>
+
concept fp::implementation::NeqableBeginAndEnd = requires(C c) {{ std::begin(c) != std::end(c) } -> std::same_as<bool>; }
+
Definition custom_concepts.hpp:41
+
+
+ + + + diff --git a/docs/conceptfp_1_1indexing__number.html b/docs/conceptfp_1_1indexing__number.html old mode 100644 new mode 100755 index bde3015..8495068 --- a/docs/conceptfp_1_1indexing__number.html +++ b/docs/conceptfp_1_1indexing__number.html @@ -3,16 +3,18 @@ - + flippy: fp::indexing_number Concept Reference + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -104,7 +111,7 @@

Here we implement the concepts of a positive integer number that is used throughout the code for indexing. -More...

+More...

#include <custom_concepts.hpp>

Concept definition

@@ -125,7 +132,7 @@

Concept definition

diff --git a/docs/concepts.html b/docs/concepts.html old mode 100644 new mode 100755 index fd4a0c1..17a951b --- a/docs/concepts.html +++ b/docs/concepts.html @@ -3,16 +3,18 @@ - + flippy: Concepts + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -103,10 +110,19 @@
Here is a list of all documented concepts with brief descriptions:
-
[detail level 12]
- - - +
[detail level 123]
 Nfp
 Rfloating_point_numberHere we implement the concepts of a floating point number
 Rindexing_numberHere we implement the concepts of a positive integer number that is used throughout the code for indexing
+ + + + + + + + + + + +
 Nfp
 Nimplementation
 RBeginable
 REndable
 RNeqableBeginAndEnd
 RBeginIncrementable
 RBeginDerefable
 RBeginDerefToVoid
 RBeginAndEndCopyConstructibleAndDestructible
 Rfloating_point_numberHere we implement the concepts of a floating point number
 Rindexing_numberHere we implement the concepts of a positive integer number that is used throughout the code for indexing
 RContainer
@@ -114,7 +130,7 @@ diff --git a/docs/concepts.js b/docs/concepts.js old mode 100644 new mode 100755 index 40e7fc7..b3f51a3 --- a/docs/concepts.js +++ b/docs/concepts.js @@ -1,7 +1,17 @@ var concepts = [ [ "fp", "namespacefp.html", [ + [ "implementation", "namespacefp_1_1implementation.html", [ + [ "Beginable", "conceptfp_1_1implementation_1_1_beginable.html", null ], + [ "Endable", "conceptfp_1_1implementation_1_1_endable.html", null ], + [ "NeqableBeginAndEnd", "conceptfp_1_1implementation_1_1_neqable_begin_and_end.html", null ], + [ "BeginIncrementable", "conceptfp_1_1implementation_1_1_begin_incrementable.html", null ], + [ "BeginDerefable", "conceptfp_1_1implementation_1_1_begin_derefable.html", null ], + [ "BeginDerefToVoid", "conceptfp_1_1implementation_1_1_begin_deref_to_void.html", null ], + [ "BeginAndEndCopyConstructibleAndDestructible", "conceptfp_1_1implementation_1_1_begin_and_end_copy_constructible_and_destructible.html", null ] + ] ], [ "floating_point_number", "conceptfp_1_1floating__point__number.html", null ], - [ "indexing_number", "conceptfp_1_1indexing__number.html", null ] + [ "indexing_number", "conceptfp_1_1indexing__number.html", null ], + [ "Container", "conceptfp_1_1_container.html", null ] ] ] ]; \ No newline at end of file diff --git a/docs/cookie.js b/docs/cookie.js new file mode 100755 index 0000000..53ad21d --- /dev/null +++ b/docs/cookie.js @@ -0,0 +1,58 @@ +/*! + Cookie helper functions + Copyright (c) 2023 Dimitri van Heesch + Released under MIT license. +*/ +let Cookie = { + cookie_namespace: 'doxygen_', + + readSetting(cookie,defVal) { + if (window.chrome) { + const val = localStorage.getItem(this.cookie_namespace+cookie) || + sessionStorage.getItem(this.cookie_namespace+cookie); + if (val) return val; + } else { + let myCookie = this.cookie_namespace+cookie+"="; + if (document.cookie) { + const index = document.cookie.indexOf(myCookie); + if (index != -1) { + const valStart = index + myCookie.length; + let valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + return document.cookie.substring(valStart, valEnd); + } + } + } + return defVal; + }, + + writeSetting(cookie,val,days=10*365) { // default days='forever', 0=session cookie, -1=delete + if (window.chrome) { + if (days==0) { + sessionStorage.setItem(this.cookie_namespace+cookie,val); + } else { + localStorage.setItem(this.cookie_namespace+cookie,val); + } + } else { + let date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + const expiration = days!=0 ? "expires="+date.toGMTString()+";" : ""; + document.cookie = this.cookie_namespace + cookie + "=" + + val + "; SameSite=Lax;" + expiration + "path=/"; + } + }, + + eraseSetting(cookie) { + if (window.chrome) { + if (localStorage.getItem(this.cookie_namespace+cookie)) { + localStorage.removeItem(this.cookie_namespace+cookie); + } else if (sessionStorage.getItem(this.cookie_namespace+cookie)) { + sessionStorage.removeItem(this.cookie_namespace+cookie); + } + } else { + this.writeSetting(cookie,'',-1); + } + }, +} diff --git a/docs/custom__concepts_8hpp.html b/docs/custom__concepts_8hpp.html old mode 100644 new mode 100755 index 8b8c7f8..080481c --- a/docs/custom__concepts_8hpp.html +++ b/docs/custom__concepts_8hpp.html @@ -3,16 +3,18 @@ - + flippy: flippy/custom_concepts.hpp File Reference + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -101,7 +108,10 @@
custom_concepts.hpp File Reference
@@ -113,18 +123,62 @@ Include dependency graph for custom_concepts.hpp:
+ + + + +
This graph shows which files directly or indirectly include this file:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Go to the source code of this file.

- + + +

Namespaces

namespace  fp
namespace  fp
 
namespace  fp::implementation
 
+ + + + + + + + + + + + + + + + +

@@ -135,6 +189,46 @@

concept  fp::indexing_number
 Here we implement the concepts of a positive integer number that is used throughout the code for indexing.
 
concept  fp::implementation::Beginable
 
concept  fp::implementation::Endable
 
concept  fp::implementation::NeqableBeginAndEnd
 
concept  fp::implementation::BeginIncrementable
 
concept  fp::implementation::BeginDerefable
 
concept  fp::implementation::BeginDerefToVoid
 
concept  fp::implementation::BeginAndEndCopyConstructibleAndDestructible
 
concept  fp::Container
 
+ + + + + +

+Typedefs

+using fp::Index = unsigned int
 
+using fp::Real = double
 
+ + + + + +

+Functions

+static Real fp::operator""_r (long double value)
 
+static Real fp::operator""_r (unsigned long long value)
 
+ + +

+Variables

+static constexpr auto fp::PI = static_cast<Real>(3.14159265358979323846264338327950288)
 

Detailed Description

This file contains the concepts that are costomly defined for the flippy class templates.

@@ -144,7 +238,7 @@ diff --git a/docs/custom__concepts_8hpp.js b/docs/custom__concepts_8hpp.js new file mode 100755 index 0000000..a8a7cd8 --- /dev/null +++ b/docs/custom__concepts_8hpp.js @@ -0,0 +1,11 @@ +var custom__concepts_8hpp = +[ + [ "fp::implementation::Beginable", "conceptfp_1_1implementation_1_1_beginable.html", null ], + [ "fp::implementation::Endable", "conceptfp_1_1implementation_1_1_endable.html", null ], + [ "fp::implementation::NeqableBeginAndEnd", "conceptfp_1_1implementation_1_1_neqable_begin_and_end.html", null ], + [ "fp::implementation::BeginIncrementable", "conceptfp_1_1implementation_1_1_begin_incrementable.html", null ], + [ "fp::implementation::BeginDerefable", "conceptfp_1_1implementation_1_1_begin_derefable.html", null ], + [ "fp::implementation::BeginDerefToVoid", "conceptfp_1_1implementation_1_1_begin_deref_to_void.html", null ], + [ "fp::implementation::BeginAndEndCopyConstructibleAndDestructible", "conceptfp_1_1implementation_1_1_begin_and_end_copy_constructible_and_destructible.html", null ], + [ "fp::Container", "conceptfp_1_1_container.html", null ] +]; \ No newline at end of file diff --git a/docs/custom__concepts_8hpp__dep__incl.dot b/docs/custom__concepts_8hpp__dep__incl.dot deleted file mode 100644 index 42f6f7c..0000000 --- a/docs/custom__concepts_8hpp__dep__incl.dot +++ /dev/null @@ -1,31 +0,0 @@ -digraph "flippy/custom_concepts.hpp" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="flippy/custom_concepts.hpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="This file contains the concepts that are costomly defined for the flippy class templates."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="flippy/MonteCarloUpdater.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_monte_carlo_updater_8hpp.html",tooltip="This file contains the MonteCarloUpdater class template. Together with Triangulation...."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="flippy/Triangulator.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_triangulator_8hpp.html",tooltip="This file contains internal implementation details and is not part of the stable public api...."]; - Node3 -> Node4 [id="edge3_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="flippy/Triangulation.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_triangulation_8hpp.html",tooltip="This file contains the fp::Triangulation class and several related helper classes...."]; - Node4 -> Node2 [id="edge4_Node000004_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 -> Node5 [id="edge5_Node000004_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="flippy/flippy.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$flippy_8hpp.html",tooltip="This header file exists for convenience. Including this header will automatically include all parts o..."]; - Node1 -> Node5 [id="edge6_Node000001_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node1 -> Node6 [id="edge7_Node000001_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="flippy/vec3.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$vec3_8hpp.html",tooltip="Header file containing the definition and implementation a 3 dimensional vector class,..."]; - Node6 -> Node7 [id="edge8_Node000006_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node7 [id="Node000007",label="flippy/Nodes.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_nodes_8hpp.html",tooltip="This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node o..."]; - Node7 -> Node2 [id="edge9_Node000007_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node7 -> Node4 [id="edge10_Node000007_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node7 -> Node5 [id="edge11_Node000007_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node6 -> Node4 [id="edge12_Node000006_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node6 -> Node3 [id="edge13_Node000006_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node6 -> Node5 [id="edge14_Node000006_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node6 -> Node8 [id="edge15_Node000006_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node8 [id="Node000008",label="flippy/stlSerializer.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$stl_serializer_8hpp_source.html",tooltip=" "]; - Node8 -> Node4 [id="edge16_Node000008_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; -} diff --git a/docs/custom__concepts_8hpp__dep__incl.map b/docs/custom__concepts_8hpp__dep__incl.map new file mode 100755 index 0000000..8311f4c --- /dev/null +++ b/docs/custom__concepts_8hpp__dep__incl.map @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/custom__concepts_8hpp__dep__incl.md5 b/docs/custom__concepts_8hpp__dep__incl.md5 new file mode 100755 index 0000000..10ffd84 --- /dev/null +++ b/docs/custom__concepts_8hpp__dep__incl.md5 @@ -0,0 +1 @@ +767c283b728dd1d5ba87f8fa113251b3 \ No newline at end of file diff --git a/docs/custom__concepts_8hpp__dep__incl.png b/docs/custom__concepts_8hpp__dep__incl.png new file mode 100755 index 0000000..093cb91 Binary files /dev/null and b/docs/custom__concepts_8hpp__dep__incl.png differ diff --git a/docs/custom__concepts_8hpp__incl.dot b/docs/custom__concepts_8hpp__incl.dot deleted file mode 100644 index 71c9546..0000000 --- a/docs/custom__concepts_8hpp__incl.dot +++ /dev/null @@ -1,10 +0,0 @@ -digraph "flippy/custom_concepts.hpp" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="flippy/custom_concepts.hpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="This file contains the concepts that are costomly defined for the flippy class templates."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="concepts",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; -} diff --git a/docs/custom__concepts_8hpp__incl.map b/docs/custom__concepts_8hpp__incl.map new file mode 100755 index 0000000..672ccf6 --- /dev/null +++ b/docs/custom__concepts_8hpp__incl.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/custom__concepts_8hpp__incl.md5 b/docs/custom__concepts_8hpp__incl.md5 new file mode 100755 index 0000000..4f66671 --- /dev/null +++ b/docs/custom__concepts_8hpp__incl.md5 @@ -0,0 +1 @@ +212003c4ca5ff20197d01facfe7f53c6 \ No newline at end of file diff --git a/docs/custom__concepts_8hpp__incl.png b/docs/custom__concepts_8hpp__incl.png new file mode 100755 index 0000000..c7110ca Binary files /dev/null and b/docs/custom__concepts_8hpp__incl.png differ diff --git a/docs/custom__concepts_8hpp_source.html b/docs/custom__concepts_8hpp_source.html old mode 100644 new mode 100755 index d8bca5b..161cb02 --- a/docs/custom__concepts_8hpp_source.html +++ b/docs/custom__concepts_8hpp_source.html @@ -3,16 +3,18 @@ - + flippy: flippy/custom_concepts.hpp Source File + - + + @@ -43,28 +45,28 @@
- + + -
@@ -112,15 +114,67 @@
3#include <concepts>
8namespace fp{
-
24template<class T> concept floating_point_number = std::is_floating_point_v<T>;
+
24 template<class T> concept floating_point_number = std::is_floating_point_v<T>;
25
-
31template<class T> concept indexing_number = std::is_unsigned_v<T> && std::is_integral_v<T>;
-
33}
+
31 template<class T> concept indexing_number = std::is_unsigned_v<T> && std::is_integral_v<T>;
+
34 using Index = unsigned int;
+
35 using Real = double;
+
36
+
37
+
+
38 namespace implementation {
+
39 template<typename C> concept Beginable= requires(C c) { std::begin(c); };
+
40 template<typename C> concept Endable= requires(C c) { std::end(c); };
+
41 template<typename C> concept NeqableBeginAndEnd = requires(C c) {{ std::begin(c) != std::end(c) } -> std::same_as<bool>; };
+
42 template<typename C> concept BeginIncrementable = requires(C c) { std::begin(c)++; };
+
43 template<typename C> concept BeginDerefable = requires(C c) { *std::begin(c); };
+
44 template<typename C> concept BeginDerefToVoid = requires(C c) {{ *std::begin(c) } -> std::same_as<void>; };
+
+
45 template<typename C> concept BeginAndEndCopyConstructibleAndDestructible = requires(C c) {
+
46 requires std::destructible<decltype(std::begin(c))> &&
+
47 std::destructible<decltype(std::end(c))> &&
+
48 std::copy_constructible<decltype(std::begin(c))> &&
+
49 std::copy_constructible<decltype(std::end(c))>;
+
50 };
+
+
51
+
52
+
53
+
54 }
+
+
55 template<typename C> concept Container =
+ + + + + + + +
63
+
64
+
65 static Real operator"" _r(long double value) {
+
66 return static_cast<Real>(value);
+
67 }
+
68 static Real operator"" _r(unsigned long long value) {
+
69 return static_cast<Real>(value);
+
70 }
+
71
+
72 static constexpr auto PI = static_cast<Real>(3.14159265358979323846264338327950288);
+
73}
-
34
-
35
-
36#endif //FLIPPY_CUSTOM_CONCEPTS_HPP
+
74
+
75
+
76
+
77#endif //FLIPPY_CUSTOM_CONCEPTS_HPP
+
Definition custom_concepts.hpp:55
Here we implement the concepts of a floating point number.
Definition custom_concepts.hpp:24
+ +
Definition custom_concepts.hpp:44
+
Definition custom_concepts.hpp:43
+
Definition custom_concepts.hpp:42
+
Definition custom_concepts.hpp:39
+
Definition custom_concepts.hpp:40
+
Definition custom_concepts.hpp:41
Here we implement the concepts of a positive integer number that is used throughout the code for inde...
Definition custom_concepts.hpp:31
Definition custom_concepts.hpp:8
@@ -129,7 +183,7 @@ diff --git a/docs/dir_000001_000003.html b/docs/dir_000001_000003.html old mode 100644 new mode 100755 index dd8412a..efad9c3 --- a/docs/dir_000001_000003.html +++ b/docs/dir_000001_000003.html @@ -3,16 +3,18 @@ - + flippy: flippy -> utilities Relation + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
@@ -105,7 +112,7 @@

flippy → utilities Relation

    - +
diff --git a/docs/dir_34e9a5f624ac092a9ae2401c28d616d7.html b/docs/dir_34e9a5f624ac092a9ae2401c28d616d7.html old mode 100644 new mode 100755 index 2534e0f..b699a66 --- a/docs/dir_34e9a5f624ac092a9ae2401c28d616d7.html +++ b/docs/dir_34e9a5f624ac092a9ae2401c28d616d7.html @@ -3,16 +3,18 @@ - +flippy: assets Directory Reference + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -108,7 +115,7 @@ diff --git a/docs/dir_4f4e61201b043a278e63eb62d89bbefb.html b/docs/dir_4f4e61201b043a278e63eb62d89bbefb.html old mode 100644 new mode 100755 index a205754..7208a56 --- a/docs/dir_4f4e61201b043a278e63eb62d89bbefb.html +++ b/docs/dir_4f4e61201b043a278e63eb62d89bbefb.html @@ -3,16 +3,18 @@ - + flippy: assets/markdown_files Directory Reference + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -106,6 +113,10 @@ Directory dependency graph for markdown_files:
assets/markdown_files
+ + + +
@@ -113,7 +124,7 @@ diff --git a/docs/dir_4f4e61201b043a278e63eb62d89bbefb_dep.dot b/docs/dir_4f4e61201b043a278e63eb62d89bbefb_dep.dot deleted file mode 100644 index 5f4cc59..0000000 --- a/docs/dir_4f4e61201b043a278e63eb62d89bbefb_dep.dot +++ /dev/null @@ -1,12 +0,0 @@ -digraph "assets/markdown_files" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - compound=true - subgraph clusterdir_34e9a5f624ac092a9ae2401c28d616d7 { - graph [ bgcolor="#edf0f7", pencolor="grey25", label="assets", fontname=Helvetica,fontsize=10 style="filled,dashed", URL="dir_34e9a5f624ac092a9ae2401c28d616d7.html",tooltip=""] - dir_4f4e61201b043a278e63eb62d89bbefb [label="markdown_files", fillcolor="#edf0f7", color="grey25", style="filled,bold", URL="dir_4f4e61201b043a278e63eb62d89bbefb.html",tooltip=""]; - } -} diff --git a/docs/dir_4f4e61201b043a278e63eb62d89bbefb_dep.map b/docs/dir_4f4e61201b043a278e63eb62d89bbefb_dep.map new file mode 100755 index 0000000..b1685de --- /dev/null +++ b/docs/dir_4f4e61201b043a278e63eb62d89bbefb_dep.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/dir_4f4e61201b043a278e63eb62d89bbefb_dep.md5 b/docs/dir_4f4e61201b043a278e63eb62d89bbefb_dep.md5 new file mode 100755 index 0000000..df761a1 --- /dev/null +++ b/docs/dir_4f4e61201b043a278e63eb62d89bbefb_dep.md5 @@ -0,0 +1 @@ +fb1e8012c9d44f45c346bcb6417b4ec7 \ No newline at end of file diff --git a/docs/dir_4f4e61201b043a278e63eb62d89bbefb_dep.png b/docs/dir_4f4e61201b043a278e63eb62d89bbefb_dep.png new file mode 100755 index 0000000..18a6b23 Binary files /dev/null and b/docs/dir_4f4e61201b043a278e63eb62d89bbefb_dep.png differ diff --git a/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f.html b/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f.html old mode 100644 new mode 100755 index 07bba42..a4ce7e1 --- a/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f.html +++ b/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f.html @@ -3,16 +3,18 @@ - + flippy: flippy Directory Reference + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
@@ -106,6 +113,12 @@ Directory dependency graph for flippy:
flippy
+ + + + + +

@@ -145,7 +158,7 @@ diff --git a/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f.js b/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f.js old mode 100644 new mode 100755 index 2e45db6..e4e12b8 --- a/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f.js +++ b/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f.js @@ -1,12 +1,12 @@ var dir_6b186b4a3fa96a5ae1faf2feaa17366f = [ [ "utilities", "dir_8d6e340cbd427aa421517bf60c41f005.html", "dir_8d6e340cbd427aa421517bf60c41f005" ], - [ "custom_concepts.hpp", "custom__concepts_8hpp.html", null ], + [ "custom_concepts.hpp", "custom__concepts_8hpp.html", "custom__concepts_8hpp" ], [ "flippy.hpp", "flippy_8hpp.html", null ], [ "MonteCarloUpdater.hpp", "_monte_carlo_updater_8hpp.html", "_monte_carlo_updater_8hpp" ], [ "Nodes.hpp", "_nodes_8hpp.html", "_nodes_8hpp" ], [ "stlSerializer.hpp", "stl_serializer_8hpp_source.html", null ], [ "Triangulation.hpp", "_triangulation_8hpp.html", "_triangulation_8hpp" ], - [ "Triangulator.hpp", "_triangulator_8hpp.html", "_triangulator_8hpp" ], + [ "Triangulator.hpp", "_triangulator_8hpp.html", null ], [ "vec3.hpp", "vec3_8hpp.html", "vec3_8hpp" ] ]; \ No newline at end of file diff --git a/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f_dep.dot b/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f_dep.dot deleted file mode 100644 index e8271fa..0000000 --- a/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f_dep.dot +++ /dev/null @@ -1,14 +0,0 @@ -digraph "flippy" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - compound=true - subgraph clusterdir_6b186b4a3fa96a5ae1faf2feaa17366f { - graph [ bgcolor="#edf0f7", pencolor="grey25", label="", fontname=Helvetica,fontsize=10 style="filled,bold", URL="dir_6b186b4a3fa96a5ae1faf2feaa17366f.html",tooltip=""] - dir_6b186b4a3fa96a5ae1faf2feaa17366f [shape=plaintext, label="flippy"]; - dir_8d6e340cbd427aa421517bf60c41f005 [label="utilities", fillcolor="#a2b4d6", color="grey25", style="filled", URL="dir_8d6e340cbd427aa421517bf60c41f005.html",tooltip=""]; - } - dir_6b186b4a3fa96a5ae1faf2feaa17366f->dir_8d6e340cbd427aa421517bf60c41f005 [headlabel="2", labeldistance=1.5 headhref="dir_000001_000003.html" href="dir_000001_000003.html" color="steelblue1" fontcolor="steelblue1"]; -} diff --git a/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f_dep.map b/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f_dep.map new file mode 100755 index 0000000..daa2fd0 --- /dev/null +++ b/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f_dep.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f_dep.md5 b/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f_dep.md5 new file mode 100755 index 0000000..babb7a1 --- /dev/null +++ b/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f_dep.md5 @@ -0,0 +1 @@ +e2d957d9faa1e6d25a2bf7c71752fc31 \ No newline at end of file diff --git a/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f_dep.png b/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f_dep.png new file mode 100755 index 0000000..b8c835e Binary files /dev/null and b/docs/dir_6b186b4a3fa96a5ae1faf2feaa17366f_dep.png differ diff --git a/docs/dir_8d6e340cbd427aa421517bf60c41f005.html b/docs/dir_8d6e340cbd427aa421517bf60c41f005.html old mode 100644 new mode 100755 index 4ce4ff2..e064cc3 --- a/docs/dir_8d6e340cbd427aa421517bf60c41f005.html +++ b/docs/dir_8d6e340cbd427aa421517bf60c41f005.html @@ -3,16 +3,18 @@ - + flippy: flippy/utilities Directory Reference + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -106,10 +113,18 @@ Directory dependency graph for utilities:
flippy/utilities
+ + + +
+ + + + @@ -120,7 +135,7 @@ diff --git a/docs/dir_8d6e340cbd427aa421517bf60c41f005.js b/docs/dir_8d6e340cbd427aa421517bf60c41f005.js old mode 100644 new mode 100755 index 7e33ead..9ff33fc --- a/docs/dir_8d6e340cbd427aa421517bf60c41f005.js +++ b/docs/dir_8d6e340cbd427aa421517bf60c41f005.js @@ -1,4 +1,6 @@ var dir_8d6e340cbd427aa421517bf60c41f005 = [ + [ "DataIO.hpp", "_data_i_o_8hpp_source.html", null ], + [ "sim_utils.hpp", "sim__utils_8hpp_source.html", null ], [ "utils.hpp", "utils_8hpp.html", "utils_8hpp" ] ]; \ No newline at end of file diff --git a/docs/dir_8d6e340cbd427aa421517bf60c41f005_dep.dot b/docs/dir_8d6e340cbd427aa421517bf60c41f005_dep.dot deleted file mode 100644 index 9e01874..0000000 --- a/docs/dir_8d6e340cbd427aa421517bf60c41f005_dep.dot +++ /dev/null @@ -1,12 +0,0 @@ -digraph "flippy/utilities" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - compound=true - subgraph clusterdir_6b186b4a3fa96a5ae1faf2feaa17366f { - graph [ bgcolor="#edf0f7", pencolor="grey25", label="flippy", fontname=Helvetica,fontsize=10 style="filled,dashed", URL="dir_6b186b4a3fa96a5ae1faf2feaa17366f.html",tooltip=""] - dir_8d6e340cbd427aa421517bf60c41f005 [label="utilities", fillcolor="#edf0f7", color="grey25", style="filled,bold", URL="dir_8d6e340cbd427aa421517bf60c41f005.html",tooltip=""]; - } -} diff --git a/docs/dir_8d6e340cbd427aa421517bf60c41f005_dep.map b/docs/dir_8d6e340cbd427aa421517bf60c41f005_dep.map new file mode 100755 index 0000000..78c0d45 --- /dev/null +++ b/docs/dir_8d6e340cbd427aa421517bf60c41f005_dep.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/dir_8d6e340cbd427aa421517bf60c41f005_dep.md5 b/docs/dir_8d6e340cbd427aa421517bf60c41f005_dep.md5 new file mode 100755 index 0000000..94ebbbc --- /dev/null +++ b/docs/dir_8d6e340cbd427aa421517bf60c41f005_dep.md5 @@ -0,0 +1 @@ +ecd4a1cc2a541449ea868653eac8ab1c \ No newline at end of file diff --git a/docs/dir_8d6e340cbd427aa421517bf60c41f005_dep.png b/docs/dir_8d6e340cbd427aa421517bf60c41f005_dep.png new file mode 100755 index 0000000..950435c Binary files /dev/null and b/docs/dir_8d6e340cbd427aa421517bf60c41f005_dep.png differ diff --git a/docs/doc.svg b/docs/doc.svg old mode 100644 new mode 100755 diff --git a/docs/docd.svg b/docs/docd.svg old mode 100644 new mode 100755 diff --git a/docs/doxygen-awesome.css b/docs/doxygen-awesome.css old mode 100644 new mode 100755 diff --git a/docs/doxygen.css b/docs/doxygen.css old mode 100644 new mode 100755 index eeadba5..e2ac1b7 --- a/docs/doxygen.css +++ b/docs/doxygen.css @@ -1,4 +1,4 @@ -/* The standard CSS for doxygen 1.9.8*/ +/* The standard CSS for doxygen 1.11.0*/ html { /* page base colors */ @@ -145,6 +145,7 @@ html { --fragment-lineno-link-bg-color: #D8D8D8; --fragment-lineno-link-hover-fg-color: #4665A2; --fragment-lineno-link-hover-bg-color: #C8C8C8; +--fragment-copy-ok-color: #2EC82E; --tooltip-foreground-color: black; --tooltip-background-color: white; --tooltip-border-color: gray; @@ -168,6 +169,28 @@ html { --font-family-icon: Arial,Helvetica; --font-family-tooltip: Roboto,sans-serif; +/** special sections */ +--warning-color-bg: #f8d1cc; +--warning-color-hl: #b61825; +--warning-color-text: #75070f; +--note-color-bg: #faf3d8; +--note-color-hl: #f3a600; +--note-color-text: #5f4204; +--todo-color-bg: #e4f3ff; +--todo-color-hl: #1879C4; +--todo-color-text: #274a5c; +--test-color-bg: #e8e8ff; +--test-color-hl: #3939C4; +--test-color-text: #1a1a5c; +--deprecated-color-bg: #ecf0f3; +--deprecated-color-hl: #5b6269; +--deprecated-color-text: #43454a; +--bug-color-bg: #e4dafd; +--bug-color-hl: #5b2bdd; +--bug-color-text: #2a0d72; +--invariant-color-bg: #d8f1e3; +--invariant-color-hl: #44b86f; +--invariant-color-text: #265532; } @media (prefers-color-scheme: dark) { @@ -309,7 +332,7 @@ html { --code-link-color: #79C0FF; --code-external-link-color: #79C0FF; --fragment-foreground-color: #C9D1D9; ---fragment-background-color: black; +--fragment-background-color: #090D16; --fragment-border-color: #30363D; --fragment-lineno-border-color: #30363D; --fragment-lineno-background-color: black; @@ -318,6 +341,7 @@ html { --fragment-lineno-link-bg-color: #303030; --fragment-lineno-link-hover-fg-color: #8E96A1; --fragment-lineno-link-hover-bg-color: #505050; +--fragment-copy-ok-color: #0EA80E; --tooltip-foreground-color: #C9D1D9; --tooltip-background-color: #202020; --tooltip-border-color: #C9D1D9; @@ -341,6 +365,28 @@ html { --font-family-icon: Arial,Helvetica; --font-family-tooltip: Roboto,sans-serif; +/** special sections */ +--warning-color-bg: #2e1917; +--warning-color-hl: #ad2617; +--warning-color-text: #f5b1aa; +--note-color-bg: #3b2e04; +--note-color-hl: #f1b602; +--note-color-text: #ceb670; +--todo-color-bg: #163750; +--todo-color-hl: #1982D2; +--todo-color-text: #dcf0fa; +--test-color-bg: #121258; +--test-color-hl: #4242cf; +--test-color-text: #c0c0da; +--deprecated-color-bg: #2e323b; +--deprecated-color-hl: #738396; +--deprecated-color-text: #abb0bd; +--bug-color-bg: #2a2536; +--bug-color-hl: #7661b3; +--bug-color-text: #ae9ed6; +--invariant-color-bg: #303a35; +--invariant-color-hl: #76ce96; +--invariant-color-text: #cceed5; }} body { background-color: var(--page-background-color); @@ -357,8 +403,6 @@ body, table, div, p, dl { /* @group Heading Levels */ .title { - font-weight: 400; - font-size: 14px; font-family: var(--font-family-normal); line-height: 28px; font-size: 150%; @@ -556,7 +600,13 @@ a { } a:hover { - text-decoration: underline; + text-decoration: none; + background: linear-gradient(to bottom, transparent 0,transparent calc(100% - 1px), currentColor 100%); +} + +a:hover > span.arrow { + text-decoration: none; + background : var(--nav-background-color); } a.el { @@ -607,7 +657,24 @@ dl.el { margin-left: -1cm; } +ul.check { + list-style:none; + text-indent: -16px; + padding-left: 38px; +} +li.unchecked:before { + content: "\2610\A0"; +} +li.checked:before { + content: "\2611\A0"; +} + +ol { + text-indent: 0px; +} + ul { + text-indent: 0px; overflow: visible; } @@ -632,30 +699,63 @@ ul.multicol { .fragment { text-align: left; direction: ltr; - overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-x: auto; overflow-y: hidden; + position: relative; + min-height: 12px; + margin: 10px 0px; + padding: 10px 10px; + border: 1px solid var(--fragment-border-color); + border-radius: 4px; + background-color: var(--fragment-background-color); + color: var(--fragment-foreground-color); } pre.fragment { - border: 1px solid var(--fragment-border-color); - background-color: var(--fragment-background-color); - color: var(--fragment-foreground-color); - padding: 4px 6px; - margin: 4px 8px 4px 2px; + word-wrap: break-word; + font-size: 10pt; + line-height: 125%; + font-family: var(--font-family-monospace); +} + +.clipboard { + width: 24px; + height: 24px; + right: 5px; + top: 5px; + opacity: 0; + position: absolute; + display: inline; overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; - font-family: var(--font-family-monospace); - font-size: 105%; + fill: var(--fragment-foreground-color); + justify-content: center; + align-items: center; + cursor: pointer; +} + +.clipboard.success { + border: 1px solid var(--fragment-foreground-color); + border-radius: 4px; } -div.fragment { - padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ - margin: 4px 8px 4px 2px; - color: var(--fragment-foreground-color); - background-color: var(--fragment-background-color); - border: 1px solid var(--fragment-border-color); +.fragment:hover .clipboard, .clipboard.success { + opacity: .28; +} + +.clipboard:hover, .clipboard.success { + opacity: 1 !important; +} + +.clipboard:active:not([class~=success]) svg { + transform: scale(.91); +} + +.clipboard.success svg { + fill: var(--fragment-copy-ok-color); +} + +.clipboard.success { + border-color: var(--fragment-copy-ok-color); } div.line { @@ -778,10 +878,6 @@ img.light-mode-visible { display: none; } -img.formulaDsp { - -} - img.formulaInl, img.inline { vertical-align: middle; } @@ -1081,17 +1177,25 @@ dl.reflist dd { .paramtype { white-space: nowrap; + padding: 0px; + padding-bottom: 1px; } .paramname { - color: var(--memdef-param-name-color); white-space: nowrap; + padding: 0px; + padding-bottom: 1px; + margin-left: 2px; } + .paramname em { + color: var(--memdef-param-name-color); font-style: normal; + margin-right: 1px; } -.paramname code { - line-height: 14px; + +.paramname .paramdefval { + font-family: var(--font-family-monospace); } .params, .retval, .exception, .tparams { @@ -1425,7 +1529,6 @@ table.fieldtable { { height:32px; display:block; - text-decoration: none; outline: none; color: var(--nav-text-normal-color); font-family: var(--font-family-nav); @@ -1514,7 +1617,8 @@ dl { padding: 0 0 0 0; } -/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +/* + dl.section { margin-left: 0px; padding-left: 0px; @@ -1527,7 +1631,7 @@ dl.note { border-color: #D0C000; } -dl.warning, dl.attention { +dl.warning, dl.attention, dl.important { margin-left: -7px; padding-left: 3px; border-left: 4px solid; @@ -1569,8 +1673,103 @@ dl.bug { border-color: #C08050; } +*/ + +dl.bug dt a, dl.deprecated dt a, dl.todo dt a, dl.test a { + font-weight: bold !important; +} + +dl.warning, dl.attention, dl.important, dl.note, dl.deprecated, dl.bug, +dl.invariant, dl.pre, dl.post, dl.todo, dl.test, dl.remark { + padding: 10px; + margin: 10px 0px; + overflow: hidden; + margin-left: 0; + border-radius: 4px; +} + dl.section dd { - margin-bottom: 6px; + margin-bottom: 2px; +} + +dl.warning, dl.attention, dl.important { + background: var(--warning-color-bg); + border-left: 8px solid var(--warning-color-hl); + color: var(--warning-color-text); +} + +dl.warning dt, dl.attention dt, dl.important dt { + color: var(--warning-color-hl); +} + +dl.note, dl.remark { + background: var(--note-color-bg); + border-left: 8px solid var(--note-color-hl); + color: var(--note-color-text); +} + +dl.note dt, dl.remark dt { + color: var(--note-color-hl); +} + +dl.todo { + background: var(--todo-color-bg); + border-left: 8px solid var(--todo-color-hl); + color: var(--todo-color-text); +} + +dl.todo dt { + color: var(--todo-color-hl); +} + +dl.test { + background: var(--test-color-bg); + border-left: 8px solid var(--test-color-hl); + color: var(--test-color-text); +} + +dl.test dt { + color: var(--test-color-hl); +} + +dl.bug dt a { + color: var(--bug-color-hl) !important; +} + +dl.bug { + background: var(--bug-color-bg); + border-left: 8px solid var(--bug-color-hl); + color: var(--bug-color-text); +} + +dl.bug dt a { + color: var(--bug-color-hl) !important; +} + +dl.deprecated { + background: var(--deprecated-color-bg); + border-left: 8px solid var(--deprecated-color-hl); + color: var(--deprecated-color-text); +} + +dl.deprecated dt a { + color: var(--deprecated-color-hl) !important; +} + +dl.note dd, dl.warning dd, dl.pre dd, dl.post dd, +dl.remark dd, dl.attention dd, dl.important dd, dl.invariant dd, +dl.bug dd, dl.deprecated dd, dl.todo dd, dl.test dd { + margin-inline-start: 0px; +} + +dl.invariant, dl.pre, dl.post { + background: var(--invariant-color-bg); + border-left: 8px solid var(--invariant-color-hl); + color: var(--invariant-color-text); +} + +dl.invariant dt, dl.pre dt, dl.post dt { + color: var(--invariant-color-hl); } @@ -1585,12 +1784,12 @@ dl.section dd { vertical-align: bottom; border-collapse: separate; } - + #projectlogo img -{ +{ border: 0px none; } - + #projectalign { vertical-align: middle; diff --git a/docs/doxygen.svg b/docs/doxygen.svg old mode 100644 new mode 100755 diff --git a/docs/doxygen_crawl.html b/docs/doxygen_crawl.html new file mode 100755 index 0000000..f16eca2 --- /dev/null +++ b/docs/doxygen_crawl.html @@ -0,0 +1,360 @@ + + + +Validator / crawler helper + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/dynsections.js b/docs/dynsections.js old mode 100644 new mode 100755 index b73c828..b05f4c8 --- a/docs/dynsections.js +++ b/docs/dynsections.js @@ -22,171 +22,177 @@ @licend The above is the entire license notice for the JavaScript code in this file */ -function toggleVisibility(linkObj) -{ - var base = $(linkObj).attr('id'); - var summary = $('#'+base+'-summary'); - var content = $('#'+base+'-content'); - var trigger = $('#'+base+'-trigger'); - var src=$(trigger).attr('src'); - if (content.is(':visible')===true) { - content.hide(); - summary.show(); - $(linkObj).addClass('closed').removeClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); - } else { - content.show(); - summary.hide(); - $(linkObj).removeClass('closed').addClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } - return false; -} -function updateStripes() -{ - $('table.directory tr'). - removeClass('even').filter(':visible:even').addClass('even'); - $('table.directory tr'). - removeClass('odd').filter(':visible:odd').addClass('odd'); +function toggleVisibility(linkObj) { + return dynsection.toggleVisibility(linkObj); } -function toggleLevel(level) -{ - $('table.directory tr').each(function() { - var l = this.id.split('_').length-1; - var i = $('#img'+this.id.substring(3)); - var a = $('#arr'+this.id.substring(3)); - if (l'); - // add vertical lines to other rows - $('span[class=lineno]').not(':eq(0)').append(''); - // add toggle controls to lines with fold divs - $('div[class=foldopen]').each(function() { - // extract specific id to use - var id = $(this).attr('id').replace('foldopen',''); - // extract start and end foldable fragment attributes - var start = $(this).attr('data-start'); - var end = $(this).attr('data-end'); - // replace normal fold span with controls for the first line of a foldable fragment - $(this).find('span[class=fold]:first').replaceWith(''); - // append div for folded (closed) representation - $(this).after(''); - // extract the first line from the "open" section to represent closed content - var line = $(this).children().first().clone(); - // remove any glow that might still be active on the original line - $(line).removeClass('glow'); - if (start) { - // if line already ends with a start marker (e.g. trailing {), remove it - $(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),'')); + this.updateStripes(); + }, + + toggleFolder : function(id) { + // the clicked row + const currentRow = $('#row_'+id); + + // all rows after the clicked row + const rows = currentRow.nextAll("tr"); + + const re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub + + // only match elements AFTER this one (can't hide elements before) + const childRows = rows.filter(function() { return this.id.match(re); }); + + // first row is visible we are HIDING + if (childRows.filter(':first').is(':visible')===true) { + // replace down arrow by right arrow for current row + const currentRowSpans = currentRow.find("span"); + currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed"); + currentRowSpans.filter(".arrow").html('►'); + rows.filter("[id^=row_"+id+"]").hide(); // hide all children + } else { // we are SHOWING + // replace right arrow by down arrow for current row + const currentRowSpans = currentRow.find("span"); + currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen"); + currentRowSpans.filter(".arrow").html('▼'); + // replace down arrows by right arrows for child rows + const childRowsSpans = childRows.find("span"); + childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed"); + childRowsSpans.filter(".arrow").html('►'); + childRows.show(); //show all children } - // replace minus with plus symbol - $(line).find('span[class=fold]').css('background-image',plusImg[relPath]); - // append ellipsis - $(line).append(' '+start+''+end); - // insert constructed line into closed div - $('#foldclosed'+id).html(line); - }); -} - + this.updateStripes(); + }, + + toggleInherit : function(id) { + const rows = $('tr.inherit.'+id); + const img = $('tr.inherit_header.'+id+' img'); + const src = $(img).attr('src'); + if (rows.filter(':first').is(':visible')===true) { + rows.css('display','none'); + $(img).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + rows.css('display','table-row'); // using show() causes jump in firefox + $(img).attr('src',src.substring(0,src.length-10)+'open.png'); + } + }, +}; + +let codefold = { + opened : true, + + // in case HTML_COLORSTYLE is LIGHT or DARK the vars will be replaced, so we write them out explicitly and use double quotes + plusImg: [ "var(--fold-plus-image)", "var(--fold-plus-image-relpath)" ], + minusImg: [ "var(--fold-minus-image)", "var(--fold-minus-image-relpath)" ], + + // toggle all folding blocks + toggle_all : function(relPath) { + if (this.opened) { + $('#fold_all').css('background-image',this.plusImg[relPath]); + $('div[id^=foldopen]').hide(); + $('div[id^=foldclosed]').show(); + } else { + $('#fold_all').css('background-image',this.minusImg[relPath]); + $('div[id^=foldopen]').show(); + $('div[id^=foldclosed]').hide(); + } + this.opened=!this.opened; + }, + + // toggle single folding block + toggle : function(id) { + $('#foldopen'+id).toggle(); + $('#foldclosed'+id).toggle(); + }, + + init : function(relPath) { + $('span[class=lineno]').css({ + 'padding-right':'4px', + 'margin-right':'2px', + 'display':'inline-block', + 'width':'54px', + 'background':'linear-gradient(var(--fold-line-color),var(--fold-line-color)) no-repeat 46px/2px 100%' + }); + // add global toggle to first line + $('span[class=lineno]:first').append(''); + // add vertical lines to other rows + $('span[class=lineno]').not(':eq(0)').append(''); + // add toggle controls to lines with fold divs + $('div[class=foldopen]').each(function() { + // extract specific id to use + const id = $(this).attr('id').replace('foldopen',''); + // extract start and end foldable fragment attributes + const start = $(this).attr('data-start'); + const end = $(this).attr('data-end'); + // replace normal fold span with controls for the first line of a foldable fragment + $(this).find('span[class=fold]:first').replaceWith(''); + // append div for folded (closed) representation + $(this).after(''); + // extract the first line from the "open" section to represent closed content + const line = $(this).children().first().clone(); + // remove any glow that might still be active on the original line + $(line).removeClass('glow'); + if (start) { + // if line already ends with a start marker (e.g. trailing {), remove it + $(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),'')); + } + // replace minus with plus symbol + $(line).find('span[class=fold]').css('background-image',codefold.plusImg[relPath]); + // append ellipsis + $(line).append(' '+start+''+end); + // insert constructed line into closed div + $('#foldclosed'+id).html(line); + }); + }, +}; /* @license-end */ diff --git a/docs/files.html b/docs/files.html old mode 100644 new mode 100755 index 7fea4b6..c9f759e --- a/docs/files.html +++ b/docs/files.html @@ -3,16 +3,18 @@ - +flippy: File List + - + + @@ -43,19 +45,24 @@

Files

 DataIO.hpp
 
 sim_utils.hpp
 
 utils.hpp
 This file contains helper functions that are used throughout flippy, but are not specific to any given class.
 
- + + @@ -73,7 +80,7 @@
@@ -103,10 +110,12 @@
Here is a list of all documented files with brief descriptions:
-
[detail level 123]
- - - +
[detail level 123]
  flippy
  utilities
 utils.hppThis file contains helper functions that are used throughout flippy, but are not specific to any given class
+ + + + + @@ -122,7 +131,7 @@ diff --git a/docs/files_dup.js b/docs/files_dup.js old mode 100644 new mode 100755 diff --git a/docs/flippy_8hpp.html b/docs/flippy_8hpp.html old mode 100644 new mode 100755 index 70de73a..2a64a4b --- a/docs/flippy_8hpp.html +++ b/docs/flippy_8hpp.html @@ -3,16 +3,18 @@ - +flippy: flippy/flippy.hpp File Reference + - + + @@ -43,19 +45,24 @@
  flippy
  utilities
 DataIO.hpp
 sim_utils.hpp
 utils.hppThis file contains helper functions that are used throughout flippy, but are not specific to any given class
 custom_concepts.hppThis file contains the concepts that are costomly defined for the flippy class templates
 flippy.hppThis header file exists for convenience. Including this header will automatically include all parts of flippy in the project
 MonteCarloUpdater.hppThis file contains the MonteCarloUpdater class template. Together with Triangulation.hpp, this file contains flippy's most important high-level interfaces
- + + @@ -73,7 +80,7 @@
@@ -108,13 +115,104 @@
#include "external/json.hpp"
#include "custom_concepts.hpp"
#include "vec3.hpp"
-#include "utilities/utils.hpp"
#include "Nodes.hpp"
#include "Triangulation.hpp"
+#include "MonteCarloUpdater.hpp"
+#include "utilities/utils.hpp"
+#include "utilities/sim_utils.hpp"
+#include "utilities/DataIO.hpp"
Include dependency graph for flippy.hpp:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Go to the source code of this file.

@@ -126,7 +224,7 @@ diff --git a/docs/flippy_8hpp__incl.dot b/docs/flippy_8hpp__incl.dot deleted file mode 100644 index ba8f338..0000000 --- a/docs/flippy_8hpp__incl.dot +++ /dev/null @@ -1,66 +0,0 @@ -digraph "flippy/flippy.hpp" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="flippy/flippy.hpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="This header file exists for convenience. Including this header will automatically include all parts o..."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="external/json.hpp",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="custom_concepts.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$custom__concepts_8hpp.html",tooltip="This file contains the concepts that are costomly defined for the flippy class templates."]; - Node3 -> Node4 [id="edge3_Node000003_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="concepts",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node5 [id="edge4_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="vec3.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$vec3_8hpp.html",tooltip="Header file containing the definition and implementation a 3 dimensional vector class,..."]; - Node5 -> Node6 [id="edge5_Node000005_Node000006",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="ostream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node5 -> Node7 [id="edge6_Node000005_Node000007",color="steelblue1",style="solid",tooltip=" "]; - Node7 [id="Node000007",label="iostream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node5 -> Node8 [id="edge7_Node000005_Node000008",color="steelblue1",style="solid",tooltip=" "]; - Node8 [id="Node000008",label="cmath",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node5 -> Node3 [id="edge8_Node000005_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node1 -> Node9 [id="edge9_Node000001_Node000009",color="steelblue1",style="solid",tooltip=" "]; - Node9 [id="Node000009",label="utilities/utils.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$utils_8hpp.html",tooltip="This file contains helper functions that are used throughout flippy, but are not specific to any give..."]; - Node9 -> Node7 [id="edge10_Node000009_Node000007",color="steelblue1",style="solid",tooltip=" "]; - Node9 -> Node10 [id="edge11_Node000009_Node000010",color="steelblue1",style="solid",tooltip=" "]; - Node10 [id="Node000010",label="fstream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node9 -> Node11 [id="edge12_Node000009_Node000011",color="steelblue1",style="solid",tooltip=" "]; - Node11 [id="Node000011",label="utility",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node9 -> Node12 [id="edge13_Node000009_Node000012",color="steelblue1",style="solid",tooltip=" "]; - Node12 [id="Node000012",label="filesystem",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node9 -> Node13 [id="edge14_Node000009_Node000013",color="steelblue1",style="solid",tooltip=" "]; - Node13 [id="Node000013",label="type_traits",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node14 [id="edge15_Node000001_Node000014",color="steelblue1",style="solid",tooltip=" "]; - Node14 [id="Node000014",label="Nodes.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_nodes_8hpp.html",tooltip="This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node o..."]; - Node14 -> Node15 [id="edge16_Node000014_Node000015",color="steelblue1",style="solid",tooltip=" "]; - Node15 [id="Node000015",label="vector",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node14 -> Node16 [id="edge17_Node000014_Node000016",color="steelblue1",style="solid",tooltip=" "]; - Node16 [id="Node000016",label="unordered_set",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node14 -> Node2 [id="edge18_Node000014_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node14 -> Node5 [id="edge19_Node000014_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node1 -> Node17 [id="edge20_Node000001_Node000017",color="steelblue1",style="solid",tooltip=" "]; - Node17 [id="Node000017",label="Triangulation.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_triangulation_8hpp.html",tooltip="This file contains the fp::Triangulation class and several related helper classes...."]; - Node17 -> Node18 [id="edge21_Node000017_Node000018",color="steelblue1",style="solid",tooltip=" "]; - Node18 [id="Node000018",label="optional",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node17 -> Node19 [id="edge22_Node000017_Node000019",color="steelblue1",style="solid",tooltip=" "]; - Node19 [id="Node000019",label="set",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node17 -> Node14 [id="edge23_Node000017_Node000014",color="steelblue1",style="solid",tooltip=" "]; - Node17 -> Node5 [id="edge24_Node000017_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node17 -> Node9 [id="edge25_Node000017_Node000009",color="steelblue1",style="solid",tooltip=" "]; - Node17 -> Node20 [id="edge26_Node000017_Node000020",color="steelblue1",style="solid",tooltip=" "]; - Node20 [id="Node000020",label="Triangulator.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_triangulator_8hpp.html",tooltip="This file contains internal implementation details and is not part of the stable public api...."]; - Node20 -> Node21 [id="edge27_Node000020_Node000021",color="steelblue1",style="solid",tooltip=" "]; - Node21 [id="Node000021",label="array",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node20 -> Node15 [id="edge28_Node000020_Node000015",color="steelblue1",style="solid",tooltip=" "]; - Node20 -> Node16 [id="edge29_Node000020_Node000016",color="steelblue1",style="solid",tooltip=" "]; - Node20 -> Node22 [id="edge30_Node000020_Node000022",color="steelblue1",style="solid",tooltip=" "]; - Node22 [id="Node000022",label="unordered_map",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node20 -> Node3 [id="edge31_Node000020_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node20 -> Node5 [id="edge32_Node000020_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node17 -> Node23 [id="edge33_Node000017_Node000023",color="steelblue1",style="solid",tooltip=" "]; - Node23 [id="Node000023",label="stlSerializer.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$stl_serializer_8hpp_source.html",tooltip=" "]; - Node23 -> Node10 [id="edge34_Node000023_Node000010",color="steelblue1",style="solid",tooltip=" "]; - Node23 -> Node15 [id="edge35_Node000023_Node000015",color="steelblue1",style="solid",tooltip=" "]; - Node23 -> Node5 [id="edge36_Node000023_Node000005",color="steelblue1",style="solid",tooltip=" "]; -} diff --git a/docs/flippy_8hpp__incl.map b/docs/flippy_8hpp__incl.map new file mode 100755 index 0000000..5e02ad2 --- /dev/null +++ b/docs/flippy_8hpp__incl.map @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/flippy_8hpp__incl.md5 b/docs/flippy_8hpp__incl.md5 new file mode 100755 index 0000000..1d518dc --- /dev/null +++ b/docs/flippy_8hpp__incl.md5 @@ -0,0 +1 @@ +d5083790adb38bd00a22fae0f7125993 \ No newline at end of file diff --git a/docs/flippy_8hpp__incl.png b/docs/flippy_8hpp__incl.png new file mode 100755 index 0000000..46aa414 Binary files /dev/null and b/docs/flippy_8hpp__incl.png differ diff --git a/docs/flippy_8hpp_source.html b/docs/flippy_8hpp_source.html old mode 100644 new mode 100755 index 6d304e4..0a64655 --- a/docs/flippy_8hpp_source.html +++ b/docs/flippy_8hpp_source.html @@ -3,16 +3,18 @@ - + flippy: flippy/flippy.hpp Source File + - + + @@ -43,28 +45,28 @@
- + + -
@@ -118,7 +120,7 @@
9 * 888 888 888 888 888 888 888 888 888 dynamically triangulated
10 * 888 888 888 888 d88P 888 d88P Y88b 888 surfaces
11 * 888 888 888 88888P" 88888P" "Y88888
-
12 * 888 888 888 version 1.0.0
+
12 * 888 888 888 version 1.1.0
13 * 888 888 Y8b d88P
14 * 888 888 "Y88P"
15 *
@@ -156,12 +158,14 @@
51#include "external/json.hpp"
52#include "custom_concepts.hpp"
53#include "vec3.hpp"
-
54#include "utilities/utils.hpp"
-
55#include "Nodes.hpp"
-
56#include "Triangulation.hpp"
-
57#include "MonteCarloUpdater.hpp"
-
58
-
59#endif //FLIPPY_FLIPPY_HPP
+
54#include "Nodes.hpp"
+
55#include "Triangulation.hpp"
+
56#include "MonteCarloUpdater.hpp"
+
57#include "utilities/utils.hpp"
+
58#include "utilities/sim_utils.hpp"
+
59#include "utilities/DataIO.hpp"
+
60
+
61#endif //FLIPPY_FLIPPY_HPP
This file contains the MonteCarloUpdater class template. Together with Triangulation....
This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node o...
This file contains the fp::Triangulation class and several related helper classes....
@@ -174,7 +178,7 @@ diff --git a/docs/flippy_icon.png b/docs/flippy_icon.png old mode 100644 new mode 100755 diff --git a/docs/folderclosed.svg b/docs/folderclosed.svg old mode 100644 new mode 100755 diff --git a/docs/folderclosedd.svg b/docs/folderclosedd.svg old mode 100644 new mode 100755 diff --git a/docs/folderopen.svg b/docs/folderopen.svg old mode 100644 new mode 100755 diff --git a/docs/folderopend.svg b/docs/folderopend.svg old mode 100644 new mode 100755 diff --git a/docs/functions.html b/docs/functions.html old mode 100644 new mode 100755 index 5398319..ed827fd --- a/docs/functions.html +++ b/docs/functions.html @@ -3,16 +3,18 @@ - + flippy: Class Members + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -103,104 +110,100 @@

- a -

- b -

- c -

- d -

- e -

- f -

- g -

- i -

- j -

- k -

- m -

- n -

- + + @@ -73,7 +80,7 @@
@@ -103,89 +110,81 @@

- a -

- b -

- c -

- d -

- e -

- f -

- g -

- k -

- m -

- n -

diff --git a/docs/functions_rela.html b/docs/functions_rela.html old mode 100644 new mode 100755 index 93dd395..0028d3c --- a/docs/functions_rela.html +++ b/docs/functions_rela.html @@ -3,16 +3,18 @@ - + flippy: Class Members - Related Symbols + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
@@ -101,20 +108,20 @@
Here is a list of all documented related symbols with links to the class documentation for each member:
diff --git a/docs/functions_vars.html b/docs/functions_vars.html old mode 100644 new mode 100755 index da6fd2e..1b11beb --- a/docs/functions_vars.html +++ b/docs/functions_vars.html @@ -3,16 +3,18 @@ - + flippy: Class Members - Variables + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
@@ -100,21 +107,20 @@
Here is a list of all documented variables with links to the class documentation for each member:
- + + @@ -73,7 +80,7 @@
@@ -101,15 +108,13 @@
Here is a list of all documented file members with links to the documentation:
diff --git a/docs/globals_defs.html b/docs/globals_defs.html old mode 100644 new mode 100755 index 629da5f..4c658ac --- a/docs/globals_defs.html +++ b/docs/globals_defs.html @@ -3,16 +3,18 @@ - + flippy: File Members + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
@@ -101,15 +108,13 @@
Here is a list of all documented macros with links to the documentation:
diff --git a/docs/graph_legend.dot b/docs/graph_legend.dot deleted file mode 100644 index 97a6d61..0000000 --- a/docs/graph_legend.dot +++ /dev/null @@ -1,24 +0,0 @@ -digraph "Graph Legend" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node9 [id="Node000009",label="Inherited",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; - Node10 -> Node9 [dir="back",color="steelblue1",style="solid" tooltip=" "]; - Node10 [id="Node000010",label="PublicBase",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",tooltip=" "]; - Node11 -> Node10 [dir="back",color="steelblue1",style="solid" tooltip=" "]; - Node11 [id="Node000011",label="Truncated",height=0.2,width=0.4,color="red", fillcolor="#FFF0F0", style="filled",tooltip=" "]; - Node13 -> Node9 [dir="back",color="darkgreen",style="solid" tooltip=" "]; - Node13 [label="ProtectedBase",color="gray40",fillcolor="white",style="filled" tooltip=" "]; - Node14 -> Node9 [dir="back",color="firebrick4",style="solid" tooltip=" "]; - Node14 [label="PrivateBase",color="gray40",fillcolor="white",style="filled" tooltip=" "]; - Node15 -> Node9 [dir="back",color="steelblue1",style="solid" tooltip=" "]; - Node15 [id="Node000015",label="Undocumented",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node16 -> Node9 [dir="back",color="steelblue1",style="solid" tooltip=" "]; - Node16 [label="Templ\< int \>",color="gray40",fillcolor="white",style="filled" tooltip=" "]; - Node17 -> Node16 [dir="back",color="orange",style="dashed",label="< int >",fontcolor="grey" tooltip=" "]; - Node17 [label="Templ\< T \>",color="gray40",fillcolor="white",style="filled" tooltip=" "]; - Node18 -> Node9 [dir="back",color="darkorchid3",style="dashed",label="m_usedClass",fontcolor="grey" tooltip=" "]; - Node18 [label="Used",color="gray40",fillcolor="white",style="filled" tooltip=" "]; -} diff --git a/docs/graph_legend.html b/docs/graph_legend.html old mode 100644 new mode 100755 index 6e522e2..ccd6973 --- a/docs/graph_legend.html +++ b/docs/graph_legend.html @@ -3,16 +3,18 @@ - + flippy: Graph Legend + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
@@ -167,7 +174,7 @@ diff --git a/docs/graph_legend.md5 b/docs/graph_legend.md5 new file mode 100755 index 0000000..da515da --- /dev/null +++ b/docs/graph_legend.md5 @@ -0,0 +1 @@ +f74606a252eb303675caf37987d0b7af \ No newline at end of file diff --git a/docs/graph_legend.png b/docs/graph_legend.png new file mode 100755 index 0000000..91e0c31 Binary files /dev/null and b/docs/graph_legend.png differ diff --git a/docs/group___globals.html b/docs/group___globals.html old mode 100644 new mode 100755 index 95c0e45..074a203 --- a/docs/group___globals.html +++ b/docs/group___globals.html @@ -3,16 +3,18 @@ - + flippy: Globally defined functions constants and such + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -102,7 +109,6 @@
Globally defined functions constants and such
@@ -118,93 +124,39 @@ #define LONG_LONG_MAX   9223372036854775807LL  Redefinition of the LONG_LONG_MAX macro in case a specific compiler does not implement it. The largest number that fits in the long long type.
  -#define VERY_LARGE_NUMBER_   LONG_LONG_MAX - Literal for a very large integral number.
-  - -#define M_PI   3.14159265358979323846 /* pi */ - The M_PI macro is not defined on for all compilers, so it is defined here (if a definition does not already exist).
-  - - - -

Typedefs

-using fp::Json = nlohmann::json
 shortening of the nlohmann::json namespace, which is an external open source library bundled by flippy.
 
- - - - + + +

-Enumerations

enum  fp::TriangulationType { fp::SPHERICAL_TRIANGULATION -, fp::EXPERIMENTAL_PLANAR_TRIANGULATION - }
 This enum defines named types of triangulations that are implemented in flippy. More...
 
+using fp::Json = nlohmann::json
 shortening of the nlohmann::json namespace, which is an external open source library bundled by flippy.
 
- + - + - - + +

Functions

static void fp::json_dump (std::string const &file_name, const Json &data)
static void fp::json_dump (std::string const &file_name, const Json &data)
 Simple wrapper function around Json objects built in dump() method.
 
static Json fp::json_read (std::string file_name)
static Json fp::json_read (std::string file_name)
 Simple wrapper function that reads the content of a text file into a json object.
 
template<typename T >
static bool fp::is_member (std::vector< T > const &v, T const &el)
template<typename T >
static bool fp::is_member (std::vector< T > const &v, T const &el)
 Convenient wrapper around std::find, which only works for std::vectors.
 
+ + + +static constexpr int 

Variables

static constexpr auto fp::VERY_LARGE_NUMBER_ = static_cast<Index>(LONG_LONG_MAX)
 Literal for a very large integral number.
 
-static constexpr int fp::BOND_DONATION_CUTOFF = 4
fp::BOND_DONATION_CUTOFF = 4
 a node needs to have more than the cutoff number of bonds to be allowed to donate one
 

Detailed Description

this is the grouped documentation of global objects not part of any specific class.

-

Macro Definition Documentation

- -

◆ VERY_LARGE_NUMBER_

- -
-
- - - - -
#define VERY_LARGE_NUMBER_   LONG_LONG_MAX
-
- -

Literal for a very large integral number.

-

This number will be used for the default instantiation of variables/ data members that hold indices. This is done to avoid instantiation with 0, which could also be a valid index. This way, one can differentiate between unintentionally default instantiated value and a proper value of an index. This will also mean that the use of such improperly instantiated indexer variables will cause an easier-to-identify error during runtime.

See also
fp::BondFlipData fp::Neighbors fp::Triangulation::two_common_neighbours(Index, Index) const fp::Triangulation::two_common_neighbour_positions(Index, Index) const
- -
-
-

Enumeration Type Documentation

- -

◆ TriangulationType

- -
-
- -

This enum defines named types of triangulations that are implemented in flippy.

-

A triangulation type needs to be provided as a template parameter to the Triangulation class during instantiation. This will tell the class to create an appropriate topology of the triangulated Nodes. The named types tell the triangulation class to...

- - - -
Enumerator
SPHERICAL_TRIANGULATION 

Create a spherical triangulation which is a sub-triangulation of a regular icosahedron.

-
EXPERIMENTAL_PLANAR_TRIANGULATION 

Create a triangulation which is a sub-triangulation of a plane square.

-
- -
-

Function Documentation

◆ json_dump()

@@ -216,21 +168,14 @@

- + - - + - - - - - - - +
static void fp::json_dump static void fp::json_dump (std::string constfile_name, std::string const & file_name,
const Jsondata 
)const Json & data )
@@ -261,10 +206,9 @@

- + - - +
static Json fp::json_read static Json fp::json_read (std::string file_name)std::string file_name)
@@ -293,27 +237,20 @@

+template<typename T >
@@ -342,7 +279,38 @@

+ + + + + + + + +

Variable Documentation

+
+

◆ VERY_LARGE_NUMBER_

+ +
+
+

- + - - + - - - - - - - +
static bool fp::is_member static bool fp::is_member (std::vector< T > constv, std::vector< T > const & v,
T constel 
)T const & el )
+ + + + +
+ + + + +
auto fp::VERY_LARGE_NUMBER_ = static_cast<Index>(LONG_LONG_MAX)
+
+staticconstexpr
+

+ +

Literal for a very large integral number.

+

This number will be used for the default instantiation of variables/ data members that hold indices. This is done to avoid instantiation with 0, which could also be a valid index. This way, one can differentiate between unintentionally default instantiated value and a proper value of an index. This will also mean that the use of such improperly instantiated indexer variables will cause an easier-to-identify error during runtime.

See also
fp::BondFlipData fp::Neighbors fp::Triangulation::two_common_neighbours(Index, Index) const fp::Triangulation::two_common_neighbour_positions(Index, Index) const
@@ -351,7 +319,7 @@

diff --git a/docs/group___globals.js b/docs/group___globals.js old mode 100644 new mode 100755 index a0e29d3..eb0c58d --- a/docs/group___globals.js +++ b/docs/group___globals.js @@ -1,15 +1,10 @@ var group___globals = [ [ "LONG_LONG_MAX", "group___globals.html#ga383fc2c0c24436c812cc22289504a151", null ], - [ "VERY_LARGE_NUMBER_", "group___globals.html#ga4fcd71172083b7ac36f8a59485826cc1", null ], - [ "M_PI", "group___globals.html#gae71449b1cc6e6250b91f539153a7a0d3", null ], - [ "fp::Json", "group___globals.html#ga0527b166a9415a6e07381ef4e11ed318", null ], - [ "fp::TriangulationType", "group___globals.html#ga6ac3c08b4c402e40a3f270818345078a", [ - [ "fp::SPHERICAL_TRIANGULATION", "group___globals.html#gga6ac3c08b4c402e40a3f270818345078aa4818fa0ff44979ed665568888d681703", null ], - [ "fp::EXPERIMENTAL_PLANAR_TRIANGULATION", "group___globals.html#gga6ac3c08b4c402e40a3f270818345078aafb3c1a4934975221c03cd6b957b3e089", null ] - ] ], + [ "fp::Json", "group___globals.html#ga7bd3848f67a3e8464cd2db3d7b255c04", null ], [ "fp::json_dump", "group___globals.html#ga200da317c4ff647b237dad1acec6dcd2", null ], [ "fp::json_read", "group___globals.html#gad562f1206f779edba9a0557e41b5a403", null ], [ "fp::is_member", "group___globals.html#ga42171e60ff447e5c0776969445616702", null ], + [ "fp::VERY_LARGE_NUMBER_", "group___globals.html#gaff604346ea6ff1903047ab9714652974", null ], [ "fp::BOND_DONATION_CUTOFF", "group___globals.html#ga1f3b45f2b89de3c4508d87fca78f2a16", null ] ]; \ No newline at end of file diff --git a/docs/group___globals_ga42171e60ff447e5c0776969445616702_icgraph.dot b/docs/group___globals_ga42171e60ff447e5c0776969445616702_icgraph.dot deleted file mode 100644 index 00cae11..0000000 --- a/docs/group___globals_ga42171e60ff447e5c0776969445616702_icgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::is_member" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::is_member",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Convenient wrapper around std::find, which only works for std::vectors."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lexperimental_load_sphere\l_from_stl",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a62af174bd11d3db03de25587638ffeb4",tooltip="Special constructor that can initialize a triangulation with spherical topology from a binary stl stl..."]; -} diff --git a/docs/group___globals_ga42171e60ff447e5c0776969445616702_icgraph.map b/docs/group___globals_ga42171e60ff447e5c0776969445616702_icgraph.map new file mode 100755 index 0000000..ce52684 --- /dev/null +++ b/docs/group___globals_ga42171e60ff447e5c0776969445616702_icgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/group___globals_ga42171e60ff447e5c0776969445616702_icgraph.md5 b/docs/group___globals_ga42171e60ff447e5c0776969445616702_icgraph.md5 new file mode 100755 index 0000000..c227204 --- /dev/null +++ b/docs/group___globals_ga42171e60ff447e5c0776969445616702_icgraph.md5 @@ -0,0 +1 @@ +315fa9e1ee0201b59fa276496f0988e7 \ No newline at end of file diff --git a/docs/group___globals_ga42171e60ff447e5c0776969445616702_icgraph.png b/docs/group___globals_ga42171e60ff447e5c0776969445616702_icgraph.png new file mode 100755 index 0000000..7da87f3 Binary files /dev/null and b/docs/group___globals_ga42171e60ff447e5c0776969445616702_icgraph.png differ diff --git a/docs/group__my_concepts.html b/docs/group__my_concepts.html old mode 100644 new mode 100755 index 7c0ad65..be0293d --- a/docs/group__my_concepts.html +++ b/docs/group__my_concepts.html @@ -3,16 +3,18 @@ - + flippy: Special concepts + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
@@ -124,7 +131,7 @@ diff --git a/docs/group__my_concepts.js b/docs/group__my_concepts.js old mode 100644 new mode 100755 diff --git a/docs/hierarchy.html b/docs/hierarchy.html new file mode 100755 index 0000000..26a3598 --- /dev/null +++ b/docs/hierarchy.html @@ -0,0 +1,146 @@ + + + + + + + +flippy: Class Hierarchy + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class Hierarchy
+
+
+
+

Go to the graphical class hierarchy

+This inheritance list is sorted roughly, but not completely, alphabetically:
+
[detail level 12]
+ + + + + + + + + + + + + + + + + + + +
 Cfp::BondFlipDataA helper struct; keeps track of bond flips
 Cfp::experimental::DataSaver
 Cfp::experimental::csvGlobalsSaver
 Cfp::experimental::jsonDataSaver
 Cfp::experimental::xyzDataSaver
 Cfp::DynamicDisplacementUpdater
 Cfp::GeometryA helper struct. Used by the triangulation class to pass data around in one convenient package
 Cfp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >A helper class for updating the triangulation, using Metropolis–Hastings algorithm. This is a high-level interface intended to implement a basic Monte-Carlo updating scheme, which should be sufficient for a lot of simple situations
 Cfp::Neighbors
 Cfp::NodeA data structure containing all geometric and topological information associated with a node
 Cfp::NodesData structure containing all nodes of the Triangulation
 Cfp::implementation::rawSTLSolid
 Cfp::implementation::rawSTLTriangle
 Cfp::implementation::stlNode< Real, Index >
 Cfp::implementation::stlSerializer< Real, Index >
 Cfp::implementation::stlTriangle< Real, Index >
 Cfp::TriangulationImplementation of Triangulation of two-dimensional surfaces in 3D
 Cfp::vec3< Real >Internal implementation of a 3D vector
 Cfp::experimental::xyzProperty
+
+
+
+ + + + diff --git a/docs/hierarchy.js b/docs/hierarchy.js new file mode 100755 index 0000000..f308b35 --- /dev/null +++ b/docs/hierarchy.js @@ -0,0 +1,23 @@ +var hierarchy = +[ + [ "fp::BondFlipData", "structfp_1_1_bond_flip_data.html", null ], + [ "fp::experimental::DataSaver", "classfp_1_1experimental_1_1_data_saver.html", [ + [ "fp::experimental::csvGlobalsSaver", "classfp_1_1experimental_1_1csv_globals_saver.html", null ], + [ "fp::experimental::jsonDataSaver", "classfp_1_1experimental_1_1json_data_saver.html", null ], + [ "fp::experimental::xyzDataSaver", "classfp_1_1experimental_1_1xyz_data_saver.html", null ] + ] ], + [ "fp::DynamicDisplacementUpdater", "classfp_1_1_dynamic_displacement_updater.html", null ], + [ "fp::Geometry", "structfp_1_1_geometry.html", null ], + [ "fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >", "classfp_1_1_monte_carlo_updater.html", null ], + [ "fp::Neighbors", "structfp_1_1_neighbors.html", null ], + [ "fp::Node", "structfp_1_1_node.html", null ], + [ "fp::Nodes", "structfp_1_1_nodes.html", null ], + [ "fp::implementation::rawSTLSolid", "structfp_1_1implementation_1_1raw_s_t_l_solid.html", null ], + [ "fp::implementation::rawSTLTriangle", "structfp_1_1implementation_1_1raw_s_t_l_triangle.html", null ], + [ "fp::implementation::stlNode< Real, Index >", "structfp_1_1implementation_1_1stl_node.html", null ], + [ "fp::implementation::stlSerializer< Real, Index >", "classfp_1_1implementation_1_1stl_serializer.html", null ], + [ "fp::implementation::stlTriangle< Real, Index >", "classfp_1_1implementation_1_1stl_triangle.html", null ], + [ "fp::Triangulation", "classfp_1_1_triangulation.html", null ], + [ "fp::vec3< Real >", "classfp_1_1vec3.html", null ], + [ "fp::experimental::xyzProperty", "structfp_1_1experimental_1_1xyz_property.html", null ] +]; \ No newline at end of file diff --git a/docs/index.html b/docs/index.html old mode 100644 new mode 100755 index c8272c4..908c15e --- a/docs/index.html +++ b/docs/index.html @@ -3,16 +3,18 @@ - + flippy: Documentation overview + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -131,12 +138,13 @@

[experimental]_ this method data member etc. Is at this point an experimental feature. This means that it is not thoroughly tested and it is not a stable part of the API.

+ diff --git a/docs/inherit_graph_0.map b/docs/inherit_graph_0.map new file mode 100755 index 0000000..46c594b --- /dev/null +++ b/docs/inherit_graph_0.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_0.md5 b/docs/inherit_graph_0.md5 new file mode 100755 index 0000000..d00be86 --- /dev/null +++ b/docs/inherit_graph_0.md5 @@ -0,0 +1 @@ +1887fcca1a82a716851ce94243a88da7 \ No newline at end of file diff --git a/docs/inherit_graph_0.png b/docs/inherit_graph_0.png new file mode 100755 index 0000000..39c3871 Binary files /dev/null and b/docs/inherit_graph_0.png differ diff --git a/docs/inherit_graph_1.map b/docs/inherit_graph_1.map new file mode 100755 index 0000000..f317c76 --- /dev/null +++ b/docs/inherit_graph_1.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_1.md5 b/docs/inherit_graph_1.md5 new file mode 100755 index 0000000..de09595 --- /dev/null +++ b/docs/inherit_graph_1.md5 @@ -0,0 +1 @@ +10d825f3db78b18e2205f9865b3558f1 \ No newline at end of file diff --git a/docs/inherit_graph_1.png b/docs/inherit_graph_1.png new file mode 100755 index 0000000..359b01e Binary files /dev/null and b/docs/inherit_graph_1.png differ diff --git a/docs/inherit_graph_10.map b/docs/inherit_graph_10.map new file mode 100755 index 0000000..1ef621f --- /dev/null +++ b/docs/inherit_graph_10.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_10.md5 b/docs/inherit_graph_10.md5 new file mode 100755 index 0000000..1629396 --- /dev/null +++ b/docs/inherit_graph_10.md5 @@ -0,0 +1 @@ +727705e3f3c17748ab38abea1f470283 \ No newline at end of file diff --git a/docs/inherit_graph_10.png b/docs/inherit_graph_10.png new file mode 100755 index 0000000..c316de8 Binary files /dev/null and b/docs/inherit_graph_10.png differ diff --git a/docs/inherit_graph_11.map b/docs/inherit_graph_11.map new file mode 100755 index 0000000..117be2f --- /dev/null +++ b/docs/inherit_graph_11.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_11.md5 b/docs/inherit_graph_11.md5 new file mode 100755 index 0000000..b11faee --- /dev/null +++ b/docs/inherit_graph_11.md5 @@ -0,0 +1 @@ +29282574795410ec58d9d040b2731f17 \ No newline at end of file diff --git a/docs/inherit_graph_11.png b/docs/inherit_graph_11.png new file mode 100755 index 0000000..d449518 Binary files /dev/null and b/docs/inherit_graph_11.png differ diff --git a/docs/inherit_graph_12.map b/docs/inherit_graph_12.map new file mode 100755 index 0000000..a620d6e --- /dev/null +++ b/docs/inherit_graph_12.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_12.md5 b/docs/inherit_graph_12.md5 new file mode 100755 index 0000000..ee1bbc3 --- /dev/null +++ b/docs/inherit_graph_12.md5 @@ -0,0 +1 @@ +7bbfab9e23a1b0cdaf16d3d1551cfccb \ No newline at end of file diff --git a/docs/inherit_graph_12.png b/docs/inherit_graph_12.png new file mode 100755 index 0000000..f0c4330 Binary files /dev/null and b/docs/inherit_graph_12.png differ diff --git a/docs/inherit_graph_13.map b/docs/inherit_graph_13.map new file mode 100755 index 0000000..c28373d --- /dev/null +++ b/docs/inherit_graph_13.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_13.md5 b/docs/inherit_graph_13.md5 new file mode 100755 index 0000000..e769500 --- /dev/null +++ b/docs/inherit_graph_13.md5 @@ -0,0 +1 @@ +c5ae270506ed2a6ab230f3dd0d2ac739 \ No newline at end of file diff --git a/docs/inherit_graph_13.png b/docs/inherit_graph_13.png new file mode 100755 index 0000000..b04cce0 Binary files /dev/null and b/docs/inherit_graph_13.png differ diff --git a/docs/inherit_graph_14.map b/docs/inherit_graph_14.map new file mode 100755 index 0000000..15a47d1 --- /dev/null +++ b/docs/inherit_graph_14.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_14.md5 b/docs/inherit_graph_14.md5 new file mode 100755 index 0000000..c886c95 --- /dev/null +++ b/docs/inherit_graph_14.md5 @@ -0,0 +1 @@ +46800d20f6a3cc1ddac0f0e454db2bcc \ No newline at end of file diff --git a/docs/inherit_graph_14.png b/docs/inherit_graph_14.png new file mode 100755 index 0000000..d7da1e3 Binary files /dev/null and b/docs/inherit_graph_14.png differ diff --git a/docs/inherit_graph_15.map b/docs/inherit_graph_15.map new file mode 100755 index 0000000..1fef443 --- /dev/null +++ b/docs/inherit_graph_15.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_15.md5 b/docs/inherit_graph_15.md5 new file mode 100755 index 0000000..e646a24 --- /dev/null +++ b/docs/inherit_graph_15.md5 @@ -0,0 +1 @@ +d53fa91b48b32069e9dc4027241941e5 \ No newline at end of file diff --git a/docs/inherit_graph_15.png b/docs/inherit_graph_15.png new file mode 100755 index 0000000..82cd55f Binary files /dev/null and b/docs/inherit_graph_15.png differ diff --git a/docs/inherit_graph_2.map b/docs/inherit_graph_2.map new file mode 100755 index 0000000..ab7cd67 --- /dev/null +++ b/docs/inherit_graph_2.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/inherit_graph_2.md5 b/docs/inherit_graph_2.md5 new file mode 100755 index 0000000..747a43e --- /dev/null +++ b/docs/inherit_graph_2.md5 @@ -0,0 +1 @@ +4e826fa16517d449557e7ba1fce6f6e5 \ No newline at end of file diff --git a/docs/inherit_graph_2.png b/docs/inherit_graph_2.png new file mode 100755 index 0000000..7600917 Binary files /dev/null and b/docs/inherit_graph_2.png differ diff --git a/docs/inherit_graph_3.map b/docs/inherit_graph_3.map new file mode 100755 index 0000000..73a3976 --- /dev/null +++ b/docs/inherit_graph_3.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_3.md5 b/docs/inherit_graph_3.md5 new file mode 100755 index 0000000..d39f4a0 --- /dev/null +++ b/docs/inherit_graph_3.md5 @@ -0,0 +1 @@ +dce02ccb767acb7acedd0ec3025c06bd \ No newline at end of file diff --git a/docs/inherit_graph_3.png b/docs/inherit_graph_3.png new file mode 100755 index 0000000..3017e94 Binary files /dev/null and b/docs/inherit_graph_3.png differ diff --git a/docs/inherit_graph_4.map b/docs/inherit_graph_4.map new file mode 100755 index 0000000..51a20e0 --- /dev/null +++ b/docs/inherit_graph_4.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_4.md5 b/docs/inherit_graph_4.md5 new file mode 100755 index 0000000..180c9b8 --- /dev/null +++ b/docs/inherit_graph_4.md5 @@ -0,0 +1 @@ +9628ad37c9384fddaf7c0700cb74f280 \ No newline at end of file diff --git a/docs/inherit_graph_4.png b/docs/inherit_graph_4.png new file mode 100755 index 0000000..052f071 Binary files /dev/null and b/docs/inherit_graph_4.png differ diff --git a/docs/inherit_graph_5.map b/docs/inherit_graph_5.map new file mode 100755 index 0000000..7e0639e --- /dev/null +++ b/docs/inherit_graph_5.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_5.md5 b/docs/inherit_graph_5.md5 new file mode 100755 index 0000000..438df82 --- /dev/null +++ b/docs/inherit_graph_5.md5 @@ -0,0 +1 @@ +3f0e5a02dd449b60433a61a4999f9408 \ No newline at end of file diff --git a/docs/inherit_graph_5.png b/docs/inherit_graph_5.png new file mode 100755 index 0000000..8e95765 Binary files /dev/null and b/docs/inherit_graph_5.png differ diff --git a/docs/inherit_graph_6.map b/docs/inherit_graph_6.map new file mode 100755 index 0000000..32aec3c --- /dev/null +++ b/docs/inherit_graph_6.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_6.md5 b/docs/inherit_graph_6.md5 new file mode 100755 index 0000000..3d166fe --- /dev/null +++ b/docs/inherit_graph_6.md5 @@ -0,0 +1 @@ +ed1c3cf0d35a64747532b70378014ae3 \ No newline at end of file diff --git a/docs/inherit_graph_6.png b/docs/inherit_graph_6.png new file mode 100755 index 0000000..351ea3d Binary files /dev/null and b/docs/inherit_graph_6.png differ diff --git a/docs/inherit_graph_7.map b/docs/inherit_graph_7.map new file mode 100755 index 0000000..a484c90 --- /dev/null +++ b/docs/inherit_graph_7.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_7.md5 b/docs/inherit_graph_7.md5 new file mode 100755 index 0000000..67b2337 --- /dev/null +++ b/docs/inherit_graph_7.md5 @@ -0,0 +1 @@ +ef1d6befccf2556af5348edca9fd31e3 \ No newline at end of file diff --git a/docs/inherit_graph_7.png b/docs/inherit_graph_7.png new file mode 100755 index 0000000..822fadf Binary files /dev/null and b/docs/inherit_graph_7.png differ diff --git a/docs/inherit_graph_8.map b/docs/inherit_graph_8.map new file mode 100755 index 0000000..a81ab9c --- /dev/null +++ b/docs/inherit_graph_8.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_8.md5 b/docs/inherit_graph_8.md5 new file mode 100755 index 0000000..9e2092c --- /dev/null +++ b/docs/inherit_graph_8.md5 @@ -0,0 +1 @@ +ca6d318fb8cc105ae5096d2b9021c6d5 \ No newline at end of file diff --git a/docs/inherit_graph_8.png b/docs/inherit_graph_8.png new file mode 100755 index 0000000..b26d5e8 Binary files /dev/null and b/docs/inherit_graph_8.png differ diff --git a/docs/inherit_graph_9.map b/docs/inherit_graph_9.map new file mode 100755 index 0000000..0a1854e --- /dev/null +++ b/docs/inherit_graph_9.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_9.md5 b/docs/inherit_graph_9.md5 new file mode 100755 index 0000000..d9d0528 --- /dev/null +++ b/docs/inherit_graph_9.md5 @@ -0,0 +1 @@ +e9678ff038defe4e010fb9910f046187 \ No newline at end of file diff --git a/docs/inherit_graph_9.png b/docs/inherit_graph_9.png new file mode 100755 index 0000000..75b7858 Binary files /dev/null and b/docs/inherit_graph_9.png differ diff --git a/docs/inherits.html b/docs/inherits.html new file mode 100755 index 0000000..6bfc589 --- /dev/null +++ b/docs/inherits.html @@ -0,0 +1,211 @@ + + + + + + + +flippy: Class Hierarchy + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class Hierarchy
+
+
+ + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + + + + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+
+
+ + + + diff --git a/docs/jquery.js b/docs/jquery.js old mode 100644 new mode 100755 diff --git a/docs/menu.js b/docs/menu.js old mode 100644 new mode 100755 index b0b2693..0fd1e99 --- a/docs/menu.js +++ b/docs/menu.js @@ -22,15 +22,14 @@ @licend The above is the entire license notice for the JavaScript code in this file */ -function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { +function initMenu(relPath,searchEnabled,serverSide,searchPage,search,treeview) { function makeTree(data,relPath) { - var result=''; + let result=''; if ('children' in data) { result+='
    '; - for (var i in data.children) { - var url; - var link; - link = data.children[i].url; + for (let i in data.children) { + let url; + const link = data.children[i].url; if (link.substring(0,1)=='^') { url = link.substring(1); } else { @@ -44,7 +43,7 @@ function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { } return result; } - var searchBoxHtml; + let searchBoxHtml; if (searchEnabled) { if (serverSide) { searchBoxHtml='
    '+ @@ -88,29 +87,28 @@ function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { if (searchBoxHtml) { $('#main-menu').append('
  • '); } - var $mainMenuState = $('#main-menu-state'); - var prevWidth = 0; + const $mainMenuState = $('#main-menu-state'); + let prevWidth = 0; if ($mainMenuState.length) { - function initResizableIfExists() { - if (typeof initResizable==='function') initResizable(); + const initResizableIfExists = function() { + if (typeof initResizable==='function') initResizable(treeview); } // animate mobile menu - $mainMenuState.change(function(e) { - var $menu = $('#main-menu'); - var options = { duration: 250, step: initResizableIfExists }; + $mainMenuState.change(function() { + const $menu = $('#main-menu'); + let options = { duration: 250, step: initResizableIfExists }; if (this.checked) { - options['complete'] = function() { $menu.css('display', 'block') }; + options['complete'] = () => $menu.css('display', 'block'); $menu.hide().slideDown(options); } else { - options['complete'] = function() { $menu.css('display', 'none') }; + options['complete'] = () => $menu.css('display', 'none'); $menu.show().slideUp(options); } }); // set default menu visibility - function resetState() { - var $menu = $('#main-menu'); - var $mainMenuState = $('#main-menu-state'); - var newWidth = $(window).outerWidth(); + const resetState = function() { + const $menu = $('#main-menu'); + const newWidth = $(window).outerWidth(); if (newWidth!=prevWidth) { if ($(window).outerWidth()<768) { $mainMenuState.prop('checked',false); $menu.hide(); diff --git a/docs/menudata.js b/docs/menudata.js old mode 100644 new mode 100755 index d5438bc..22d52ae --- a/docs/menudata.js +++ b/docs/menudata.js @@ -31,13 +31,12 @@ var menudata={children:[ {text:"All",url:"namespacemembers.html"}, {text:"Functions",url:"namespacemembers_func.html"}, {text:"Variables",url:"namespacemembers_vars.html"}, -{text:"Typedefs",url:"namespacemembers_type.html"}, -{text:"Enumerations",url:"namespacemembers_enum.html"}, -{text:"Enumerator",url:"namespacemembers_eval.html"}]}]}, +{text:"Typedefs",url:"namespacemembers_type.html"}]}]}, {text:"Concepts",url:"concepts.html"}, {text:"Classes",url:"annotated.html",children:[ {text:"Class List",url:"annotated.html"}, {text:"Class Index",url:"classes.html"}, +{text:"Class Hierarchy",url:"inherits.html"}, {text:"Class Members",url:"functions.html",children:[ {text:"All",url:"functions.html",children:[ {text:"a",url:"functions.html#index_a"}, @@ -78,8 +77,7 @@ var menudata={children:[ {text:"r",url:"functions_func.html#index_r"}, {text:"s",url:"functions_func.html#index_s"}, {text:"t",url:"functions_func.html#index_t"}, -{text:"u",url:"functions_func.html#index_u"}, -{text:"v",url:"functions_func.html#index_v"}]}, +{text:"u",url:"functions_func.html#index_u"}]}, {text:"Variables",url:"functions_vars.html"}, {text:"Related Symbols",url:"functions_rela.html"}]}]}, {text:"Files",url:"files.html",children:[ diff --git a/docs/minus.svg b/docs/minus.svg old mode 100644 new mode 100755 diff --git a/docs/minusd.svg b/docs/minusd.svg old mode 100644 new mode 100755 diff --git a/docs/namespacefp.html b/docs/namespacefp.html old mode 100644 new mode 100755 index c0d8e75..deb8283 --- a/docs/namespacefp.html +++ b/docs/namespacefp.html @@ -3,16 +3,18 @@ - + flippy: fp Namespace Reference + - + + @@ -43,19 +45,24 @@
    - + + @@ -73,7 +80,7 @@
    @@ -104,7 +111,6 @@ Classes | Concepts | Typedefs | -Enumerations | Functions | Variables
    fp Namespace Reference
    @@ -113,7 +119,7 @@ - +

    Namespaces

    namespace  implementation
    namespace  implementation
     
    + + @@ -150,51 +158,186 @@ + +

    @@ -121,6 +127,8 @@

    struct  BondFlipData
     A helper struct; keeps track of bond flips. More...
     
    class  DynamicDisplacementUpdater
     
    struct  Geometry
     A helper struct. Used by the triangulation class to pass data around in one convenient package. More...
     
    concept  indexing_number
     Here we implement the concepts of a positive integer number that is used throughout the code for indexing.
     
    concept  Container
     
    - - - -

    Typedefs

    -using Json = nlohmann::json
     shortening of the nlohmann::json namespace, which is an external open source library bundled by flippy.
     
    - - - - + + + + + + +

    -Enumerations

    enum  TriangulationType { SPHERICAL_TRIANGULATION -, EXPERIMENTAL_PLANAR_TRIANGULATION - }
     This enum defines named types of triangulations that are implemented in flippy. More...
     
    +using Index = unsigned int
     
    +using Real = double
     
    +using Json = nlohmann::json
     shortening of the nlohmann::json namespace, which is an external open source library bundled by flippy.
     
    - + + + + + + + + + + + + + + + + + + + + + + - + - - + +

    Functions

    static void json_dump (std::string const &file_name, const Json &data)
    +static Real operator""_r (long double value)
     
    +static Real operator""_r (unsigned long long value)
     
    +static Real sphere_vol (Real R)
     
    +static Real sphere_area (Real R)
     
    +static Real linear_adaptation (Real x, Real x_init, Real x_fin, Real val_init, Real val_fin)
     
    +static Index steps_for_fixed_speed_adaptation (Real x_init, Real val_init, Real val_fin, Real delta_val)
     
    +static Real min_radius_with_non_overlapping_beads (Real min_allowed_distance_between_bead_centers, Index sub_triangulation_iteration_count)
     N_node=12+30*n+20*n*(n-1)/2 where n is the same as sub_triangulation_iteration_count.
     
    static Real node_curvature_squared (Node const &node)
     
    static Real node_unit_bending_energy (Node const &node)
     
    +static Real changed_neighborhood_bending_energy (Node const &node, fp::Nodes const &nodes, std::vector< Index >const &changed_neighborhood)
     
    static void json_dump (std::string const &file_name, const Json &data)
     Simple wrapper function around Json objects built in dump() method.
     
    static Json json_read (std::string file_name)
    static Json json_read (std::string file_name)
     Simple wrapper function that reads the content of a text file into a json object.
     
    template<typename T >
    static bool is_member (std::vector< T > const &v, T const &el)
    template<typename T >
    static bool is_member (std::vector< T > const &v, T const &el)
     Convenient wrapper around std::find, which only works for std::vectors.
     
    + + + + + +static constexpr int 

    Variables

    +static constexpr auto PI = static_cast<Real>(3.14159265358979323846264338327950288)
     
    static constexpr auto VERY_LARGE_NUMBER_ = static_cast<Index>(LONG_LONG_MAX)
     Literal for a very large integral number.
     
    -static constexpr int BOND_DONATION_CUTOFF = 4
    BOND_DONATION_CUTOFF = 4
     a node needs to have more than the cutoff number of bonds to be allowed to donate one
     

    Detailed Description

    flippy's namespace.

    -
    +

    Function Documentation

    + +

    ◆ node_curvature_squared()

    + +
    +
    + + + + + +
    + + + + + + + +
    static Real fp::node_curvature_squared (Node const & node)
    +
    +staticnodiscard
    +
    +

    unit_bending_energy corresponds to the Helfrich bending energy with bending rigidity 1 and gaussian bending stiffness 0.

    +

    +\[ + \mathrm{unit\_bending\_energy} = \frac{1}{2} A_{\mathrm{node}} (2 H_{node})^2 +\] +

    +

    where \( H_{node} \) is the mean curvature of the node given by:

    +\[ +H_{node}^2 = \frac{\vec{K}_{node}}{2A_{node}} \cdot \frac{\vec{K}_{node}}{2A_{node}} +\] +

    +

    , with \( \vec{K} \) denoting the Node::curvature_vector.

    See also
    Node::curvature_vec Triangulation::update_bulk_node_geometry(Index)
    +

    (static_cast<Real>(4.f)*A*A);

    +
    +Here is the call graph for this function:
    +
    +
    + + + + + + + +
    + +
    +
    + +

    ◆ node_unit_bending_energy()

    + +
    +
    + + + + + +
    + + + + + + + +
    static Real fp::node_unit_bending_energy (Node const & node)
    +
    +staticnodiscard
    +
    +

    unit_bending_energy corresponds to the Helfrich bending energy with bending rigidity 1 and gaussian bending stiffness 0.

    +

    +\[ + \mathrm{unit\_bending\_energy} = \frac{1}{2} A_{\mathrm{node}} (2 H_{node})^2 +\] +

    +

    where \( H_{node} \) is the mean curvature of the node given by:

    +\[ +H_{node}^2 = \frac{\vec{K}_{node}}{2A_{node}} \cdot \frac{\vec{K}_{node}}{2A_{node}} +\] +

    +

    , with \( \vec{K} \) denoting the Node::curvature_vector.

    See also
    Node::curvature_vec Triangulation::update_bulk_node_geometry(Index)
    +
    +Here is the call graph for this function:
    +
    +
    + + + + + + + +
    + +
    +
    + diff --git a/docs/namespacefp.js b/docs/namespacefp.js old mode 100644 new mode 100755 index a5464a1..9bdcb7b --- a/docs/namespacefp.js +++ b/docs/namespacefp.js @@ -2,6 +2,7 @@ var namespacefp = [ [ "implementation", "namespacefp_1_1implementation.html", "namespacefp_1_1implementation" ], [ "BondFlipData", "structfp_1_1_bond_flip_data.html", "structfp_1_1_bond_flip_data" ], + [ "DynamicDisplacementUpdater", "classfp_1_1_dynamic_displacement_updater.html", null ], [ "Geometry", "structfp_1_1_geometry.html", "structfp_1_1_geometry" ], [ "MonteCarloUpdater", "classfp_1_1_monte_carlo_updater.html", "classfp_1_1_monte_carlo_updater" ], [ "Neighbors", "structfp_1_1_neighbors.html", "structfp_1_1_neighbors" ], @@ -11,13 +12,14 @@ var namespacefp = [ "vec3", "classfp_1_1vec3.html", "classfp_1_1vec3" ], [ "floating_point_number", "conceptfp_1_1floating__point__number.html", null ], [ "indexing_number", "conceptfp_1_1indexing__number.html", null ], - [ "Json", "group___globals.html#ga0527b166a9415a6e07381ef4e11ed318", null ], - [ "TriangulationType", "group___globals.html#ga6ac3c08b4c402e40a3f270818345078a", [ - [ "SPHERICAL_TRIANGULATION", "group___globals.html#gga6ac3c08b4c402e40a3f270818345078aa4818fa0ff44979ed665568888d681703", null ], - [ "EXPERIMENTAL_PLANAR_TRIANGULATION", "group___globals.html#gga6ac3c08b4c402e40a3f270818345078aafb3c1a4934975221c03cd6b957b3e089", null ] - ] ], + [ "Container", "conceptfp_1_1_container.html", null ], + [ "Json", "group___globals.html#ga7bd3848f67a3e8464cd2db3d7b255c04", null ], + [ "min_radius_with_non_overlapping_beads", "namespacefp.html#a002936af49386985bc3a8c16bcd3f18b", null ], + [ "node_curvature_squared", "namespacefp.html#a078adea1b2428bde7781bb5adde2f253", null ], + [ "node_unit_bending_energy", "namespacefp.html#aa5f7482d07c411db881895fbed9ab72f", null ], [ "json_dump", "group___globals.html#ga200da317c4ff647b237dad1acec6dcd2", null ], [ "json_read", "group___globals.html#gad562f1206f779edba9a0557e41b5a403", null ], [ "is_member", "group___globals.html#ga42171e60ff447e5c0776969445616702", null ], + [ "VERY_LARGE_NUMBER_", "group___globals.html#gaff604346ea6ff1903047ab9714652974", null ], [ "BOND_DONATION_CUTOFF", "group___globals.html#ga1f3b45f2b89de3c4508d87fca78f2a16", null ] ]; \ No newline at end of file diff --git a/docs/namespacefp_1_1implementation.html b/docs/namespacefp_1_1implementation.html old mode 100644 new mode 100755 index 9506db6..bf8fd77 --- a/docs/namespacefp_1_1implementation.html +++ b/docs/namespacefp_1_1implementation.html @@ -3,16 +3,18 @@ - + flippy: fp::implementation Namespace Reference + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
    @@ -101,6 +108,7 @@
    fp::implementation Namespace Reference
    @@ -119,16 +127,33 @@ class  stlTriangle   + + + + + + + + + + + + + + + +

    +Concepts

    concept  Beginable
     
    concept  Endable
     
    concept  NeqableBeginAndEnd
     
    concept  BeginIncrementable
     
    concept  BeginDerefable
     
    concept  BeginDerefToVoid
     
    concept  BeginAndEndCopyConstructibleAndDestructible
     
    +static void  +static rawSTLTriangle  +static rawSTLSolid 

    Functions

    -static void printSTLTriangle (rawSTLTriangle const &triangle, std::optional< std::string > const &name=std::nullopt)
    printSTLTriangle (rawSTLTriangle const &triangle, std::optional< std::string > const &name=std::nullopt)
     
    -static rawSTLTriangle loadSTLTriangle (std::ifstream &inp)
    loadSTLTriangle (std::ifstream &inp)
     
    -static rawSTLSolid loadSTLSolid (std::ifstream &inp)
    loadSTLSolid (std::ifstream &inp)
     

    Detailed Description

    @@ -139,7 +164,7 @@ diff --git a/docs/namespacefp_1_1implementation.js b/docs/namespacefp_1_1implementation.js old mode 100644 new mode 100755 index fa6dd36..887084c --- a/docs/namespacefp_1_1implementation.js +++ b/docs/namespacefp_1_1implementation.js @@ -4,5 +4,12 @@ var namespacefp_1_1implementation = [ "rawSTLTriangle", "structfp_1_1implementation_1_1raw_s_t_l_triangle.html", null ], [ "stlNode", "structfp_1_1implementation_1_1stl_node.html", null ], [ "stlSerializer", "classfp_1_1implementation_1_1stl_serializer.html", null ], - [ "stlTriangle", "classfp_1_1implementation_1_1stl_triangle.html", null ] + [ "stlTriangle", "classfp_1_1implementation_1_1stl_triangle.html", null ], + [ "Beginable", "conceptfp_1_1implementation_1_1_beginable.html", null ], + [ "Endable", "conceptfp_1_1implementation_1_1_endable.html", null ], + [ "NeqableBeginAndEnd", "conceptfp_1_1implementation_1_1_neqable_begin_and_end.html", null ], + [ "BeginIncrementable", "conceptfp_1_1implementation_1_1_begin_incrementable.html", null ], + [ "BeginDerefable", "conceptfp_1_1implementation_1_1_begin_derefable.html", null ], + [ "BeginDerefToVoid", "conceptfp_1_1implementation_1_1_begin_deref_to_void.html", null ], + [ "BeginAndEndCopyConstructibleAndDestructible", "conceptfp_1_1implementation_1_1_begin_and_end_copy_constructible_and_destructible.html", null ] ]; \ No newline at end of file diff --git a/docs/namespacefp_a078adea1b2428bde7781bb5adde2f253_cgraph.map b/docs/namespacefp_a078adea1b2428bde7781bb5adde2f253_cgraph.map new file mode 100755 index 0000000..b3e7171 --- /dev/null +++ b/docs/namespacefp_a078adea1b2428bde7781bb5adde2f253_cgraph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/namespacefp_a078adea1b2428bde7781bb5adde2f253_cgraph.md5 b/docs/namespacefp_a078adea1b2428bde7781bb5adde2f253_cgraph.md5 new file mode 100755 index 0000000..14e9244 --- /dev/null +++ b/docs/namespacefp_a078adea1b2428bde7781bb5adde2f253_cgraph.md5 @@ -0,0 +1 @@ +017da05e04d70b311b8ac6c76a640c5a \ No newline at end of file diff --git a/docs/namespacefp_a078adea1b2428bde7781bb5adde2f253_cgraph.png b/docs/namespacefp_a078adea1b2428bde7781bb5adde2f253_cgraph.png new file mode 100755 index 0000000..36e16b3 Binary files /dev/null and b/docs/namespacefp_a078adea1b2428bde7781bb5adde2f253_cgraph.png differ diff --git a/docs/namespacefp_aa5f7482d07c411db881895fbed9ab72f_cgraph.map b/docs/namespacefp_aa5f7482d07c411db881895fbed9ab72f_cgraph.map new file mode 100755 index 0000000..3846478 --- /dev/null +++ b/docs/namespacefp_aa5f7482d07c411db881895fbed9ab72f_cgraph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/namespacefp_aa5f7482d07c411db881895fbed9ab72f_cgraph.md5 b/docs/namespacefp_aa5f7482d07c411db881895fbed9ab72f_cgraph.md5 new file mode 100755 index 0000000..0e45501 --- /dev/null +++ b/docs/namespacefp_aa5f7482d07c411db881895fbed9ab72f_cgraph.md5 @@ -0,0 +1 @@ +2f417edf2c12b95b32a9b90f503e8576 \ No newline at end of file diff --git a/docs/namespacefp_aa5f7482d07c411db881895fbed9ab72f_cgraph.png b/docs/namespacefp_aa5f7482d07c411db881895fbed9ab72f_cgraph.png new file mode 100755 index 0000000..d281356 Binary files /dev/null and b/docs/namespacefp_aa5f7482d07c411db881895fbed9ab72f_cgraph.png differ diff --git a/docs/namespacemembers.html b/docs/namespacemembers.html old mode 100644 new mode 100755 index 5a62edd..328102b --- a/docs/namespacemembers.html +++ b/docs/namespacemembers.html @@ -3,16 +3,18 @@ - + flippy: Namespace Members + - + + @@ -43,19 +45,24 @@
    - + + @@ -73,7 +80,7 @@
    @@ -101,20 +108,21 @@
    Here is a list of all documented namespace members with links to the namespaces they belong to:
    • BOND_DONATION_CUTOFF : fp
    • -
    • EXPERIMENTAL_PLANAR_TRIANGULATION : fp
    • is_member() : fp
    • -
    • Json : fp
    • +
    • Json : fp
    • json_dump() : fp
    • json_read() : fp
    • -
    • SPHERICAL_TRIANGULATION : fp
    • -
    • TriangulationType : fp
    • +
    • min_radius_with_non_overlapping_beads() : fp
    • +
    • node_curvature_squared() : fp
    • +
    • node_unit_bending_energy() : fp
    • +
    • VERY_LARGE_NUMBER_ : fp
    diff --git a/docs/namespacemembers_func.html b/docs/namespacemembers_func.html old mode 100644 new mode 100755 index 6b036b6..c290bb7 --- a/docs/namespacemembers_func.html +++ b/docs/namespacemembers_func.html @@ -3,16 +3,18 @@ - + flippy: Namespace Members + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
    @@ -103,13 +110,16 @@
  • is_member() : fp
  • json_dump() : fp
  • json_read() : fp
  • +
  • min_radius_with_non_overlapping_beads() : fp
  • +
  • node_curvature_squared() : fp
  • +
  • node_unit_bending_energy() : fp
diff --git a/docs/namespacemembers_type.html b/docs/namespacemembers_type.html old mode 100644 new mode 100755 index da6b323..abf58ad --- a/docs/namespacemembers_type.html +++ b/docs/namespacemembers_type.html @@ -3,16 +3,18 @@ - + flippy: Namespace Members + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
@@ -100,14 +107,14 @@
Here is a list of all documented namespace typedefs with links to the namespaces they belong to:
    -
  • Json : fp
  • +
  • Json : fp
diff --git a/docs/namespacemembers_vars.html b/docs/namespacemembers_vars.html old mode 100644 new mode 100755 index 1a3264c..86c7137 --- a/docs/namespacemembers_vars.html +++ b/docs/namespacemembers_vars.html @@ -3,16 +3,18 @@ - + flippy: Namespace Members + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
@@ -101,13 +108,14 @@
Here is a list of all documented namespace variables with links to the namespaces they belong to:
  • BOND_DONATION_CUTOFF : fp
  • +
  • VERY_LARGE_NUMBER_ : fp
diff --git a/docs/namespaces.html b/docs/namespaces.html old mode 100644 new mode 100755 index 95927b8..3eb1c57 --- a/docs/namespaces.html +++ b/docs/namespaces.html @@ -3,16 +3,18 @@ - + flippy: Namespace List + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
@@ -103,24 +110,33 @@
Here is a list of all documented namespaces with brief descriptions:
-
[detail level 123]
- - +
[detail level 123]
 Nfp
 Nimplementation
+ + - - - - - - - - - - + + + + + + + + + + + + + + + + + + +
 Nfp
 Nimplementation
 CrawSTLSolid
 CrawSTLTriangle
 CstlNode
 CstlSerializer
 CstlTriangle
 CBondFlipDataA helper struct; keeps track of bond flips
 CGeometryA helper struct. Used by the triangulation class to pass data around in one convenient package
 CMonteCarloUpdaterA helper class for updating the triangulation, using Metropolis–Hastings algorithm. This is a high-level interface intended to implement a basic Monte-Carlo updating scheme, which should be sufficient for a lot of simple situations
 CNeighbors
 CNodeA data structure containing all geometric and topological information associated with a node
 CNodesData structure containing all nodes of the Triangulation
 CTriangulationImplementation of Triangulation of two-dimensional surfaces in 3D
 Cvec3Internal implementation of a 3D vector
 Rfloating_point_numberHere we implement the concepts of a floating point number
 Rindexing_numberHere we implement the concepts of a positive integer number that is used throughout the code for indexing
 RBeginable
 REndable
 RNeqableBeginAndEnd
 RBeginIncrementable
 RBeginDerefable
 RBeginDerefToVoid
 RBeginAndEndCopyConstructibleAndDestructible
 CBondFlipDataA helper struct; keeps track of bond flips
 CDynamicDisplacementUpdater
 CGeometryA helper struct. Used by the triangulation class to pass data around in one convenient package
 CMonteCarloUpdaterA helper class for updating the triangulation, using Metropolis–Hastings algorithm. This is a high-level interface intended to implement a basic Monte-Carlo updating scheme, which should be sufficient for a lot of simple situations
 CNeighbors
 CNodeA data structure containing all geometric and topological information associated with a node
 CNodesData structure containing all nodes of the Triangulation
 CTriangulationImplementation of Triangulation of two-dimensional surfaces in 3D
 Cvec3Internal implementation of a 3D vector
 Rfloating_point_numberHere we implement the concepts of a floating point number
 Rindexing_numberHere we implement the concepts of a positive integer number that is used throughout the code for indexing
 RContainer
@@ -128,7 +144,7 @@ diff --git a/docs/namespaces_dup.js b/docs/namespaces_dup.js old mode 100644 new mode 100755 diff --git a/docs/nav_f.png b/docs/nav_f.png old mode 100644 new mode 100755 diff --git a/docs/nav_fd.png b/docs/nav_fd.png old mode 100644 new mode 100755 diff --git a/docs/nav_g.png b/docs/nav_g.png old mode 100644 new mode 100755 diff --git a/docs/nav_h.png b/docs/nav_h.png old mode 100644 new mode 100755 diff --git a/docs/nav_hd.png b/docs/nav_hd.png old mode 100644 new mode 100755 diff --git a/docs/navtree.css b/docs/navtree.css old mode 100644 new mode 100755 diff --git a/docs/navtree.js b/docs/navtree.js old mode 100644 new mode 100755 index 93dd3d4..9027ce6 --- a/docs/navtree.js +++ b/docs/navtree.js @@ -22,538 +22,462 @@ @licend The above is the entire license notice for the JavaScript code in this file */ -var navTreeSubIndices = new Array(); -var arrowDown = '▼'; -var arrowRight = '►'; - -function getData(varName) -{ - var i = varName.lastIndexOf('/'); - var n = i>=0 ? varName.substring(i+1) : varName; - return eval(n.replace(/\-/g,'_')); -} -function stripPath(uri) -{ - return uri.substring(uri.lastIndexOf('/')+1); -} +function initNavTree(toroot,relpath) { + let navTreeSubIndices = []; + const ARROW_DOWN = '▼'; + const ARROW_RIGHT = '►'; + const NAVPATH_COOKIE_NAME = ''+'navpath'; -function stripPath2(uri) -{ - var i = uri.lastIndexOf('/'); - var s = uri.substring(i+1); - var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); - return m ? uri.substring(i-6) : s; -} + const getData = function(varName) { + const i = varName.lastIndexOf('/'); + const n = i>=0 ? varName.substring(i+1) : varName; + return eval(n.replace(/-/g,'_')); + } -function hashValue() -{ - return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,''); -} + const stripPath = function(uri) { + return uri.substring(uri.lastIndexOf('/')+1); + } -function hashUrl() -{ - return '#'+hashValue(); -} + const stripPath2 = function(uri) { + const i = uri.lastIndexOf('/'); + const s = uri.substring(i+1); + const m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); + return m ? uri.substring(i-6) : s; + } -function pathName() -{ - return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, ''); -} + const hashValue = function() { + return $(location).attr('hash').substring(1).replace(/[^\w-]/g,''); + } -function localStorageSupported() -{ - try { - return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; + const hashUrl = function() { + return '#'+hashValue(); } - catch(e) { - return false; + + const pathName = function() { + return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;()]/g, ''); } -} -function storeLink(link) -{ - if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { - window.localStorage.setItem('navpath',link); + const storeLink = function(link) { + if (!$("#nav-sync").hasClass('sync')) { + Cookie.writeSetting(NAVPATH_COOKIE_NAME,link,0); + } } -} -function deleteLink() -{ - if (localStorageSupported()) { - window.localStorage.setItem('navpath',''); + const deleteLink = function() { + Cookie.eraseSetting(NAVPATH_COOKIE_NAME); } -} -function cachedLink() -{ - if (localStorageSupported()) { - return window.localStorage.getItem('navpath'); - } else { - return ''; + const cachedLink = function() { + return Cookie.readSetting(NAVPATH_COOKIE_NAME,''); } -} -function getScript(scriptName,func) -{ - var head = document.getElementsByTagName("head")[0]; - var script = document.createElement('script'); - script.id = scriptName; - script.type = 'text/javascript'; - script.onload = func; - script.src = scriptName+'.js'; - head.appendChild(script); -} + const getScript = function(scriptName,func) { + const head = document.getElementsByTagName("head")[0]; + const script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + head.appendChild(script); + } -function createIndent(o,domNode,node,level) -{ - var level=-1; - var n = node; - while (n.parentNode) { level++; n=n.parentNode; } - if (node.childrenData) { - var imgNode = document.createElement("span"); - imgNode.className = 'arrow'; - imgNode.style.paddingLeft=(16*level).toString()+'px'; - imgNode.innerHTML=arrowRight; - node.plus_img = imgNode; - node.expandToggle = document.createElement("a"); - node.expandToggle.href = "javascript:void(0)"; - node.expandToggle.onclick = function() { - if (node.expanded) { - $(node.getChildrenUL()).slideUp("fast"); - node.plus_img.innerHTML=arrowRight; - node.expanded = false; - } else { - expandNode(o, node, false, true); + const createIndent = function(o,domNode,node) { + let level=-1; + let n = node; + while (n.parentNode) { level++; n=n.parentNode; } + if (node.childrenData) { + const imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=ARROW_RIGHT; + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=ARROW_RIGHT; + node.expanded = false; + } else { + expandNode(o, node, false, true); + } } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } else { + let span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); } - node.expandToggle.appendChild(imgNode); - domNode.appendChild(node.expandToggle); - } else { - var span = document.createElement("span"); - span.className = 'arrow'; - span.style.width = 16*(level+1)+'px'; - span.innerHTML = ' '; - domNode.appendChild(span); - } -} - -var animationInProgress = false; - -function gotoAnchor(anchor,aname,updateLocation) -{ - var pos, docContent = $('#doc-content'); - var ancParent = $(anchor.parent()); - if (ancParent.hasClass('memItemLeft') || - ancParent.hasClass('memtitle') || - ancParent.hasClass('fieldname') || - ancParent.hasClass('fieldtype') || - ancParent.is(':header')) - { - pos = ancParent.position().top; - } else if (anchor.position()) { - pos = anchor.position().top; } - if (pos) { - var dist = Math.abs(Math.min( - pos-docContent.offset().top, - docContent[0].scrollHeight- - docContent.height()-docContent.scrollTop())); - animationInProgress=true; - docContent.animate({ - scrollTop: pos + docContent.scrollTop() - docContent.offset().top - },Math.max(50,Math.min(500,dist)),function(){ - if (updateLocation) window.location.href=aname; - animationInProgress=false; - }); - } -} -function newNode(o, po, text, link, childrenData, lastNode) -{ - var node = new Object(); - node.children = Array(); - node.childrenData = childrenData; - node.depth = po.depth + 1; - node.relpath = po.relpath; - node.isLast = lastNode; - - node.li = document.createElement("li"); - po.getChildrenUL().appendChild(node.li); - node.parentNode = po; - - node.itemDiv = document.createElement("div"); - node.itemDiv.className = "item"; - - node.labelSpan = document.createElement("span"); - node.labelSpan.className = "label"; - - createIndent(o,node.itemDiv,node,0); - node.itemDiv.appendChild(node.labelSpan); - node.li.appendChild(node.itemDiv); - - var a = document.createElement("a"); - node.labelSpan.appendChild(a); - node.label = document.createTextNode(text); - node.expanded = false; - a.appendChild(node.label); - if (link) { - var url; - if (link.substring(0,1)=='^') { - url = link.substring(1); - link = url; - } else { - url = node.relpath+link; + let animationInProgress = false; + + const gotoAnchor = function(anchor,aname) { + let pos, docContent = $('#doc-content'); + let ancParent = $(anchor.parent()); + if (ancParent.hasClass('memItemLeft') || ancParent.hasClass('memtitle') || + ancParent.hasClass('fieldname') || ancParent.hasClass('fieldtype') || + ancParent.is(':header')) { + pos = ancParent.position().top; + } else if (anchor.position()) { + pos = anchor.position().top; } - a.className = stripPath(link.replace('#',':')); - if (link.indexOf('#')!=-1) { - var aname = '#'+link.split('#')[1]; - var srcPage = stripPath(pathName()); - var targetPage = stripPath(link.split('#')[0]); - a.href = srcPage!=targetPage ? url : "javascript:void(0)"; - a.onclick = function(){ - storeLink(link); - if (!$(a).parent().parent().hasClass('selected')) - { - $('.item').removeClass('selected'); - $('.item').removeAttr('id'); - $(a).parent().parent().addClass('selected'); - $(a).parent().parent().attr('id','selected'); + if (pos) { + const dcOffset = docContent.offset().top; + const dcHeight = docContent.height(); + const dcScrHeight = docContent[0].scrollHeight + const dcScrTop = docContent.scrollTop(); + let dist = Math.abs(Math.min(pos-dcOffset,dcScrHeight-dcHeight-dcScrTop)); + animationInProgress = true; + docContent.animate({ + scrollTop: pos + dcScrTop - dcOffset + },Math.max(50,Math.min(500,dist)),function() { + animationInProgress=false; + if (anchor.parent().attr('class')=='memItemLeft') { + let rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parent().attr('class')=='fieldname') { + glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parent().attr('class')=='fieldtype') { + glowEffect(anchor.parent().parent(),1000); // struct field + } else if (anchor.parent().is(":header")) { + glowEffect(anchor.parent(),1000); // section header + } else { + glowEffect(anchor.next(),1000); // normal member } - var anchor = $(aname); - gotoAnchor(anchor,aname,true); - }; - } else { - a.href = url; - a.onclick = function() { storeLink(link); } + }); } - } else { - if (childrenData != null) - { + } + + const newNode = function(o, po, text, link, childrenData, lastNode) { + const node = { + children : [], + childrenData : childrenData, + depth : po.depth + 1, + relpath : po.relpath, + isLast : lastNode, + li : document.createElement("li"), + parentNode : po, + itemDiv : document.createElement("div"), + labelSpan : document.createElement("span"), + label : document.createTextNode(text), + expanded : false, + childrenUL : null, + getChildrenUL : function() { + if (!this.childrenUL) { + this.childrenUL = document.createElement("ul"); + this.childrenUL.className = "children_ul"; + this.childrenUL.style.display = "none"; + this.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }, + }; + + node.itemDiv.className = "item"; + node.labelSpan.className = "label"; + createIndent(o,node.itemDiv,node); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + const a = document.createElement("a"); + node.labelSpan.appendChild(a); + po.getChildrenUL().appendChild(node.li); + a.appendChild(node.label); + if (link) { + let url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + link = url; + } else { + url = node.relpath+link; + } + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) { + const aname = '#'+link.split('#')[1]; + const srcPage = stripPath(pathName()); + const targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? url : aname; + a.onclick = function() { + storeLink(link); + aPPar = $(a).parent().parent(); + if (!aPPar.hasClass('selected')) { + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + aPPar.addClass('selected'); + aPPar.attr('id','selected'); + } + const anchor = $(aname); + gotoAnchor(anchor,aname); + }; + } else { + a.href = url; + a.onclick = () => storeLink(link); + } + } else if (childrenData != null) { a.className = "nolink"; a.href = "javascript:void(0)"; a.onclick = node.expandToggle.onclick; } + return node; } - node.childrenUL = null; - node.getChildrenUL = function() { - if (!node.childrenUL) { - node.childrenUL = document.createElement("ul"); - node.childrenUL.className = "children_ul"; - node.childrenUL.style.display = "none"; - node.li.appendChild(node.childrenUL); - } - return node.childrenUL; - }; - - return node; -} - -function showRoot() -{ - var headerHeight = $("#top").height(); - var footerHeight = $("#nav-path").height(); - var windowHeight = $(window).height() - headerHeight - footerHeight; - (function (){ // retry until we can scroll to the selected item - try { - var navtree=$('#nav-tree'); - navtree.scrollTo('#selected',100,{offset:-windowHeight/2}); - } catch (err) { - setTimeout(arguments.callee, 0); - } - })(); -} - -function expandNode(o, node, imm, setFocus) -{ - if (node.childrenData && !node.expanded) { - if (typeof(node.childrenData)==='string') { - var varName = node.childrenData; - getScript(node.relpath+varName,function(){ - node.childrenData = getData(varName); - expandNode(o, node, imm, setFocus); - }); - } else { - if (!node.childrenVisited) { - getNode(o, node); + const showRoot = function() { + const headerHeight = $("#top").height(); + const footerHeight = $("#nav-path").height(); + const windowHeight = $(window).height() - headerHeight - footerHeight; + (function() { // retry until we can scroll to the selected item + try { + const navtree=$('#nav-tree'); + navtree.scrollTo('#selected',100,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); } - $(node.getChildrenUL()).slideDown("fast"); - node.plus_img.innerHTML = arrowDown; - node.expanded = true; - if (setFocus) { - $(node.expandToggle).focus(); + })(); + } + + const expandNode = function(o, node, imm, setFocus) { + if (node.childrenData && !node.expanded) { + if (typeof(node.childrenData)==='string') { + const varName = node.childrenData; + getScript(node.relpath+varName,function() { + node.childrenData = getData(varName); + expandNode(o, node, imm, setFocus); + }); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).slideDown("fast"); + node.plus_img.innerHTML = ARROW_DOWN; + node.expanded = true; + if (setFocus) { + $(node.expandToggle).focus(); + } } } } -} -function glowEffect(n,duration) -{ - n.addClass('glow').delay(duration).queue(function(next){ - $(this).removeClass('glow');next(); - }); -} - -function highlightAnchor() -{ - var aname = hashUrl(); - var anchor = $(aname); - if (anchor.parent().attr('class')=='memItemLeft'){ - var rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); - glowEffect(rows.children(),300); // member without details - } else if (anchor.parent().attr('class')=='fieldname'){ - glowEffect(anchor.parent().parent(),1000); // enum value - } else if (anchor.parent().attr('class')=='fieldtype'){ - glowEffect(anchor.parent().parent(),1000); // struct field - } else if (anchor.parent().is(":header")) { - glowEffect(anchor.parent(),1000); // section header - } else { - glowEffect(anchor.next(),1000); // normal member + const glowEffect = function(n,duration) { + n.addClass('glow').delay(duration).queue(function(next) { + $(this).removeClass('glow');next(); + }); } -} -function selectAndHighlight(hash,n) -{ - var a; - if (hash) { - var link=stripPath(pathName())+':'+hash.substring(1); - a=$('.item a[class$="'+link+'"]'); + const highlightAnchor = function() { + const aname = hashUrl(); + const anchor = $(aname); + gotoAnchor(anchor,aname); } - if (a && a.length) { - a.parent().parent().addClass('selected'); - a.parent().parent().attr('id','selected'); - highlightAnchor(); - } else if (n) { - $(n.itemDiv).addClass('selected'); - $(n.itemDiv).attr('id','selected'); - } - var topOffset=5; - if (typeof page_layout!=='undefined' && page_layout==1) { - topOffset+=$('#top').outerHeight(); - } - if ($('#nav-tree-contents .item:first').hasClass('selected')) { - topOffset+=25; + + const selectAndHighlight = function(hash,n) { + let a; + if (hash) { + const link=stripPath(pathName())+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + let topOffset=5; + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + topOffset+=25; + } + $('#nav-sync').css('top',topOffset+'px'); + showRoot(); } - $('#nav-sync').css('top',topOffset+'px'); - showRoot(); -} -function showNode(o, node, index, hash) -{ - if (node && node.childrenData) { - if (typeof(node.childrenData)==='string') { - var varName = node.childrenData; - getScript(node.relpath+varName,function(){ - node.childrenData = getData(varName); - showNode(o,node,index,hash); - }); - } else { - if (!node.childrenVisited) { - getNode(o, node); - } - $(node.getChildrenUL()).css({'display':'block'}); - node.plus_img.innerHTML = arrowDown; - node.expanded = true; - var n = node.children[o.breadcrumbs[index]]; - if (index+11) hash = '#'+parts[1].replace(/[^\w\-]/g,''); - else hash=''; + const getNode = function(o, po) { + const insertFunction = removeToInsertLater(po.li); + po.childrenVisited = true; + const l = po.childrenData.length-1; + for (let i in po.childrenData) { + const nodeData = po.childrenData[i]; + po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2], i==l); + } + insertFunction(); } - if (hash.match(/^#l\d+$/)) { - var anchor=$('a[name='+hash.substring(1)+']'); - glowEffect(anchor.parent(),1000); // line number - hash=''; // strip line number anchors + + const gotoNode = function(o,subIndex,root,hash,relpath) { + const nti = navTreeSubIndices[subIndex][root+hash]; + o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]); + if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index + navTo(o,NAVTREE[0][1],"",relpath); + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + } + if (o.breadcrumbs) { + o.breadcrumbs.unshift(0); // add 0 for root node + showNode(o, o.node, 0, hash); + } } - var url=root+hash; - var i=-1; - while (NAVTREEINDEX[i+1]<=url) i++; - if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index - if (navTreeSubIndices[i]) { - gotoNode(o,i,root,hash,relpath) - } else { - getScript(relpath+'navtreeindex'+i,function(){ - navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); - if (navTreeSubIndices[i]) { - gotoNode(o,i,root,hash,relpath); - } - }); + + const navTo = function(o,root,hash,relpath) { + const link = cachedLink(); + if (link) { + const parts = link.split('#'); + root = parts[0]; + hash = parts.length>1 ? '#'+parts[1].replace(/[^\w-]/g,'') : ''; + } + if (hash.match(/^#l\d+$/)) { + const anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number + hash=''; // strip line number anchors + } + const url=root+hash; + let i=-1; + while (NAVTREEINDEX[i+1]<=url) i++; + if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath) + } else { + getScript(relpath+'navtreeindex'+i,function() { + navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath); + } + }); + } } -} -function showSyncOff(n,relpath) -{ + const showSyncOff = function(n,relpath) { n.html(''); -} + } -function showSyncOn(n,relpath) -{ + const showSyncOn = function(n,relpath) { n.html(''); -} + } -function toggleSyncButton(relpath) -{ - var navSync = $('#nav-sync'); - if (navSync.hasClass('sync')) { - navSync.removeClass('sync'); + const o = { + toroot : toroot, + node : { + childrenData : NAVTREE, + children : [], + childrenUL : document.createElement("ul"), + getChildrenUL : function() { return this.childrenUL }, + li : document.getElementById("nav-tree-contents"), + depth : 0, + relpath : relpath, + expanded : false, + isLast : true, + plus_img : document.createElement("span"), + }, + }; + o.node.li.appendChild(o.node.childrenUL); + o.node.plus_img.className = 'arrow'; + o.node.plus_img.innerHTML = ARROW_RIGHT; + + const navSync = $('#nav-sync'); + if (cachedLink()) { showSyncOff(navSync,relpath); - storeLink(stripPath2(pathName())+hashUrl()); + navSync.removeClass('sync'); } else { - navSync.addClass('sync'); showSyncOn(navSync,relpath); - deleteLink(); } -} - -var loadTriggered = false; -var readyTriggered = false; -var loadObject,loadToRoot,loadUrl,loadRelPath; -$(window).on('load',function(){ - if (readyTriggered) { // ready first - navTo(loadObject,loadToRoot,loadUrl,loadRelPath); - showRoot(); - } - loadTriggered=true; -}); - -function initNavTree(toroot,relpath) -{ - var o = new Object(); - o.toroot = toroot; - o.node = new Object(); - o.node.li = document.getElementById("nav-tree-contents"); - o.node.childrenData = NAVTREE; - o.node.children = new Array(); - o.node.childrenUL = document.createElement("ul"); - o.node.getChildrenUL = function() { return o.node.childrenUL; }; - o.node.li.appendChild(o.node.childrenUL); - o.node.depth = 0; - o.node.relpath = relpath; - o.node.expanded = false; - o.node.isLast = true; - o.node.plus_img = document.createElement("span"); - o.node.plus_img.className = 'arrow'; - o.node.plus_img.innerHTML = arrowRight; - - if (localStorageSupported()) { - var navSync = $('#nav-sync'); - if (cachedLink()) { - showSyncOff(navSync,relpath); + navSync.click(() => { + const navSync = $('#nav-sync'); + if (navSync.hasClass('sync')) { navSync.removeClass('sync'); + showSyncOff(navSync,relpath); + storeLink(stripPath2(pathName())+hashUrl()); } else { + navSync.addClass('sync'); showSyncOn(navSync,relpath); + deleteLink(); } - navSync.click(function(){ toggleSyncButton(relpath); }); - } + }); - if (loadTriggered) { // load before ready - navTo(o,toroot,hashUrl(),relpath); - showRoot(); - } else { // ready before load - loadObject = o; - loadToRoot = toroot; - loadUrl = hashUrl(); - loadRelPath = relpath; - readyTriggered=true; - } + navTo(o,toroot,hashUrl(),relpath); + showRoot(); - $(window).bind('hashchange', function(){ - if (window.location.hash && window.location.hash.length>1){ - var a; - if ($(location).attr('hash')){ - var clslink=stripPath(pathName())+':'+hashValue(); - a=$('.item a[class$="'+clslink.replace(/ { + if (!animationInProgress) { + if (window.location.hash && window.location.hash.length>1) { + let a; + if ($(location).attr('hash')) { + const clslink=stripPath(pathName())+':'+hashValue(); + a=$('.item a[class$="'+clslink.replace(/0) { newWidth=0; - } - else { - var width = readSetting('width'); + } else { + const width = Cookie.readSetting(RESIZE_COOKIE_NAME,250); newWidth = (width>250 && width<$(window).width()) ? width : 250; } restoreWidth(newWidth); - var sidenavWidth = $(sidenav).outerWidth(); - writeSetting('width',sidenavWidth-barWidth); + const sidenavWidth = $(sidenav).outerWidth(); + Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth); } header = $("#top"); - sidenav = $("#side-nav"); content = $("#doc-content"); - navtree = $("#nav-tree"); footer = $("#nav-path"); - $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); - $(sidenav).resizable({ minWidth: 0 }); - $(window).resize(function() { resizeHeight(); }); - var device = navigator.userAgent.toLowerCase(); - var touch_device = device.match(/(iphone|ipod|ipad|android)/); - if (touch_device) { /* wider split bar for touch only devices */ - $(sidenav).css({ paddingRight:'20px' }); - $('.ui-resizable-e').css({ width:'20px' }); - $('#nav-sync').css({ right:'34px' }); - barWidth=20; + sidenav = $("#side-nav"); + if (!treeview) { +// title = $("#titlearea"); +// titleH = $(title).height(); +// let animating = false; +// content.on("scroll", function() { +// slideOpts = { duration: 200, +// step: function() { +// contentHeight = $(window).height() - header.outerHeight(); +// content.css({ height : contentHeight + "px" }); +// }, +// done: function() { animating=false; } +// }; +// if (content.scrollTop()>titleH && title.css('display')!='none' && !animating) { +// title.slideUp(slideOpts); +// animating=true; +// } else if (content.scrollTop()<=titleH && title.css('display')=='none' && !animating) { +// title.slideDown(slideOpts); +// animating=true; +// } +// }); + } else { + navtree = $("#nav-tree"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(sidenav).resizable({ minWidth: 0 }); + } + $(window).resize(function() { resizeHeight(treeview); }); + if (treeview) + { + const device = navigator.userAgent.toLowerCase(); + const touch_device = device.match(/(iphone|ipod|ipad|android)/); + if (touch_device) { /* wider split bar for touch only devices */ + $(sidenav).css({ paddingRight:'20px' }); + $('.ui-resizable-e').css({ width:'20px' }); + $('#nav-sync').css({ right:'34px' }); + barWidth=20; + } + const width = Cookie.readSetting(RESIZE_COOKIE_NAME,250); + if (width) { restoreWidth(width); } else { resizeWidth(); } } - var width = readSetting('width'); - if (width) { restoreWidth(width); } else { resizeWidth(); } - resizeHeight(); - var url = location.href; - var i=url.indexOf("#"); + resizeHeight(treeview); + const url = location.href; + const i=url.indexOf("#"); if (i>=0) window.location.hash=url.substr(i); - var _preventDefault = function(evt) { evt.preventDefault(); }; - $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); - if (once) { + const _preventDefault = function(evt) { evt.preventDefault(); }; + if (treeview) + { + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); $(".ui-resizable-handle").dblclick(collapseExpand); - once=0 } $(window).on('load',resizeHeight); } diff --git a/docs/search/all_0.js b/docs/search/all_0.js old mode 100644 new mode 100755 index 32d3165..ae8c90a --- a/docs/search/all_0.js +++ b/docs/search/all_0.js @@ -2,5 +2,5 @@ var searchData= [ ['add_0',['add',['../classfp_1_1vec3.html#ab7964ed013305de8ec59574cff83fa50',1,'fp::vec3']]], ['and_20such_1',['Globally defined functions constants and such',['../group___globals.html',1,'']]], - ['area_2',['area',['../structfp_1_1_node.html#a740dc7b51916c9ac29674b7c6dae5dbc',1,'fp::Node::area'],['../structfp_1_1_geometry.html#a261444235eb423476167d8185b59cd67',1,'fp::Geometry::area'],['../structfp_1_1_nodes.html#ab863d48ecbce98b85747961bbaae82a9',1,'fp::Nodes::area()']]] + ['area_2',['area',['../structfp_1_1_node.html#a3fd63d6fd0d6750ad4540492c0b47265',1,'fp::Node::area'],['../structfp_1_1_geometry.html#a1f0f7950d80852acf9af7ee9891624b9',1,'fp::Geometry::area']]] ]; diff --git a/docs/search/all_1.js b/docs/search/all_1.js old mode 100644 new mode 100755 index 64ff115..b815f19 --- a/docs/search/all_1.js +++ b/docs/search/all_1.js @@ -1,9 +1,8 @@ var searchData= [ - ['begin_0',['begin',['../structfp_1_1_nodes.html#a9d3d31a706daef6476a29f69903680b2',1,'fp::Nodes::begin()'],['../structfp_1_1_nodes.html#afe2daadebb5cbc9a793542609cde6980',1,'fp::Nodes::begin() const']]], + ['begin_0',['begin',['../structfp_1_1_nodes.html#a9244b582d9d23771c04ef519a4014edf',1,'fp::Nodes::begin()'],['../structfp_1_1_nodes.html#ad2a7c65781572c572990b17c858a1a19',1,'fp::Nodes::begin() const']]], ['bond_5fdonation_5fcutoff_1',['BOND_DONATION_CUTOFF',['../group___globals.html#ga1f3b45f2b89de3c4508d87fca78f2a16',1,'fp']]], - ['bond_5flength_5fflip_5frejection_5fcount_2',['bond_length_flip_rejection_count',['../classfp_1_1_monte_carlo_updater.html#a43985749fca7d36119d07c163de7f792',1,'fp::MonteCarloUpdater']]], - ['bond_5flength_5fmove_5frejection_5fcount_3',['bond_length_move_rejection_count',['../classfp_1_1_monte_carlo_updater.html#aedba837fd1d1336a03900b0cbf771cd8',1,'fp::MonteCarloUpdater']]], - ['bondflipdata_4',['BondFlipData',['../structfp_1_1_bond_flip_data.html',1,'fp']]], - ['boundary_5fnodes_5fids_5fset_5',['boundary_nodes_ids_set',['../classfp_1_1_triangulation.html#a699133c53fc98a6f3ec463bf1567dec6',1,'fp::Triangulation']]] + ['bond_5flength_5fflip_5frejection_5fcount_2',['bond_length_flip_rejection_count',['../classfp_1_1_monte_carlo_updater.html#a5afffea0be3f3e90d2e1a7fce7b6444e',1,'fp::MonteCarloUpdater']]], + ['bond_5flength_5fmove_5frejection_5fcount_3',['bond_length_move_rejection_count',['../classfp_1_1_monte_carlo_updater.html#abfd479d2c1cbee2fedc7bb99975a3630',1,'fp::MonteCarloUpdater']]], + ['bondflipdata_4',['BondFlipData',['../structfp_1_1_bond_flip_data.html',1,'fp']]] ]; diff --git a/docs/search/all_10.js b/docs/search/all_10.js old mode 100644 new mode 100755 index 6941f9e..842f310 --- a/docs/search/all_10.js +++ b/docs/search/all_10.js @@ -1,22 +1,14 @@ var searchData= [ ['scale_0',['scale',['../classfp_1_1vec3.html#ab50f5353d9f81d47a0a5b87efc7ad056',1,'fp::vec3']]], - ['scale_5fnode_5fcoordinates_1',['scale_node_coordinates',['../classfp_1_1_triangulation.html#a692685c96cd6a0cdba72b50adf3fb49b',1,'fp::Triangulation']]], - ['set_5farea_2',['set_area',['../structfp_1_1_nodes.html#ac77577ce16f2b8ff1feceb217c6853e1',1,'fp::Nodes']]], - ['set_5fcurvature_5fvec_3',['set_curvature_vec',['../structfp_1_1_nodes.html#a535f08dde803985251f08b7f02fa043a',1,'fp::Nodes::set_curvature_vec(Index node_id, vec3< Real > &&new_cv)'],['../structfp_1_1_nodes.html#a563539f00c190fb8fd9fedd6a27bc769',1,'fp::Nodes::set_curvature_vec(Index node_id, vec3< Real > const &new_cv)']]], - ['set_5fnn_5fdistance_4',['set_nn_distance',['../structfp_1_1_nodes.html#a7152c3eab97faef371f717aa1f144a5b',1,'fp::Nodes::set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > const &dist)'],['../structfp_1_1_nodes.html#a0019211410eea70cd8a4eecad4498992',1,'fp::Nodes::set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > &&dist)']]], - ['set_5fnn_5fid_5',['set_nn_id',['../structfp_1_1_nodes.html#a14a196ade9731f70eeed6446b32854ca',1,'fp::Nodes']]], - ['set_5fnn_5fids_6',['set_nn_ids',['../structfp_1_1_nodes.html#a8aa1bcb4a83a714a2abeaaae500a949a',1,'fp::Nodes']]], - ['set_5fpos_7',['set_pos',['../structfp_1_1_nodes.html#ad441e229389a483f2184c9f3ef0647f4',1,'fp::Nodes::set_pos(Index node_id, vec3< Real > const &new_pos)'],['../structfp_1_1_nodes.html#ab0d598ecd535f690a99d81dd4e717d1e',1,'fp::Nodes::set_pos(Index node_id, vec3< Real > &&new_pos)']]], - ['set_5funit_5fbending_5fenergy_8',['set_unit_bending_energy',['../structfp_1_1_nodes.html#ae4dcac75731ab83b336c27ded5df8e8d',1,'fp::Nodes']]], - ['set_5fverlet_5fradius_9',['set_verlet_radius',['../classfp_1_1_triangulation.html#a58c6d3d8705bb041d4114e88bfd32b71',1,'fp::Triangulation']]], - ['set_5fvolume_10',['set_volume',['../structfp_1_1_nodes.html#a4431ab5e1cf3dbc768558ae5b9132bef',1,'fp::Nodes']]], - ['size_11',['size',['../classfp_1_1_triangulation.html#a6622782e18f9333c65cfc2403d8a5bfe',1,'fp::Triangulation::size()'],['../classfp_1_1vec3.html#a19f1aaf1e61b599d434aaa89e0e58351',1,'fp::vec3::size()'],['../structfp_1_1_nodes.html#a00b3ff9ae4af9a804478d246a0c8c7a1',1,'fp::Nodes::size()']]], - ['special_20concepts_12',['Special concepts',['../group__my_concepts.html',1,'']]], - ['spherical_5ftriangulation_13',['SPHERICAL_TRIANGULATION',['../group___globals.html#gga6ac3c08b4c402e40a3f270818345078aa4818fa0ff44979ed665568888d681703',1,'fp']]], - ['stlnode_14',['stlNode',['../structfp_1_1implementation_1_1stl_node.html',1,'fp::implementation']]], - ['stlserializer_15',['stlSerializer',['../classfp_1_1implementation_1_1stl_serializer.html',1,'fp::implementation']]], - ['stltriangle_16',['stlTriangle',['../classfp_1_1implementation_1_1stl_triangle.html',1,'fp::implementation']]], - ['subtract_17',['subtract',['../classfp_1_1vec3.html#a61388588fcc141bd691b0c1c25e201a2',1,'fp::vec3']]], - ['such_18',['Globally defined functions constants and such',['../group___globals.html',1,'']]] + ['scale_5fnode_5fcoordinates_1',['scale_node_coordinates',['../classfp_1_1_triangulation.html#aa3c8d5e088c1c876e8031aced9a1493c',1,'fp::Triangulation']]], + ['set_5fnn_5fdistance_2',['set_nn_distance',['../structfp_1_1_nodes.html#a173a6dd148343b6c4ebfa33349c8429d',1,'fp::Nodes::set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > &&dist)'],['../structfp_1_1_nodes.html#aa01e86f1e81e916acbcc63b4248f74a8',1,'fp::Nodes::set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > const &dist)']]], + ['set_5fverlet_5fradius_3',['set_verlet_radius',['../classfp_1_1_triangulation.html#a58c6d3d8705bb041d4114e88bfd32b71',1,'fp::Triangulation']]], + ['size_4',['size',['../structfp_1_1_nodes.html#a6eca1b76638e0a84bbd2bf4a031da3ab',1,'fp::Nodes::size()'],['../classfp_1_1_triangulation.html#a66275f647ea355aa64086353310a7ba9',1,'fp::Triangulation::size()'],['../classfp_1_1vec3.html#a19f1aaf1e61b599d434aaa89e0e58351',1,'fp::vec3::size()']]], + ['special_20concepts_5',['Special concepts',['../group__my_concepts.html',1,'']]], + ['stlnode_6',['stlNode',['../structfp_1_1implementation_1_1stl_node.html',1,'fp::implementation']]], + ['stlserializer_7',['stlSerializer',['../classfp_1_1implementation_1_1stl_serializer.html',1,'fp::implementation']]], + ['stltriangle_8',['stlTriangle',['../classfp_1_1implementation_1_1stl_triangle.html',1,'fp::implementation']]], + ['subtract_9',['subtract',['../classfp_1_1vec3.html#a61388588fcc141bd691b0c1c25e201a2',1,'fp::vec3']]], + ['such_10',['Globally defined functions constants and such',['../group___globals.html',1,'']]] ]; diff --git a/docs/search/all_11.js b/docs/search/all_11.js old mode 100644 new mode 100755 index 4cde09c..1a392da --- a/docs/search/all_11.js +++ b/docs/search/all_11.js @@ -1,9 +1,7 @@ var searchData= [ - ['translate_5fall_5fnodes_0',['translate_all_nodes',['../classfp_1_1_triangulation.html#aaef436fe4758c409b21a135b329edc17',1,'fp::Triangulation']]], - ['triangulation_1',['triangulation',['../classfp_1_1_triangulation.html',1,'fp::Triangulation< Real, Index, triangulation_type >'],['../classfp_1_1_triangulation.html#ab21e803940915dca4750bb5bd86cd659',1,'fp::Triangulation::Triangulation(Json const &nodes_input, Real verlet_radius_inp)'],['../classfp_1_1_triangulation.html#a411d76190690d29b6f7040e8367b95ec',1,'fp::Triangulation::Triangulation(Index n_length, Index n_width, Real length, Real width, Real verlet_radius_inp)'],['../classfp_1_1_triangulation.html#a758e5f3e3f31aeef799219932b639ded',1,'fp::Triangulation::Triangulation(Index n_nodes_iter, Real R_initial_input, Real verlet_radius_inp)']]], + ['translate_5fall_5fnodes_0',['translate_all_nodes',['../classfp_1_1_triangulation.html#a405a8a4488dfb19c2b2145ed19fefb2b',1,'fp::Triangulation']]], + ['triangulation_1',['Triangulation',['../classfp_1_1_triangulation.html',1,'fp::Triangulation'],['../classfp_1_1_triangulation.html#a77fcff4ef9a09cf5c56fc3e654a99752',1,'fp::Triangulation::Triangulation(Json const &nodes_input, Real verlet_radius_inp)'],['../classfp_1_1_triangulation.html#a940c044d7ab56c67434e7ce118212642',1,'fp::Triangulation::Triangulation(Index n_nodes_iter, Real R_initial_input, Real verlet_radius_inp)']]], ['triangulation_2ehpp_2',['Triangulation.hpp',['../_triangulation_8hpp.html',1,'']]], - ['triangulation_3c_20real_2c_20index_2c_20triangulation_5ftype_20_3e_3',['Triangulation< Real, Index, triangulation_type >',['../classfp_1_1_triangulation.html',1,'fp']]], - ['triangulationtype_4',['TriangulationType',['../group___globals.html#ga6ac3c08b4c402e40a3f270818345078a',1,'fp']]], - ['triangulator_2ehpp_5',['Triangulator.hpp',['../_triangulator_8hpp.html',1,'']]] + ['triangulator_2ehpp_3',['Triangulator.hpp',['../_triangulator_8hpp.html',1,'']]] ]; diff --git a/docs/search/all_12.js b/docs/search/all_12.js old mode 100644 new mode 100755 index 43306f1..a95e4db --- a/docs/search/all_12.js +++ b/docs/search/all_12.js @@ -1,10 +1,8 @@ var searchData= [ - ['unflip_5fbond_0',['unflip_bond',['../classfp_1_1_triangulation.html#a5d1ec431a7a0040d7963e4297a80faaa',1,'fp::Triangulation']]], - ['unit_5fbending_5fenergy_1',['unit_bending_energy',['../structfp_1_1_nodes.html#ab65c2e5dd4f3b43b2445b62c400107e9',1,'fp::Nodes::unit_bending_energy()'],['../structfp_1_1_node.html#a65a475a50241308f3dd99313c2760f26',1,'fp::Node::unit_bending_energy'],['../structfp_1_1_geometry.html#a8ae88ad31c5e8ad04e949d508d3023e8',1,'fp::Geometry::unit_bending_energy']]], - ['update_5fboundary_5fnode_5fgeometry_2',['update_boundary_node_geometry',['../classfp_1_1_triangulation.html#a6ad51f097deab1674fce1800d2f2cf31',1,'fp::Triangulation']]], - ['update_5fbulk_5fnode_5fgeometry_3',['update_bulk_node_geometry',['../classfp_1_1_triangulation.html#a5d5763865ac706a2e800ed306d070d68',1,'fp::Triangulation']]], - ['update_5fdiamond_5fgeometry_4',['update_diamond_geometry',['../classfp_1_1_triangulation.html#a762c6430c00d719a8ea5a4a3e89715a8',1,'fp::Triangulation']]], - ['update_5ftwo_5fring_5fgeometry_5',['update_two_ring_geometry',['../classfp_1_1_triangulation.html#a1d7b2a1e57f742d1d401eeb09b057beb',1,'fp::Triangulation']]], - ['utils_2ehpp_6',['utils.hpp',['../utils_8hpp.html',1,'']]] + ['unflip_5fbond_0',['unflip_bond',['../classfp_1_1_triangulation.html#a2b6043010d90086720ac6b2b2e1a9cfa',1,'fp::Triangulation']]], + ['update_5fbulk_5fnode_5fgeometry_1',['update_bulk_node_geometry',['../classfp_1_1_triangulation.html#a3b7b50584514fb20c9922b43cf684a31',1,'fp::Triangulation']]], + ['update_5fdiamond_5fgeometry_2',['update_diamond_geometry',['../classfp_1_1_triangulation.html#af804d75575d1eeb9e02d8c0e97a94004',1,'fp::Triangulation']]], + ['update_5ftwo_5fring_5fgeometry_3',['update_two_ring_geometry',['../classfp_1_1_triangulation.html#ac1d5244fb8525f776d0adad0b9a0f666',1,'fp::Triangulation']]], + ['utils_2ehpp_4',['utils.hpp',['../utils_8hpp.html',1,'']]] ]; diff --git a/docs/search/all_13.js b/docs/search/all_13.js old mode 100644 new mode 100755 index d609522..d447d83 --- a/docs/search/all_13.js +++ b/docs/search/all_13.js @@ -2,7 +2,7 @@ var searchData= [ ['vec3_0',['vec3',['../classfp_1_1vec3.html',1,'fp']]], ['vec3_2ehpp_1',['vec3.hpp',['../vec3_8hpp.html',1,'']]], - ['verlet_5flist_2',['verlet_list',['../structfp_1_1_node.html#aff4450fcb2eb2524fcb0c9025b69bc6a',1,'fp::Node']]], - ['very_5flarge_5fnumber_5f_3',['VERY_LARGE_NUMBER_',['../group___globals.html#ga4fcd71172083b7ac36f8a59485826cc1',1,'Triangulation.hpp']]], - ['volume_4',['volume',['../structfp_1_1_geometry.html#a04eb3d9d41651703001ab4601a1fd353',1,'fp::Geometry::volume'],['../structfp_1_1_nodes.html#a0d791117fddd2490c8223a74de6f9109',1,'fp::Nodes::volume()'],['../structfp_1_1_node.html#ae0618b10496535a019b5a99cdc721dca',1,'fp::Node::volume']]] + ['verlet_5flist_2',['verlet_list',['../structfp_1_1_node.html#a3434eb774e1055993007ce9cf84a12fe',1,'fp::Node']]], + ['very_5flarge_5fnumber_5f_3',['VERY_LARGE_NUMBER_',['../group___globals.html#gaff604346ea6ff1903047ab9714652974',1,'fp']]], + ['volume_4',['volume',['../structfp_1_1_node.html#a0b6933791b51be0c3957c8a356b21732',1,'fp::Node::volume'],['../structfp_1_1_geometry.html#ad2705489aa1d5f77b99b2bbdf522d226',1,'fp::Geometry::volume']]] ]; diff --git a/docs/search/all_14.js b/docs/search/all_14.js old mode 100644 new mode 100755 index 744da45..27905ae --- a/docs/search/all_14.js +++ b/docs/search/all_14.js @@ -1,4 +1,6 @@ var searchData= [ - ['x_0',['x',['../classfp_1_1vec3.html#ae5ce71c3ddb550e4e040950462e5b5d4',1,'fp::vec3']]] + ['x_0',['x',['../classfp_1_1vec3.html#ae5ce71c3ddb550e4e040950462e5b5d4',1,'fp::vec3']]], + ['xyzdatasaver_1',['xyzDataSaver',['../classfp_1_1experimental_1_1xyz_data_saver.html',1,'fp::experimental']]], + ['xyzproperty_2',['xyzProperty',['../structfp_1_1experimental_1_1xyz_property.html',1,'fp::experimental']]] ]; diff --git a/docs/search/all_15.js b/docs/search/all_15.js old mode 100644 new mode 100755 diff --git a/docs/search/all_16.js b/docs/search/all_16.js old mode 100644 new mode 100755 diff --git a/docs/search/all_2.js b/docs/search/all_2.js old mode 100644 new mode 100755 index 097de6e..745edd4 --- a/docs/search/all_2.js +++ b/docs/search/all_2.js @@ -1,12 +1,13 @@ var searchData= [ - ['calculate_5fdiamond_5fgeometry_0',['calculate_diamond_geometry',['../classfp_1_1_triangulation.html#acde5fe59e2fae6494d38f5e957404a70',1,'fp::Triangulation']]], - ['calculate_5fmass_5fcenter_1',['calculate_mass_center',['../classfp_1_1_triangulation.html#af28b60961d8f8404a796b33b4a769c02',1,'fp::Triangulation']]], - ['common_5fnn_5f0_2',['common_nn_0',['../structfp_1_1_bond_flip_data.html#af28b1b0fb90fcd3bf5a0363bf89569a9',1,'fp::BondFlipData']]], - ['common_5fnn_5f1_3',['common_nn_1',['../structfp_1_1_bond_flip_data.html#a5792fe8f43d65f6aba3d0acd22dabf57',1,'fp::BondFlipData']]], + ['calculate_5fdiamond_5fgeometry_0',['calculate_diamond_geometry',['../classfp_1_1_triangulation.html#a21cb71c7c23dd3ab2cbbc9a1e9ea5c90',1,'fp::Triangulation']]], + ['calculate_5fmass_5fcenter_1',['calculate_mass_center',['../classfp_1_1_triangulation.html#a6dc2bfefe6d120c1957bfd68fa475851',1,'fp::Triangulation']]], + ['common_5fnn_5f0_2',['common_nn_0',['../structfp_1_1_bond_flip_data.html#a89ec12c1be800708301b6c7ae187ef24',1,'fp::BondFlipData']]], + ['common_5fnn_5f1_3',['common_nn_1',['../structfp_1_1_bond_flip_data.html#aba21c408f0fc4f84dbe77e6a7d00df11',1,'fp::BondFlipData']]], ['concepts_4',['Special concepts',['../group__my_concepts.html',1,'']]], ['constants_20and_20such_5',['Globally defined functions constants and such',['../group___globals.html',1,'']]], - ['cross_6',['cross',['../classfp_1_1vec3.html#a2522af9d50779abf605b8be03e146a5f',1,'fp::vec3::cross(vec3< Real > const &other) const'],['../classfp_1_1vec3.html#ae64d6fa0ceec87d5a26cac17560f1d7c',1,'fp::vec3::cross(vec3< Real > const &a, vec3< Real > const &b)']]], - ['curvature_5fvec_7',['curvature_vec',['../structfp_1_1_node.html#a2b801251ab545ad8d931d09583920537',1,'fp::Node::curvature_vec'],['../structfp_1_1_nodes.html#aac8eaef6c3fa8679dfafcb4018573233',1,'fp::Nodes::curvature_vec()']]], - ['custom_5fconcepts_2ehpp_8',['custom_concepts.hpp',['../custom__concepts_8hpp.html',1,'']]] + ['cross_6',['cross',['../classfp_1_1vec3.html#ae64d6fa0ceec87d5a26cac17560f1d7c',1,'fp::vec3::cross(vec3< Real > const &a, vec3< Real > const &b)'],['../classfp_1_1vec3.html#a2522af9d50779abf605b8be03e146a5f',1,'fp::vec3::cross(vec3< Real > const &other) const']]], + ['csvglobalssaver_7',['csvGlobalsSaver',['../classfp_1_1experimental_1_1csv_globals_saver.html',1,'fp::experimental']]], + ['curvature_5fvec_8',['curvature_vec',['../structfp_1_1_node.html#a55caf759123a0aaa9637e814254f4a0e',1,'fp::Node']]], + ['custom_5fconcepts_2ehpp_9',['custom_concepts.hpp',['../custom__concepts_8hpp.html',1,'']]] ]; diff --git a/docs/search/all_3.js b/docs/search/all_3.js old mode 100644 new mode 100755 index 5a23753..54cd4b8 --- a/docs/search/all_3.js +++ b/docs/search/all_3.js @@ -1,8 +1,9 @@ var searchData= [ - ['data_0',['data',['../structfp_1_1_nodes.html#af791310b96e308cbf01b4b76143de337',1,'fp::Nodes']]], - ['defined_20functions_20constants_20and_20such_1',['Globally defined functions constants and such',['../group___globals.html',1,'']]], - ['displace_2',['displace',['../structfp_1_1_nodes.html#af206c67619617f5e4d99ea67be94a7d6',1,'fp::Nodes::displace(Index node_id, vec3< Real >const &displacement)'],['../structfp_1_1_nodes.html#a9c703086e73c0a1d2b5ff1d8b482c384',1,'fp::Nodes::displace(Index node_id, vec3< Real > &&displacement)']]], + ['data_0',['data',['../structfp_1_1_nodes.html#a9567e304f667f8863de0b8a18a04cc90',1,'fp::Nodes']]], + ['datasaver_1',['DataSaver',['../classfp_1_1experimental_1_1_data_saver.html',1,'fp::experimental']]], + ['defined_20functions_20constants_20and_20such_2',['Globally defined functions constants and such',['../group___globals.html',1,'']]], ['documentation_20overview_3',['Documentation overview',['../index.html',1,'']]], - ['dot_4',['dot',['../classfp_1_1vec3.html#a3097ff5c62f8bb0da1c5e87fb9384da9',1,'fp::vec3']]] + ['dot_4',['dot',['../classfp_1_1vec3.html#a3097ff5c62f8bb0da1c5e87fb9384da9',1,'fp::vec3']]], + ['dynamicdisplacementupdater_5',['DynamicDisplacementUpdater',['../classfp_1_1_dynamic_displacement_updater.html',1,'fp']]] ]; diff --git a/docs/search/all_4.js b/docs/search/all_4.js old mode 100644 new mode 100755 index 1dd4051..8a7571d --- a/docs/search/all_4.js +++ b/docs/search/all_4.js @@ -1,8 +1,7 @@ var searchData= [ - ['emplace_5fbefore_0',['emplace_before',['../classfp_1_1_triangulation.html#a11ee6051e9db388def8aaed68b1841d4',1,'fp::Triangulation']]], - ['emplace_5fnn_5fid_1',['emplace_nn_id',['../structfp_1_1_node.html#aefc063b2ef6645bfea2e258260a5236a',1,'fp::Node::emplace_nn_id()'],['../structfp_1_1_nodes.html#a53ecc9a931522c8f339dadb2232a528a',1,'fp::Nodes::emplace_nn_id(Index node_id, Index to_emplace_nn_id, Index loc_nn_index)']]], - ['end_2',['end',['../structfp_1_1_nodes.html#ac67b161f99d11ae61df2fe05fa3d46e0',1,'fp::Nodes::end()'],['../structfp_1_1_nodes.html#ad90ef5ea66c12a63a491fe15497e4f6e',1,'fp::Nodes::end() const']]], - ['experimental_5fload_5fsphere_5ffrom_5fstl_3',['experimental_load_sphere_from_stl',['../classfp_1_1_triangulation.html#a62af174bd11d3db03de25587638ffeb4',1,'fp::Triangulation']]], - ['experimental_5fplanar_5ftriangulation_4',['EXPERIMENTAL_PLANAR_TRIANGULATION',['../group___globals.html#gga6ac3c08b4c402e40a3f270818345078aafb3c1a4934975221c03cd6b957b3e089',1,'fp']]] + ['emplace_5fbefore_0',['emplace_before',['../classfp_1_1_triangulation.html#a3ba929020c70e27f53acf961f8e88cb2',1,'fp::Triangulation']]], + ['emplace_5fnn_5fid_1',['emplace_nn_id',['../structfp_1_1_node.html#a7b1707f5056183bcb0b1cdba0f48449a',1,'fp::Node::emplace_nn_id()'],['../structfp_1_1_nodes.html#a30ea8ac2096ede34251f77fbea6be2d2',1,'fp::Nodes::emplace_nn_id(Index node_id, Index to_emplace_nn_id, Index loc_nn_index)']]], + ['end_2',['end',['../structfp_1_1_nodes.html#adfa27f36d1528e84e9b56f4f94f534dd',1,'fp::Nodes::end()'],['../structfp_1_1_nodes.html#a164cd75d798ffa77755f85646df1c1b7',1,'fp::Nodes::end() const']]], + ['experimental_5fload_5fsphere_5ffrom_5fstl_3',['experimental_load_sphere_from_stl',['../classfp_1_1_triangulation.html#a00bb575ea2a3eb3a256e9bb25a885938',1,'fp::Triangulation']]] ]; diff --git a/docs/search/all_5.js b/docs/search/all_5.js old mode 100644 new mode 100755 index 0edc515..b2eae1a --- a/docs/search/all_5.js +++ b/docs/search/all_5.js @@ -1,17 +1,25 @@ var searchData= [ - ['find_5fnns_5floc_5fpointer_0',['find_nns_loc_pointer',['../structfp_1_1_node.html#a5959f64aafa9cd65ff0e5fed21064da3',1,'fp::Node']]], - ['flip_5fattempt_5fcount_1',['flip_attempt_count',['../classfp_1_1_monte_carlo_updater.html#a1b16f05da5a695e7171c415327b6bf49',1,'fp::MonteCarloUpdater']]], - ['flip_5fback_5fcount_2',['flip_back_count',['../classfp_1_1_monte_carlo_updater.html#ad98d8bef250c2b7c533b6694e8e00d2d',1,'fp::MonteCarloUpdater']]], - ['flip_5fbond_3',['flip_bond',['../classfp_1_1_triangulation.html#a6833f13e1fd24b039ca1ad2969b8d267',1,'fp::Triangulation']]], - ['flip_5fbond_5funchecked_4',['flip_bond_unchecked',['../classfp_1_1_triangulation.html#a077d1be6c31f16241e9035c5a0f93652',1,'fp::Triangulation']]], - ['flip_5fmc_5fupdater_5',['flip_mc_updater',['../classfp_1_1_monte_carlo_updater.html#a8de725c1ae28fd44d096ffb82467b598',1,'fp::MonteCarloUpdater::flip_MC_updater(fp::Node< Real, Index > const &node)'],['../classfp_1_1_monte_carlo_updater.html#acf28ad26646a0e87dce57eed5ca5047c',1,'fp::MonteCarloUpdater::flip_MC_updater(fp::Node< Real, Index > const &node, Index id_in_nn_ids)']]], - ['flipped_6',['flipped',['../structfp_1_1_bond_flip_data.html#a7723f26e8083b2d90c3e13e2dde08245',1,'fp::BondFlipData']]], + ['find_5fnns_5floc_5fpointer_0',['find_nns_loc_pointer',['../structfp_1_1_node.html#ac778f9aac2fcab5e74689945bf121553',1,'fp::Node']]], + ['flip_5fattempt_5fcount_1',['flip_attempt_count',['../classfp_1_1_monte_carlo_updater.html#ac02dcce7a2fa253cabe433b579d6cbdb',1,'fp::MonteCarloUpdater']]], + ['flip_5fback_5fcount_2',['flip_back_count',['../classfp_1_1_monte_carlo_updater.html#ad0166b3e6b463f538cbf93969b1ee2ec',1,'fp::MonteCarloUpdater']]], + ['flip_5fbond_3',['flip_bond',['../classfp_1_1_triangulation.html#af9b5579bc1812246b7cf96a5c208d7bc',1,'fp::Triangulation']]], + ['flip_5fbond_5funchecked_4',['flip_bond_unchecked',['../classfp_1_1_triangulation.html#a7f32f7136f2123610cbd3ef798329eb8',1,'fp::Triangulation']]], + ['flip_5fmc_5fupdater_5',['flip_MC_updater',['../classfp_1_1_monte_carlo_updater.html#a1a5484a8ab66cf9106ca48b8993e30d2',1,'fp::MonteCarloUpdater::flip_MC_updater(fp::Node const &node)'],['../classfp_1_1_monte_carlo_updater.html#abab166d4505421306c99986145f0c183',1,'fp::MonteCarloUpdater::flip_MC_updater(fp::Node const &node, Index id_in_nn_ids)']]], + ['flipped_6',['flipped',['../structfp_1_1_bond_flip_data.html#af704e81a0ccea5f53ad4e32b9b0c059f',1,'fp::BondFlipData']]], ['flippy_7',['General nomenclature of flippy',['../index.html#autotoc_md0',1,'']]], ['flippy_2ehpp_8',['flippy.hpp',['../flippy_8hpp.html',1,'']]], ['fp_9',['fp',['../namespacefp.html',1,'']]], - ['fp_3a_3afloating_5fpoint_5fnumber_10',['floating_point_number',['../conceptfp_1_1floating__point__number.html',1,'fp']]], - ['fp_3a_3aimplementation_11',['implementation',['../namespacefp_1_1implementation.html',1,'fp']]], - ['fp_3a_3aindexing_5fnumber_12',['indexing_number',['../conceptfp_1_1indexing__number.html',1,'fp']]], - ['functions_20constants_20and_20such_13',['Globally defined functions constants and such',['../group___globals.html',1,'']]] + ['fp_3a_3acontainer_10',['Container',['../conceptfp_1_1_container.html',1,'fp']]], + ['fp_3a_3afloating_5fpoint_5fnumber_11',['floating_point_number',['../conceptfp_1_1floating__point__number.html',1,'fp']]], + ['fp_3a_3aimplementation_12',['implementation',['../namespacefp_1_1implementation.html',1,'fp']]], + ['fp_3a_3aimplementation_3a_3abeginable_13',['Beginable',['../conceptfp_1_1implementation_1_1_beginable.html',1,'fp::implementation']]], + ['fp_3a_3aimplementation_3a_3abeginandendcopyconstructibleanddestructible_14',['BeginAndEndCopyConstructibleAndDestructible',['../conceptfp_1_1implementation_1_1_begin_and_end_copy_constructible_and_destructible.html',1,'fp::implementation']]], + ['fp_3a_3aimplementation_3a_3abeginderefable_15',['BeginDerefable',['../conceptfp_1_1implementation_1_1_begin_derefable.html',1,'fp::implementation']]], + ['fp_3a_3aimplementation_3a_3abegindereftovoid_16',['BeginDerefToVoid',['../conceptfp_1_1implementation_1_1_begin_deref_to_void.html',1,'fp::implementation']]], + ['fp_3a_3aimplementation_3a_3abeginincrementable_17',['BeginIncrementable',['../conceptfp_1_1implementation_1_1_begin_incrementable.html',1,'fp::implementation']]], + ['fp_3a_3aimplementation_3a_3aendable_18',['Endable',['../conceptfp_1_1implementation_1_1_endable.html',1,'fp::implementation']]], + ['fp_3a_3aimplementation_3a_3aneqablebeginandend_19',['NeqableBeginAndEnd',['../conceptfp_1_1implementation_1_1_neqable_begin_and_end.html',1,'fp::implementation']]], + ['fp_3a_3aindexing_5fnumber_20',['indexing_number',['../conceptfp_1_1indexing__number.html',1,'fp']]], + ['functions_20constants_20and_20such_21',['Globally defined functions constants and such',['../group___globals.html',1,'']]] ]; diff --git a/docs/search/all_6.js b/docs/search/all_6.js old mode 100644 new mode 100755 index ffaedce..594ac55 --- a/docs/search/all_6.js +++ b/docs/search/all_6.js @@ -1,10 +1,9 @@ var searchData= [ ['general_20nomenclature_20of_20flippy_0',['General nomenclature of flippy',['../index.html#autotoc_md0',1,'']]], - ['geometry_1',['geometry',['../structfp_1_1_geometry.html#a6bababab0cc9d995cd9d52dfc87442a0',1,'fp::Geometry::Geometry()'],['../structfp_1_1_geometry.html#a6627a3e6e7ec703d8db7c756464aed8e',1,'fp::Geometry::Geometry(Node< Real, Index > const &node)'],['../structfp_1_1_geometry.html#a2c84ea40f4dec6a64541e9d4aaa9eda3',1,'fp::Geometry::Geometry(Real area_inp, Real volume_inp, Real unit_bending_energy_inp)'],['../structfp_1_1_geometry.html',1,'fp::Geometry< Real, Index >']]], - ['get_5fdistance_5fvector_5fto_2',['get_distance_vector_to',['../structfp_1_1_node.html#aa9bf52cc0dc958fca2868f640cdbcb21',1,'fp::Node']]], - ['get_5fnn_5fdistance_5fvector_5fbetween_3',['get_nn_distance_vector_between',['../structfp_1_1_nodes.html#a8efb079f96664cee5698ccdf9e6bc080',1,'fp::Nodes']]], - ['get_5ftwo_5fring_5fgeometry_4',['get_two_ring_geometry',['../classfp_1_1_triangulation.html#a3c660cb2bec69afe055843975698cfd0',1,'fp::Triangulation']]], - ['global_5fgeometry_5',['global_geometry',['../classfp_1_1_triangulation.html#a9890d90831a7a834e8fffa1c432200d3',1,'fp::Triangulation']]], - ['globally_20defined_20functions_20constants_20and_20such_6',['Globally defined functions constants and such',['../group___globals.html',1,'']]] + ['geometry_1',['Geometry',['../structfp_1_1_geometry.html',1,'fp::Geometry'],['../structfp_1_1_geometry.html#ab34dc017d3d153b9d6dce5cbe85b00a2',1,'fp::Geometry::Geometry()'],['../structfp_1_1_geometry.html#afe19ae70a18f105e616394c979739f89',1,'fp::Geometry::Geometry(Node const &node)'],['../structfp_1_1_geometry.html#afcb524f26e28258ab595cf67969e4f2f',1,'fp::Geometry::Geometry(Real area_inp, Real volume_inp)']]], + ['get_5fdistance_5fvector_5fto_2',['get_distance_vector_to',['../structfp_1_1_node.html#a24393815d94af2ca2b7b0ec76299bfb5',1,'fp::Node']]], + ['get_5ftwo_5fring_5fgeometry_3',['get_two_ring_geometry',['../classfp_1_1_triangulation.html#aa7d571edcee24274dfd464f08d0f187f',1,'fp::Triangulation']]], + ['global_5fgeometry_4',['global_geometry',['../classfp_1_1_triangulation.html#ace0af615b2b663ef785c72f947479bc4',1,'fp::Triangulation']]], + ['globally_20defined_20functions_20constants_20and_20such_5',['Globally defined functions constants and such',['../group___globals.html',1,'']]] ]; diff --git a/docs/search/all_7.js b/docs/search/all_7.js old mode 100644 new mode 100755 index 5f6d6d8..999ba60 --- a/docs/search/all_7.js +++ b/docs/search/all_7.js @@ -1,5 +1,5 @@ var searchData= [ - ['id_0',['id',['../structfp_1_1_node.html#a4743d523ce7d4e1ea613d685af1da9be',1,'fp::Node']]], + ['id_0',['id',['../structfp_1_1_node.html#a6e66f903bd683fe1b4928a968d0093fe',1,'fp::Node']]], ['is_5fmember_1',['is_member',['../group___globals.html#ga42171e60ff447e5c0776969445616702',1,'fp']]] ]; diff --git a/docs/search/all_8.js b/docs/search/all_8.js old mode 100644 new mode 100755 index 5e5cd0d..b97479a --- a/docs/search/all_8.js +++ b/docs/search/all_8.js @@ -1,8 +1,9 @@ var searchData= [ - ['j_5fm_5f1_0',['j_m_1',['../structfp_1_1_neighbors.html#a78c69e6e87ac732d788d662274eeb492',1,'fp::Neighbors']]], - ['j_5fp_5f1_1',['j_p_1',['../structfp_1_1_neighbors.html#a089ec17c7edaa1ed1fad07f703ee8368',1,'fp::Neighbors']]], - ['json_2',['Json',['../group___globals.html#ga0527b166a9415a6e07381ef4e11ed318',1,'fp']]], + ['j_5fm_5f1_0',['j_m_1',['../structfp_1_1_neighbors.html#a2ba3f761243ca71cca19b359c64902cc',1,'fp::Neighbors']]], + ['j_5fp_5f1_1',['j_p_1',['../structfp_1_1_neighbors.html#a85965893be3127eff60cad6d393648d9',1,'fp::Neighbors']]], + ['json_2',['Json',['../group___globals.html#ga7bd3848f67a3e8464cd2db3d7b255c04',1,'fp']]], ['json_5fdump_3',['json_dump',['../group___globals.html#ga200da317c4ff647b237dad1acec6dcd2',1,'fp']]], - ['json_5fread_4',['json_read',['../group___globals.html#gad562f1206f779edba9a0557e41b5a403',1,'fp']]] + ['json_5fread_4',['json_read',['../group___globals.html#gad562f1206f779edba9a0557e41b5a403',1,'fp']]], + ['jsondatasaver_5',['jsonDataSaver',['../classfp_1_1experimental_1_1json_data_saver.html',1,'fp::experimental']]] ]; diff --git a/docs/search/all_9.js b/docs/search/all_9.js old mode 100644 new mode 100755 index cf29c45..1554f5b --- a/docs/search/all_9.js +++ b/docs/search/all_9.js @@ -1,4 +1,4 @@ var searchData= [ - ['kbt_0',['kBT',['../classfp_1_1_monte_carlo_updater.html#a4e3b7ba1838866d8e4968a404deb5c94',1,'fp::MonteCarloUpdater']]] + ['kbt_0',['kBT',['../classfp_1_1_monte_carlo_updater.html#ac130f551ac1590c7f706351e72b40c5f',1,'fp::MonteCarloUpdater']]] ]; diff --git a/docs/search/all_a.js b/docs/search/all_a.js old mode 100644 new mode 100755 diff --git a/docs/search/all_b.js b/docs/search/all_b.js old mode 100644 new mode 100755 index 13e62ee..78c00ef --- a/docs/search/all_b.js +++ b/docs/search/all_b.js @@ -1,17 +1,17 @@ var searchData= [ - ['m_5fpi_0',['M_PI',['../group___globals.html#gae71449b1cc6e6250b91f539153a7a0d3',1,'Triangulator.hpp']]], - ['make_5fdata_1',['make_data',['../structfp_1_1_nodes.html#aa9d0a78ec3fc2f687a3731662619ab44',1,'fp::Nodes']]], - ['make_5fegg_5fdata_2',['make_egg_data',['../classfp_1_1_triangulation.html#aca161d492a4ba155d41000e382a95555',1,'fp::Triangulation']]], - ['make_5fglobal_5fgeometry_3',['make_global_geometry',['../classfp_1_1_triangulation.html#a1afce8afd92f1b88fb15ce7d9cb31edd',1,'fp::Triangulation']]], - ['make_5fverlet_5flist_4',['make_verlet_list',['../classfp_1_1_triangulation.html#a7a4162ec7ad98f342eeae67ee9451b02',1,'fp::Triangulation']]], - ['minus_5fone_5',['minus_one',['../structfp_1_1_neighbors.html#a4fd046f13a1a7c640a2a01e1d0585497',1,'fp::Neighbors']]], - ['mixed_5farea_6',['mixed_area',['../classfp_1_1_triangulation.html#a847fc218cc1807b7027b069a4239c7db',1,'fp::Triangulation::mixed_area(vec3< Real > const &lij, vec3< Real > const &lij_p_1, Real const &triangle_area)'],['../classfp_1_1_triangulation.html#a3e43dfd4b4c9cfd10c5bf4174f2a85d1',1,'fp::Triangulation::mixed_area(vec3< Real > const &lij, vec3< Real > const &lij_p_1, Real triangle_area, Real cot_at_j, Real cot_at_j_p_1)']]], - ['montecarloupdater_7',['montecarloupdater',['../classfp_1_1_monte_carlo_updater.html',1,'fp::MonteCarloUpdater< Real, Index, EnergyFunctionParameters, RandomNumberEngine, triangulation_type >'],['../classfp_1_1_monte_carlo_updater.html#ac3e7246b13537a6c2df34e5334289c80',1,'fp::MonteCarloUpdater::MonteCarloUpdater()']]], + ['make_5fdata_0',['make_data',['../structfp_1_1_nodes.html#a098083d4c3f7ad848fb70837b7ece0f5',1,'fp::Nodes']]], + ['make_5fegg_5fdata_1',['make_egg_data',['../classfp_1_1_triangulation.html#a702095556e9512260ed57535b85c63ac',1,'fp::Triangulation']]], + ['make_5fglobal_5fgeometry_2',['make_global_geometry',['../classfp_1_1_triangulation.html#a05812c9b913aadc99b3bf7a126316467',1,'fp::Triangulation']]], + ['make_5fverlet_5flist_3',['make_verlet_list',['../classfp_1_1_triangulation.html#af67a77a76afa6b91149bdebe6a6a247f',1,'fp::Triangulation']]], + ['min_5fradius_5fwith_5fnon_5foverlapping_5fbeads_4',['min_radius_with_non_overlapping_beads',['../namespacefp.html#a002936af49386985bc3a8c16bcd3f18b',1,'fp']]], + ['minus_5fone_5',['minus_one',['../structfp_1_1_neighbors.html#abd825093ef365d4fe88df97d1ce1789a',1,'fp::Neighbors']]], + ['mixed_5farea_6',['mixed_area',['../classfp_1_1_triangulation.html#add5f9a26549294b8b94c623056a58b0d',1,'fp::Triangulation']]], + ['montecarloupdater_7',['MonteCarloUpdater',['../classfp_1_1_monte_carlo_updater.html',1,'fp::MonteCarloUpdater< EnergyFunctionParameters, RandomNumberEngine >'],['../classfp_1_1_monte_carlo_updater.html#afb5cbe50420e978c618d5ce7f909c588',1,'fp::MonteCarloUpdater::MonteCarloUpdater()']]], ['montecarloupdater_2ehpp_8',['MonteCarloUpdater.hpp',['../_monte_carlo_updater_8hpp.html',1,'']]], - ['move_5fattempt_5fcount_9',['move_attempt_count',['../classfp_1_1_monte_carlo_updater.html#a419e39432ab410ba04dd1ea6fcad38e3',1,'fp::MonteCarloUpdater']]], - ['move_5fback_5fcount_10',['move_back_count',['../classfp_1_1_monte_carlo_updater.html#a0afcfe92c1f0f52affb1572521d88df4',1,'fp::MonteCarloUpdater']]], - ['move_5fmc_5fupdater_11',['move_MC_updater',['../classfp_1_1_monte_carlo_updater.html#ac3e40c3b93bf2bf6f2b08291357503be',1,'fp::MonteCarloUpdater']]], - ['move_5fneeds_5fundoing_12',['move_needs_undoing',['../classfp_1_1_monte_carlo_updater.html#a7e172728bb0764e21ba1e44aa76cce83',1,'fp::MonteCarloUpdater']]], - ['move_5fnode_13',['move_node',['../classfp_1_1_triangulation.html#ad8102adbe7dab80cda3209844a939e30',1,'fp::Triangulation']]] + ['move_5fattempt_5fcount_9',['move_attempt_count',['../classfp_1_1_monte_carlo_updater.html#ab44cc6033ff475b9bce9af27742171e3',1,'fp::MonteCarloUpdater']]], + ['move_5fback_5fcount_10',['move_back_count',['../classfp_1_1_monte_carlo_updater.html#ab1c8fe7f2288a978f95154d2c8c7d746',1,'fp::MonteCarloUpdater']]], + ['move_5fmc_5fupdater_11',['move_MC_updater',['../classfp_1_1_monte_carlo_updater.html#aa8bc9d09da6cb006c077e3c18da174d1',1,'fp::MonteCarloUpdater']]], + ['move_5fneeds_5fundoing_12',['move_needs_undoing',['../classfp_1_1_monte_carlo_updater.html#af4528387b65d1058714b1f6aa0fdb90b',1,'fp::MonteCarloUpdater']]], + ['move_5fnode_13',['move_node',['../classfp_1_1_triangulation.html#a37457b9568e1338750e153471a4b7b59',1,'fp::Triangulation']]] ]; diff --git a/docs/search/all_c.js b/docs/search/all_c.js old mode 100644 new mode 100755 index 04d0270..4b1fad5 --- a/docs/search/all_c.js +++ b/docs/search/all_c.js @@ -1,17 +1,19 @@ var searchData= [ ['neighbors_0',['Neighbors',['../structfp_1_1_neighbors.html',1,'fp']]], - ['new_5fneighbour_5fdistances_5fare_5fbetween_5fmin_5fand_5fmax_5flength_1',['new_neighbour_distances_are_between_min_and_max_length',['../classfp_1_1_monte_carlo_updater.html#ada3c8ad8d719671d9dedecd3ec9bbd2b',1,'fp::MonteCarloUpdater']]], - ['new_5fnext_5fneighbour_5fdistances_5fare_5fbetween_5fmin_5fand_5fmax_5flength_2',['new_next_neighbour_distances_are_between_min_and_max_length',['../classfp_1_1_monte_carlo_updater.html#ad985050d8f094aa3d577df33eac9242d',1,'fp::MonteCarloUpdater']]], - ['new_5fverlet_5fneighbour_5fdistances_5fare_5fbetween_5fmin_5fand_5fmax_5flength_3',['new_verlet_neighbour_distances_are_between_min_and_max_length',['../classfp_1_1_monte_carlo_updater.html#a6a064bcdc7395374ab73913e364f1f81',1,'fp::MonteCarloUpdater']]], - ['nn_5fdistances_4',['nn_distances',['../structfp_1_1_nodes.html#aeaac33789677da84759647308c5f25da',1,'fp::Nodes::nn_distances()'],['../structfp_1_1_node.html#a7d7b5f362addd1bb5249f573b16d0a90',1,'fp::Node::nn_distances']]], - ['nn_5fid_5',['nn_id',['../structfp_1_1_nodes.html#a65c0fd75105d0110c204b2b9c2af5640',1,'fp::Nodes']]], - ['nn_5fids_6',['nn_ids',['../structfp_1_1_node.html#ae2e0c5a97ae4f47cff41a692ac6ce79a',1,'fp::Node::nn_ids'],['../structfp_1_1_nodes.html#aa149044ed9e33aa0560311362cd2c660',1,'fp::Nodes::nn_ids()']]], - ['node_7',['Node',['../structfp_1_1_node.html',1,'fp']]], - ['nodes_8',['nodes',['../structfp_1_1_nodes.html#afcdc1fecf1c86ee26bd4a04e3126dcc8',1,'fp::Nodes::Nodes()'],['../structfp_1_1_nodes.html',1,'fp::Nodes< Real, Index >'],['../classfp_1_1_triangulation.html#aeeb65b7f5974560fc57e20b50cf73b41',1,'fp::Triangulation::nodes()'],['../structfp_1_1_nodes.html#ab29b1bbd7bae02bdda2a0a94581235bb',1,'fp::Nodes::Nodes()=default'],['../structfp_1_1_nodes.html#aeab72aa27fd66417ac8d5d0c9d000be6',1,'fp::Nodes::Nodes(Json const &node_dict)']]], - ['nodes_2ehpp_9',['Nodes.hpp',['../_nodes_8hpp.html',1,'']]], - ['nomenclature_20of_20flippy_10',['General nomenclature of flippy',['../index.html#autotoc_md0',1,'']]], - ['norm_11',['norm',['../classfp_1_1vec3.html#a8568d337f067bd43b63508174f047df2',1,'fp::vec3']]], - ['norm_5fsquare_12',['norm_square',['../classfp_1_1vec3.html#a8f4f85470de85d92876fe2c93ea0f425',1,'fp::vec3']]], - ['normalize_13',['normalize',['../classfp_1_1vec3.html#a3484a50de6cbbadfa7b04d4352410a10',1,'fp::vec3']]] + ['new_5fneighbour_5fdistances_5fare_5fbetween_5fmin_5fand_5fmax_5flength_1',['new_neighbour_distances_are_between_min_and_max_length',['../classfp_1_1_monte_carlo_updater.html#a173b77e5381e7d98ceb77aaa040b29dd',1,'fp::MonteCarloUpdater']]], + ['new_5fnext_5fneighbour_5fdistances_5fare_5fbetween_5fmin_5fand_5fmax_5flength_2',['new_next_neighbour_distances_are_between_min_and_max_length',['../classfp_1_1_monte_carlo_updater.html#adff0b592bb81bdc289bcdbd170b78401',1,'fp::MonteCarloUpdater']]], + ['new_5fverlet_5fneighbour_5fdistances_5fare_5fbetween_5fmin_5fand_5fmax_5flength_3',['new_verlet_neighbour_distances_are_between_min_and_max_length',['../classfp_1_1_monte_carlo_updater.html#aaf82cdb55f4bf12468ca2a744ac81ffe',1,'fp::MonteCarloUpdater']]], + ['nn_5fdistances_4',['nn_distances',['../structfp_1_1_node.html#a460b4bb176f86cdbc78f68c4c36da4fc',1,'fp::Node']]], + ['nn_5fids_5',['nn_ids',['../structfp_1_1_node.html#a983a7a9e7becf335988177147b76b39d',1,'fp::Node']]], + ['node_6',['Node',['../structfp_1_1_node.html',1,'fp']]], + ['node_5fcurvature_5fsquared_7',['node_curvature_squared',['../namespacefp.html#a078adea1b2428bde7781bb5adde2f253',1,'fp']]], + ['node_5funit_5fbending_5fenergy_8',['node_unit_bending_energy',['../namespacefp.html#aa5f7482d07c411db881895fbed9ab72f',1,'fp']]], + ['nodes_9',['Nodes',['../structfp_1_1_nodes.html',1,'fp::Nodes'],['../structfp_1_1_nodes.html#ad937cf2a8083d6ae76a3c87df5039acd',1,'fp::Nodes::Nodes()=default'],['../structfp_1_1_nodes.html#ad4b4a1489e67c8b8a771747ac06ca737',1,'fp::Nodes::Nodes(std::vector< Node > data_inp)'],['../structfp_1_1_nodes.html#ae323a7bf83801c87bf2f025da5298fb2',1,'fp::Nodes::Nodes(Json const &node_dict)']]], + ['nodes_10',['nodes',['../classfp_1_1_triangulation.html#a386d52961986a595f42f286cbcd15b01',1,'fp::Triangulation']]], + ['nodes_2ehpp_11',['Nodes.hpp',['../_nodes_8hpp.html',1,'']]], + ['nomenclature_20of_20flippy_12',['General nomenclature of flippy',['../index.html#autotoc_md0',1,'']]], + ['norm_13',['norm',['../classfp_1_1vec3.html#a8568d337f067bd43b63508174f047df2',1,'fp::vec3']]], + ['norm_5fsquare_14',['norm_square',['../classfp_1_1vec3.html#a8f4f85470de85d92876fe2c93ea0f425',1,'fp::vec3']]], + ['normalize_15',['normalize',['../classfp_1_1vec3.html#a3484a50de6cbbadfa7b04d4352410a10',1,'fp::vec3']]] ]; diff --git a/docs/search/all_d.js b/docs/search/all_d.js old mode 100644 new mode 100755 index 1fffd2f..6986667 --- a/docs/search/all_d.js +++ b/docs/search/all_d.js @@ -1,15 +1,15 @@ var searchData= [ ['of_20flippy_0',['General nomenclature of flippy',['../index.html#autotoc_md0',1,'']]], - ['operator_2a_1',['operator*',['../classfp_1_1vec3.html#a58c98b07b3903857039bbcfcf390b037',1,'fp::vec3::operator*'],['../classfp_1_1vec3.html#aae0a63764676c772cd8ed6c3cc0aef38',1,'fp::vec3::operator*']]], - ['operator_2b_2',['operator+',['../classfp_1_1vec3.html#ad3792f8349787c827e4f5b66b0e62156',1,'fp::vec3::operator+'],['../structfp_1_1_geometry.html#a1ae896003b13c5f110116085a2658471',1,'fp::Geometry::operator+']]], - ['operator_2b_3d_3',['operator+=',['../structfp_1_1_geometry.html#a7d19899dde91a5b7b30635de7b321dd9',1,'fp::Geometry::operator+='],['../structfp_1_1_geometry.html#af64274f242f134f791bb381ce1419753',1,'fp::Geometry::operator+=(Node< Real, Index > const &node)'],['../classfp_1_1vec3.html#a86a997aa250e63ef9b0e106bffab6368',1,'fp::vec3::operator+=']]], - ['operator_2d_4',['operator-',['../structfp_1_1_geometry.html#ad1551fc47c469d47625068d5424a2cef',1,'fp::Geometry::operator-'],['../classfp_1_1vec3.html#ac3763454def892f79476dad1079adb18',1,'fp::vec3::operator-'],['../classfp_1_1vec3.html#adaf7d3b941eeaa8bc1bb3ee5dd865552',1,'fp::vec3::operator-'],['../classfp_1_1vec3.html#a40d3452bbc375c85aedba29afe4697f2',1,'fp::vec3::operator-']]], - ['operator_2d_3d_5',['operator-=',['../structfp_1_1_geometry.html#ad54e751bccf6ae11d4af543ef6a23c23',1,'fp::Geometry::operator-='],['../classfp_1_1vec3.html#ae9b219ccba98f5d12db4f50da6970459',1,'fp::vec3::operator-=']]], + ['operator_2a_1',['operator*',['../classfp_1_1vec3.html#aae0a63764676c772cd8ed6c3cc0aef38',1,'fp::vec3::operator*'],['../classfp_1_1vec3.html#a58c98b07b3903857039bbcfcf390b037',1,'fp::vec3::operator*']]], + ['operator_2b_2',['operator+',['../structfp_1_1_geometry.html#acfea07971d44f8daf22bfc023f49b2a3',1,'fp::Geometry::operator+'],['../classfp_1_1vec3.html#ad3792f8349787c827e4f5b66b0e62156',1,'fp::vec3::operator+']]], + ['operator_2b_3d_3',['operator+=',['../structfp_1_1_geometry.html#ac692b9c2c5ebc614b36fb9771a07e773',1,'fp::Geometry::operator+='],['../structfp_1_1_geometry.html#a1ad7209337ace3bfb8ca54e3c1f74e85',1,'fp::Geometry::operator+=(Node const &node)'],['../classfp_1_1vec3.html#a86a997aa250e63ef9b0e106bffab6368',1,'fp::vec3::operator+=']]], + ['operator_2d_4',['operator-',['../structfp_1_1_geometry.html#a3714cc223f61f406d01becb91cab6ab9',1,'fp::Geometry::operator-'],['../classfp_1_1vec3.html#a40d3452bbc375c85aedba29afe4697f2',1,'fp::vec3::operator-'],['../classfp_1_1vec3.html#ac3763454def892f79476dad1079adb18',1,'fp::vec3::operator-']]], + ['operator_2d_3d_5',['operator-=',['../structfp_1_1_geometry.html#a768de5f3d63132e0be2ad65c3840c8bc',1,'fp::Geometry::operator-='],['../classfp_1_1vec3.html#ae9b219ccba98f5d12db4f50da6970459',1,'fp::vec3::operator-=']]], ['operator_2f_6',['operator/',['../classfp_1_1vec3.html#a8d8ccff0006cc4699a6773e85de7e4cb',1,'fp::vec3']]], ['operator_2f_3d_7',['operator/=',['../classfp_1_1vec3.html#a34315674ec0ce3613c42ca5c9ec82c6f',1,'fp::vec3']]], - ['operator_3c_3c_8',['operator<<',['../classfp_1_1vec3.html#ac70e0b9511e58cb1dc2b0e327aacf70d',1,'fp::vec3::operator<<'],['../structfp_1_1_node.html#ac8b3254d4da11f9069ce0cbc28aa0288',1,'fp::Node::operator<<']]], - ['operator_3d_3d_9',['operator==',['../structfp_1_1_node.html#a8bc7daf80f3048d114e9adfe442c5069',1,'fp::Node::operator==()'],['../classfp_1_1vec3.html#aa367e797c70bc3efd3808c492b42a7cf',1,'fp::vec3::operator==()']]], - ['operator_5b_5d_10',['operator[]',['../structfp_1_1_nodes.html#a093e30bf91fecce01cb2a963cdad6415',1,'fp::Nodes::operator[]()'],['../classfp_1_1_triangulation.html#a49a847019900dc667e873d9510ff402a',1,'fp::Triangulation::operator[]()'],['../classfp_1_1vec3.html#adc1be1017b046b97972b4f4ead8f5323',1,'fp::vec3::operator[](Index idx)'],['../classfp_1_1vec3.html#a7e38014f26c1b1cb52089f55f84563b3',1,'fp::vec3::operator[](Index idx) const'],['../structfp_1_1_nodes.html#abfaa815fd0dacc7d85fd75a011fbebdc',1,'fp::Nodes::operator[]()']]], + ['operator_3c_3c_8',['operator<<',['../structfp_1_1_node.html#ad876a0744710232bd15fa8a1365ed8c8',1,'fp::Node::operator<<'],['../classfp_1_1vec3.html#ac70e0b9511e58cb1dc2b0e327aacf70d',1,'fp::vec3::operator<<']]], + ['operator_3d_3d_9',['operator==',['../structfp_1_1_node.html#ae8fa3d1e0aacf408add48f82dec6b9d5',1,'fp::Node::operator==()'],['../classfp_1_1vec3.html#aa367e797c70bc3efd3808c492b42a7cf',1,'fp::vec3::operator==()']]], + ['operator_5b_5d_10',['operator[]',['../structfp_1_1_nodes.html#a0edc1acce52483313a3356e5d42c4f5c',1,'fp::Nodes::operator[](Index node_id)'],['../structfp_1_1_nodes.html#ae967626cf335321bd0a370d2064b79fd',1,'fp::Nodes::operator[](Index node_id) const'],['../classfp_1_1_triangulation.html#a684520ed10082be92bd0c8c5ae326724',1,'fp::Triangulation::operator[]()'],['../classfp_1_1vec3.html#adc1be1017b046b97972b4f4ead8f5323',1,'fp::vec3::operator[](Index idx)'],['../classfp_1_1vec3.html#a7e38014f26c1b1cb52089f55f84563b3',1,'fp::vec3::operator[](Index idx) const']]], ['overview_11',['Documentation overview',['../index.html',1,'']]] ]; diff --git a/docs/search/all_e.js b/docs/search/all_e.js old mode 100644 new mode 100755 index ac4ce0c..7fad5cf --- a/docs/search/all_e.js +++ b/docs/search/all_e.js @@ -1,7 +1,7 @@ var searchData= [ - ['partial_5fvoronoi_5farea_5fand_5fface_5fnormal_5fof_5fnode_5fin_5fa_5ftriangle_0',['partial_voronoi_area_and_face_normal_of_node_in_a_triangle',['../classfp_1_1_triangulation.html#a75e93af077cc8434bb76a1a4a39f3adf',1,'fp::Triangulation']]], - ['plus_5fone_1',['plus_one',['../structfp_1_1_neighbors.html#a59501864ac7f34bd676aa97d9faf68cc',1,'fp::Neighbors']]], - ['pop_5fnn_2',['pop_nn',['../structfp_1_1_node.html#acf3d0a7d0c7425beb820fb453c240ed3',1,'fp::Node']]], - ['pos_3',['pos',['../structfp_1_1_node.html#a10be91bc755ce112845d1f0a0b96c976',1,'fp::Node::pos'],['../structfp_1_1_nodes.html#a44304df70878d39c9c55ce6cba0cec3d',1,'fp::Nodes::pos()']]] + ['plus_5fone_0',['plus_one',['../structfp_1_1_neighbors.html#aa5cd15f625ae3e2e92e5361f1c8d20bd',1,'fp::Neighbors']]], + ['pop_5fnn_1',['pop_nn',['../structfp_1_1_node.html#a6d19f21c3303cd9a02b935bf5a0a4f5e',1,'fp::Node']]], + ['pos_2',['pos',['../structfp_1_1_node.html#a0b35271880573fd9c47f93f8bfb7f6f2',1,'fp::Node']]], + ['previous_5fand_5fnext_5fneighbour_5fglobal_5fids_3',['previous_and_next_neighbour_global_ids',['../classfp_1_1_triangulation.html#ac9a4311a2afb3a41d08bf1216e0c52eb',1,'fp::Triangulation']]] ]; diff --git a/docs/search/all_f.js b/docs/search/all_f.js old mode 100644 new mode 100755 index 892694a..a0d8f3d --- a/docs/search/all_f.js +++ b/docs/search/all_f.js @@ -2,5 +2,5 @@ var searchData= [ ['rawstlsolid_0',['rawSTLSolid',['../structfp_1_1implementation_1_1raw_s_t_l_solid.html',1,'fp::implementation']]], ['rawstltriangle_1',['rawSTLTriangle',['../structfp_1_1implementation_1_1raw_s_t_l_triangle.html',1,'fp::implementation']]], - ['reset_5fkbt_2',['reset_kBT',['../classfp_1_1_monte_carlo_updater.html#a919b68a956bf4875eecab53dbc950a57',1,'fp::MonteCarloUpdater']]] + ['reset_5fkbt_2',['reset_kBT',['../classfp_1_1_monte_carlo_updater.html#a73273eb46dc52825fb2a7eed413de565',1,'fp::MonteCarloUpdater']]] ]; diff --git a/docs/search/classes_0.js b/docs/search/classes_0.js old mode 100644 new mode 100755 diff --git a/docs/search/classes_1.js b/docs/search/classes_1.js old mode 100644 new mode 100755 index 5febbac..3bb997f --- a/docs/search/classes_1.js +++ b/docs/search/classes_1.js @@ -1,4 +1,4 @@ var searchData= [ - ['geometry_0',['Geometry',['../structfp_1_1_geometry.html',1,'fp']]] + ['csvglobalssaver_0',['csvGlobalsSaver',['../classfp_1_1experimental_1_1csv_globals_saver.html',1,'fp::experimental']]] ]; diff --git a/docs/search/classes_2.js b/docs/search/classes_2.js old mode 100644 new mode 100755 index ea92ea4..fffa17e --- a/docs/search/classes_2.js +++ b/docs/search/classes_2.js @@ -1,4 +1,5 @@ var searchData= [ - ['montecarloupdater_0',['MonteCarloUpdater',['../classfp_1_1_monte_carlo_updater.html',1,'fp']]] + ['datasaver_0',['DataSaver',['../classfp_1_1experimental_1_1_data_saver.html',1,'fp::experimental']]], + ['dynamicdisplacementupdater_1',['DynamicDisplacementUpdater',['../classfp_1_1_dynamic_displacement_updater.html',1,'fp']]] ]; diff --git a/docs/search/classes_3.js b/docs/search/classes_3.js old mode 100644 new mode 100755 index 24af913..5febbac --- a/docs/search/classes_3.js +++ b/docs/search/classes_3.js @@ -1,6 +1,4 @@ var searchData= [ - ['neighbors_0',['Neighbors',['../structfp_1_1_neighbors.html',1,'fp']]], - ['node_1',['Node',['../structfp_1_1_node.html',1,'fp']]], - ['nodes_2',['Nodes',['../structfp_1_1_nodes.html',1,'fp']]] + ['geometry_0',['Geometry',['../structfp_1_1_geometry.html',1,'fp']]] ]; diff --git a/docs/search/classes_4.js b/docs/search/classes_4.js old mode 100644 new mode 100755 index db6418e..731190f --- a/docs/search/classes_4.js +++ b/docs/search/classes_4.js @@ -1,5 +1,4 @@ var searchData= [ - ['rawstlsolid_0',['rawSTLSolid',['../structfp_1_1implementation_1_1raw_s_t_l_solid.html',1,'fp::implementation']]], - ['rawstltriangle_1',['rawSTLTriangle',['../structfp_1_1implementation_1_1raw_s_t_l_triangle.html',1,'fp::implementation']]] + ['jsondatasaver_0',['jsonDataSaver',['../classfp_1_1experimental_1_1json_data_saver.html',1,'fp::experimental']]] ]; diff --git a/docs/search/classes_5.js b/docs/search/classes_5.js old mode 100644 new mode 100755 index 092c0de..ea92ea4 --- a/docs/search/classes_5.js +++ b/docs/search/classes_5.js @@ -1,6 +1,4 @@ var searchData= [ - ['stlnode_0',['stlNode',['../structfp_1_1implementation_1_1stl_node.html',1,'fp::implementation']]], - ['stlserializer_1',['stlSerializer',['../classfp_1_1implementation_1_1stl_serializer.html',1,'fp::implementation']]], - ['stltriangle_2',['stlTriangle',['../classfp_1_1implementation_1_1stl_triangle.html',1,'fp::implementation']]] + ['montecarloupdater_0',['MonteCarloUpdater',['../classfp_1_1_monte_carlo_updater.html',1,'fp']]] ]; diff --git a/docs/search/classes_6.js b/docs/search/classes_6.js old mode 100644 new mode 100755 index dec93d6..24af913 --- a/docs/search/classes_6.js +++ b/docs/search/classes_6.js @@ -1,5 +1,6 @@ var searchData= [ - ['triangulation_0',['Triangulation',['../classfp_1_1_triangulation.html',1,'fp']]], - ['triangulation_3c_20real_2c_20index_2c_20triangulation_5ftype_20_3e_1',['Triangulation< Real, Index, triangulation_type >',['../classfp_1_1_triangulation.html',1,'fp']]] + ['neighbors_0',['Neighbors',['../structfp_1_1_neighbors.html',1,'fp']]], + ['node_1',['Node',['../structfp_1_1_node.html',1,'fp']]], + ['nodes_2',['Nodes',['../structfp_1_1_nodes.html',1,'fp']]] ]; diff --git a/docs/search/classes_7.js b/docs/search/classes_7.js old mode 100644 new mode 100755 index 56fa359..db6418e --- a/docs/search/classes_7.js +++ b/docs/search/classes_7.js @@ -1,4 +1,5 @@ var searchData= [ - ['vec3_0',['vec3',['../classfp_1_1vec3.html',1,'fp']]] + ['rawstlsolid_0',['rawSTLSolid',['../structfp_1_1implementation_1_1raw_s_t_l_solid.html',1,'fp::implementation']]], + ['rawstltriangle_1',['rawSTLTriangle',['../structfp_1_1implementation_1_1raw_s_t_l_triangle.html',1,'fp::implementation']]] ]; diff --git a/docs/search/classes_8.js b/docs/search/classes_8.js new file mode 100755 index 0000000..092c0de --- /dev/null +++ b/docs/search/classes_8.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['stlnode_0',['stlNode',['../structfp_1_1implementation_1_1stl_node.html',1,'fp::implementation']]], + ['stlserializer_1',['stlSerializer',['../classfp_1_1implementation_1_1stl_serializer.html',1,'fp::implementation']]], + ['stltriangle_2',['stlTriangle',['../classfp_1_1implementation_1_1stl_triangle.html',1,'fp::implementation']]] +]; diff --git a/docs/search/classes_9.js b/docs/search/classes_9.js new file mode 100755 index 0000000..8e0563c --- /dev/null +++ b/docs/search/classes_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['triangulation_0',['Triangulation',['../classfp_1_1_triangulation.html',1,'fp']]] +]; diff --git a/docs/search/classes_a.js b/docs/search/classes_a.js new file mode 100755 index 0000000..56fa359 --- /dev/null +++ b/docs/search/classes_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['vec3_0',['vec3',['../classfp_1_1vec3.html',1,'fp']]] +]; diff --git a/docs/search/classes_b.js b/docs/search/classes_b.js new file mode 100755 index 0000000..fe22003 --- /dev/null +++ b/docs/search/classes_b.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['xyzdatasaver_0',['xyzDataSaver',['../classfp_1_1experimental_1_1xyz_data_saver.html',1,'fp::experimental']]], + ['xyzproperty_1',['xyzProperty',['../structfp_1_1experimental_1_1xyz_property.html',1,'fp::experimental']]] +]; diff --git a/docs/search/close.svg b/docs/search/close.svg old mode 100644 new mode 100755 diff --git a/docs/search/concepts_0.js b/docs/search/concepts_0.js old mode 100644 new mode 100755 index f654b49..b7c7e5c --- a/docs/search/concepts_0.js +++ b/docs/search/concepts_0.js @@ -1,5 +1,13 @@ var searchData= [ - ['fp_3a_3afloating_5fpoint_5fnumber_0',['floating_point_number',['../conceptfp_1_1floating__point__number.html',1,'fp']]], - ['fp_3a_3aindexing_5fnumber_1',['indexing_number',['../conceptfp_1_1indexing__number.html',1,'fp']]] + ['fp_3a_3acontainer_0',['Container',['../conceptfp_1_1_container.html',1,'fp']]], + ['fp_3a_3afloating_5fpoint_5fnumber_1',['floating_point_number',['../conceptfp_1_1floating__point__number.html',1,'fp']]], + ['fp_3a_3aimplementation_3a_3abeginable_2',['Beginable',['../conceptfp_1_1implementation_1_1_beginable.html',1,'fp::implementation']]], + ['fp_3a_3aimplementation_3a_3abeginandendcopyconstructibleanddestructible_3',['BeginAndEndCopyConstructibleAndDestructible',['../conceptfp_1_1implementation_1_1_begin_and_end_copy_constructible_and_destructible.html',1,'fp::implementation']]], + ['fp_3a_3aimplementation_3a_3abeginderefable_4',['BeginDerefable',['../conceptfp_1_1implementation_1_1_begin_derefable.html',1,'fp::implementation']]], + ['fp_3a_3aimplementation_3a_3abegindereftovoid_5',['BeginDerefToVoid',['../conceptfp_1_1implementation_1_1_begin_deref_to_void.html',1,'fp::implementation']]], + ['fp_3a_3aimplementation_3a_3abeginincrementable_6',['BeginIncrementable',['../conceptfp_1_1implementation_1_1_begin_incrementable.html',1,'fp::implementation']]], + ['fp_3a_3aimplementation_3a_3aendable_7',['Endable',['../conceptfp_1_1implementation_1_1_endable.html',1,'fp::implementation']]], + ['fp_3a_3aimplementation_3a_3aneqablebeginandend_8',['NeqableBeginAndEnd',['../conceptfp_1_1implementation_1_1_neqable_begin_and_end.html',1,'fp::implementation']]], + ['fp_3a_3aindexing_5fnumber_9',['indexing_number',['../conceptfp_1_1indexing__number.html',1,'fp']]] ]; diff --git a/docs/search/enums_0.js b/docs/search/enums_0.js deleted file mode 100644 index 9334940..0000000 --- a/docs/search/enums_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['triangulationtype_0',['TriangulationType',['../group___globals.html#ga6ac3c08b4c402e40a3f270818345078a',1,'fp']]] -]; diff --git a/docs/search/enumvalues_0.js b/docs/search/enumvalues_0.js deleted file mode 100644 index c1fa3e8..0000000 --- a/docs/search/enumvalues_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['experimental_5fplanar_5ftriangulation_0',['EXPERIMENTAL_PLANAR_TRIANGULATION',['../group___globals.html#gga6ac3c08b4c402e40a3f270818345078aafb3c1a4934975221c03cd6b957b3e089',1,'fp']]] -]; diff --git a/docs/search/enumvalues_1.js b/docs/search/enumvalues_1.js deleted file mode 100644 index c2a2ce4..0000000 --- a/docs/search/enumvalues_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['spherical_5ftriangulation_0',['SPHERICAL_TRIANGULATION',['../group___globals.html#gga6ac3c08b4c402e40a3f270818345078aa4818fa0ff44979ed665568888d681703',1,'fp']]] -]; diff --git a/docs/search/files_0.js b/docs/search/files_0.js old mode 100644 new mode 100755 diff --git a/docs/search/files_1.js b/docs/search/files_1.js old mode 100644 new mode 100755 diff --git a/docs/search/files_2.js b/docs/search/files_2.js old mode 100644 new mode 100755 diff --git a/docs/search/files_3.js b/docs/search/files_3.js old mode 100644 new mode 100755 diff --git a/docs/search/files_4.js b/docs/search/files_4.js old mode 100644 new mode 100755 diff --git a/docs/search/files_5.js b/docs/search/files_5.js old mode 100644 new mode 100755 diff --git a/docs/search/files_6.js b/docs/search/files_6.js old mode 100644 new mode 100755 diff --git a/docs/search/functions_0.js b/docs/search/functions_0.js old mode 100644 new mode 100755 index 93b0907..206b1cd --- a/docs/search/functions_0.js +++ b/docs/search/functions_0.js @@ -1,5 +1,4 @@ var searchData= [ - ['add_0',['add',['../classfp_1_1vec3.html#ab7964ed013305de8ec59574cff83fa50',1,'fp::vec3']]], - ['area_1',['area',['../structfp_1_1_nodes.html#ab863d48ecbce98b85747961bbaae82a9',1,'fp::Nodes']]] + ['add_0',['add',['../classfp_1_1vec3.html#ab7964ed013305de8ec59574cff83fa50',1,'fp::vec3']]] ]; diff --git a/docs/search/functions_1.js b/docs/search/functions_1.js old mode 100644 new mode 100755 index fbcf670..0bd02be --- a/docs/search/functions_1.js +++ b/docs/search/functions_1.js @@ -1,7 +1,6 @@ var searchData= [ - ['begin_0',['begin',['../structfp_1_1_nodes.html#a9d3d31a706daef6476a29f69903680b2',1,'fp::Nodes::begin()'],['../structfp_1_1_nodes.html#afe2daadebb5cbc9a793542609cde6980',1,'fp::Nodes::begin() const']]], - ['bond_5flength_5fflip_5frejection_5fcount_1',['bond_length_flip_rejection_count',['../classfp_1_1_monte_carlo_updater.html#a43985749fca7d36119d07c163de7f792',1,'fp::MonteCarloUpdater']]], - ['bond_5flength_5fmove_5frejection_5fcount_2',['bond_length_move_rejection_count',['../classfp_1_1_monte_carlo_updater.html#aedba837fd1d1336a03900b0cbf771cd8',1,'fp::MonteCarloUpdater']]], - ['boundary_5fnodes_5fids_5fset_3',['boundary_nodes_ids_set',['../classfp_1_1_triangulation.html#a699133c53fc98a6f3ec463bf1567dec6',1,'fp::Triangulation']]] + ['begin_0',['begin',['../structfp_1_1_nodes.html#a9244b582d9d23771c04ef519a4014edf',1,'fp::Nodes::begin()'],['../structfp_1_1_nodes.html#ad2a7c65781572c572990b17c858a1a19',1,'fp::Nodes::begin() const']]], + ['bond_5flength_5fflip_5frejection_5fcount_1',['bond_length_flip_rejection_count',['../classfp_1_1_monte_carlo_updater.html#a5afffea0be3f3e90d2e1a7fce7b6444e',1,'fp::MonteCarloUpdater']]], + ['bond_5flength_5fmove_5frejection_5fcount_2',['bond_length_move_rejection_count',['../classfp_1_1_monte_carlo_updater.html#abfd479d2c1cbee2fedc7bb99975a3630',1,'fp::MonteCarloUpdater']]] ]; diff --git a/docs/search/functions_10.js b/docs/search/functions_10.js old mode 100644 new mode 100755 index 80883a1..4996ddc --- a/docs/search/functions_10.js +++ b/docs/search/functions_10.js @@ -1,5 +1,5 @@ var searchData= [ - ['translate_5fall_5fnodes_0',['translate_all_nodes',['../classfp_1_1_triangulation.html#aaef436fe4758c409b21a135b329edc17',1,'fp::Triangulation']]], - ['triangulation_1',['triangulation',['../classfp_1_1_triangulation.html#ab21e803940915dca4750bb5bd86cd659',1,'fp::Triangulation::Triangulation(Json const &nodes_input, Real verlet_radius_inp)'],['../classfp_1_1_triangulation.html#a758e5f3e3f31aeef799219932b639ded',1,'fp::Triangulation::Triangulation(Index n_nodes_iter, Real R_initial_input, Real verlet_radius_inp)'],['../classfp_1_1_triangulation.html#a411d76190690d29b6f7040e8367b95ec',1,'fp::Triangulation::Triangulation(Index n_length, Index n_width, Real length, Real width, Real verlet_radius_inp)']]] + ['translate_5fall_5fnodes_0',['translate_all_nodes',['../classfp_1_1_triangulation.html#a405a8a4488dfb19c2b2145ed19fefb2b',1,'fp::Triangulation']]], + ['triangulation_1',['Triangulation',['../classfp_1_1_triangulation.html#a77fcff4ef9a09cf5c56fc3e654a99752',1,'fp::Triangulation::Triangulation(Json const &nodes_input, Real verlet_radius_inp)'],['../classfp_1_1_triangulation.html#a940c044d7ab56c67434e7ce118212642',1,'fp::Triangulation::Triangulation(Index n_nodes_iter, Real R_initial_input, Real verlet_radius_inp)']]] ]; diff --git a/docs/search/functions_11.js b/docs/search/functions_11.js old mode 100644 new mode 100755 index aa54d28..79e828a --- a/docs/search/functions_11.js +++ b/docs/search/functions_11.js @@ -1,9 +1,7 @@ var searchData= [ - ['unflip_5fbond_0',['unflip_bond',['../classfp_1_1_triangulation.html#a5d1ec431a7a0040d7963e4297a80faaa',1,'fp::Triangulation']]], - ['unit_5fbending_5fenergy_1',['unit_bending_energy',['../structfp_1_1_nodes.html#ab65c2e5dd4f3b43b2445b62c400107e9',1,'fp::Nodes']]], - ['update_5fboundary_5fnode_5fgeometry_2',['update_boundary_node_geometry',['../classfp_1_1_triangulation.html#a6ad51f097deab1674fce1800d2f2cf31',1,'fp::Triangulation']]], - ['update_5fbulk_5fnode_5fgeometry_3',['update_bulk_node_geometry',['../classfp_1_1_triangulation.html#a5d5763865ac706a2e800ed306d070d68',1,'fp::Triangulation']]], - ['update_5fdiamond_5fgeometry_4',['update_diamond_geometry',['../classfp_1_1_triangulation.html#a762c6430c00d719a8ea5a4a3e89715a8',1,'fp::Triangulation']]], - ['update_5ftwo_5fring_5fgeometry_5',['update_two_ring_geometry',['../classfp_1_1_triangulation.html#a1d7b2a1e57f742d1d401eeb09b057beb',1,'fp::Triangulation']]] + ['unflip_5fbond_0',['unflip_bond',['../classfp_1_1_triangulation.html#a2b6043010d90086720ac6b2b2e1a9cfa',1,'fp::Triangulation']]], + ['update_5fbulk_5fnode_5fgeometry_1',['update_bulk_node_geometry',['../classfp_1_1_triangulation.html#a3b7b50584514fb20c9922b43cf684a31',1,'fp::Triangulation']]], + ['update_5fdiamond_5fgeometry_2',['update_diamond_geometry',['../classfp_1_1_triangulation.html#af804d75575d1eeb9e02d8c0e97a94004',1,'fp::Triangulation']]], + ['update_5ftwo_5fring_5fgeometry_3',['update_two_ring_geometry',['../classfp_1_1_triangulation.html#ac1d5244fb8525f776d0adad0b9a0f666',1,'fp::Triangulation']]] ]; diff --git a/docs/search/functions_12.js b/docs/search/functions_12.js deleted file mode 100644 index 6de6536..0000000 --- a/docs/search/functions_12.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['volume_0',['volume',['../structfp_1_1_nodes.html#a0d791117fddd2490c8223a74de6f9109',1,'fp::Nodes']]] -]; diff --git a/docs/search/functions_2.js b/docs/search/functions_2.js old mode 100644 new mode 100755 index 2930c6a..0d35eec --- a/docs/search/functions_2.js +++ b/docs/search/functions_2.js @@ -1,7 +1,6 @@ var searchData= [ - ['calculate_5fdiamond_5fgeometry_0',['calculate_diamond_geometry',['../classfp_1_1_triangulation.html#acde5fe59e2fae6494d38f5e957404a70',1,'fp::Triangulation']]], - ['calculate_5fmass_5fcenter_1',['calculate_mass_center',['../classfp_1_1_triangulation.html#af28b60961d8f8404a796b33b4a769c02',1,'fp::Triangulation']]], - ['cross_2',['cross',['../classfp_1_1vec3.html#ae64d6fa0ceec87d5a26cac17560f1d7c',1,'fp::vec3::cross(vec3< Real > const &a, vec3< Real > const &b)'],['../classfp_1_1vec3.html#a2522af9d50779abf605b8be03e146a5f',1,'fp::vec3::cross(vec3< Real > const &other) const']]], - ['curvature_5fvec_3',['curvature_vec',['../structfp_1_1_nodes.html#aac8eaef6c3fa8679dfafcb4018573233',1,'fp::Nodes']]] + ['calculate_5fdiamond_5fgeometry_0',['calculate_diamond_geometry',['../classfp_1_1_triangulation.html#a21cb71c7c23dd3ab2cbbc9a1e9ea5c90',1,'fp::Triangulation']]], + ['calculate_5fmass_5fcenter_1',['calculate_mass_center',['../classfp_1_1_triangulation.html#a6dc2bfefe6d120c1957bfd68fa475851',1,'fp::Triangulation']]], + ['cross_2',['cross',['../classfp_1_1vec3.html#ae64d6fa0ceec87d5a26cac17560f1d7c',1,'fp::vec3::cross(vec3< Real > const &a, vec3< Real > const &b)'],['../classfp_1_1vec3.html#a2522af9d50779abf605b8be03e146a5f',1,'fp::vec3::cross(vec3< Real > const &other) const']]] ]; diff --git a/docs/search/functions_3.js b/docs/search/functions_3.js old mode 100644 new mode 100755 index 84abcd0..ad26805 --- a/docs/search/functions_3.js +++ b/docs/search/functions_3.js @@ -1,5 +1,4 @@ var searchData= [ - ['displace_0',['displace',['../structfp_1_1_nodes.html#af206c67619617f5e4d99ea67be94a7d6',1,'fp::Nodes::displace(Index node_id, vec3< Real >const &displacement)'],['../structfp_1_1_nodes.html#a9c703086e73c0a1d2b5ff1d8b482c384',1,'fp::Nodes::displace(Index node_id, vec3< Real > &&displacement)']]], - ['dot_1',['dot',['../classfp_1_1vec3.html#a3097ff5c62f8bb0da1c5e87fb9384da9',1,'fp::vec3']]] + ['dot_0',['dot',['../classfp_1_1vec3.html#a3097ff5c62f8bb0da1c5e87fb9384da9',1,'fp::vec3']]] ]; diff --git a/docs/search/functions_4.js b/docs/search/functions_4.js old mode 100644 new mode 100755 index 5d82602..8a7571d --- a/docs/search/functions_4.js +++ b/docs/search/functions_4.js @@ -1,7 +1,7 @@ var searchData= [ - ['emplace_5fbefore_0',['emplace_before',['../classfp_1_1_triangulation.html#a11ee6051e9db388def8aaed68b1841d4',1,'fp::Triangulation']]], - ['emplace_5fnn_5fid_1',['emplace_nn_id',['../structfp_1_1_node.html#aefc063b2ef6645bfea2e258260a5236a',1,'fp::Node::emplace_nn_id()'],['../structfp_1_1_nodes.html#a53ecc9a931522c8f339dadb2232a528a',1,'fp::Nodes::emplace_nn_id(Index node_id, Index to_emplace_nn_id, Index loc_nn_index)']]], - ['end_2',['end',['../structfp_1_1_nodes.html#ac67b161f99d11ae61df2fe05fa3d46e0',1,'fp::Nodes::end()'],['../structfp_1_1_nodes.html#ad90ef5ea66c12a63a491fe15497e4f6e',1,'fp::Nodes::end() const']]], - ['experimental_5fload_5fsphere_5ffrom_5fstl_3',['experimental_load_sphere_from_stl',['../classfp_1_1_triangulation.html#a62af174bd11d3db03de25587638ffeb4',1,'fp::Triangulation']]] + ['emplace_5fbefore_0',['emplace_before',['../classfp_1_1_triangulation.html#a3ba929020c70e27f53acf961f8e88cb2',1,'fp::Triangulation']]], + ['emplace_5fnn_5fid_1',['emplace_nn_id',['../structfp_1_1_node.html#a7b1707f5056183bcb0b1cdba0f48449a',1,'fp::Node::emplace_nn_id()'],['../structfp_1_1_nodes.html#a30ea8ac2096ede34251f77fbea6be2d2',1,'fp::Nodes::emplace_nn_id(Index node_id, Index to_emplace_nn_id, Index loc_nn_index)']]], + ['end_2',['end',['../structfp_1_1_nodes.html#adfa27f36d1528e84e9b56f4f94f534dd',1,'fp::Nodes::end()'],['../structfp_1_1_nodes.html#a164cd75d798ffa77755f85646df1c1b7',1,'fp::Nodes::end() const']]], + ['experimental_5fload_5fsphere_5ffrom_5fstl_3',['experimental_load_sphere_from_stl',['../classfp_1_1_triangulation.html#a00bb575ea2a3eb3a256e9bb25a885938',1,'fp::Triangulation']]] ]; diff --git a/docs/search/functions_5.js b/docs/search/functions_5.js old mode 100644 new mode 100755 index 66dd882..19920c3 --- a/docs/search/functions_5.js +++ b/docs/search/functions_5.js @@ -1,9 +1,9 @@ var searchData= [ - ['find_5fnns_5floc_5fpointer_0',['find_nns_loc_pointer',['../structfp_1_1_node.html#a5959f64aafa9cd65ff0e5fed21064da3',1,'fp::Node']]], - ['flip_5fattempt_5fcount_1',['flip_attempt_count',['../classfp_1_1_monte_carlo_updater.html#a1b16f05da5a695e7171c415327b6bf49',1,'fp::MonteCarloUpdater']]], - ['flip_5fback_5fcount_2',['flip_back_count',['../classfp_1_1_monte_carlo_updater.html#ad98d8bef250c2b7c533b6694e8e00d2d',1,'fp::MonteCarloUpdater']]], - ['flip_5fbond_3',['flip_bond',['../classfp_1_1_triangulation.html#a6833f13e1fd24b039ca1ad2969b8d267',1,'fp::Triangulation']]], - ['flip_5fbond_5funchecked_4',['flip_bond_unchecked',['../classfp_1_1_triangulation.html#a077d1be6c31f16241e9035c5a0f93652',1,'fp::Triangulation']]], - ['flip_5fmc_5fupdater_5',['flip_mc_updater',['../classfp_1_1_monte_carlo_updater.html#a8de725c1ae28fd44d096ffb82467b598',1,'fp::MonteCarloUpdater::flip_MC_updater(fp::Node< Real, Index > const &node)'],['../classfp_1_1_monte_carlo_updater.html#acf28ad26646a0e87dce57eed5ca5047c',1,'fp::MonteCarloUpdater::flip_MC_updater(fp::Node< Real, Index > const &node, Index id_in_nn_ids)']]] + ['find_5fnns_5floc_5fpointer_0',['find_nns_loc_pointer',['../structfp_1_1_node.html#ac778f9aac2fcab5e74689945bf121553',1,'fp::Node']]], + ['flip_5fattempt_5fcount_1',['flip_attempt_count',['../classfp_1_1_monte_carlo_updater.html#ac02dcce7a2fa253cabe433b579d6cbdb',1,'fp::MonteCarloUpdater']]], + ['flip_5fback_5fcount_2',['flip_back_count',['../classfp_1_1_monte_carlo_updater.html#ad0166b3e6b463f538cbf93969b1ee2ec',1,'fp::MonteCarloUpdater']]], + ['flip_5fbond_3',['flip_bond',['../classfp_1_1_triangulation.html#af9b5579bc1812246b7cf96a5c208d7bc',1,'fp::Triangulation']]], + ['flip_5fbond_5funchecked_4',['flip_bond_unchecked',['../classfp_1_1_triangulation.html#a7f32f7136f2123610cbd3ef798329eb8',1,'fp::Triangulation']]], + ['flip_5fmc_5fupdater_5',['flip_MC_updater',['../classfp_1_1_monte_carlo_updater.html#a1a5484a8ab66cf9106ca48b8993e30d2',1,'fp::MonteCarloUpdater::flip_MC_updater(fp::Node const &node)'],['../classfp_1_1_monte_carlo_updater.html#abab166d4505421306c99986145f0c183',1,'fp::MonteCarloUpdater::flip_MC_updater(fp::Node const &node, Index id_in_nn_ids)']]] ]; diff --git a/docs/search/functions_6.js b/docs/search/functions_6.js old mode 100644 new mode 100755 index 3192f15..9739f73 --- a/docs/search/functions_6.js +++ b/docs/search/functions_6.js @@ -1,8 +1,7 @@ var searchData= [ - ['geometry_0',['geometry',['../structfp_1_1_geometry.html#a6bababab0cc9d995cd9d52dfc87442a0',1,'fp::Geometry::Geometry()'],['../structfp_1_1_geometry.html#a6627a3e6e7ec703d8db7c756464aed8e',1,'fp::Geometry::Geometry(Node< Real, Index > const &node)'],['../structfp_1_1_geometry.html#a2c84ea40f4dec6a64541e9d4aaa9eda3',1,'fp::Geometry::Geometry(Real area_inp, Real volume_inp, Real unit_bending_energy_inp)']]], - ['get_5fdistance_5fvector_5fto_1',['get_distance_vector_to',['../structfp_1_1_node.html#aa9bf52cc0dc958fca2868f640cdbcb21',1,'fp::Node']]], - ['get_5fnn_5fdistance_5fvector_5fbetween_2',['get_nn_distance_vector_between',['../structfp_1_1_nodes.html#a8efb079f96664cee5698ccdf9e6bc080',1,'fp::Nodes']]], - ['get_5ftwo_5fring_5fgeometry_3',['get_two_ring_geometry',['../classfp_1_1_triangulation.html#a3c660cb2bec69afe055843975698cfd0',1,'fp::Triangulation']]], - ['global_5fgeometry_4',['global_geometry',['../classfp_1_1_triangulation.html#a9890d90831a7a834e8fffa1c432200d3',1,'fp::Triangulation']]] + ['geometry_0',['Geometry',['../structfp_1_1_geometry.html#ab34dc017d3d153b9d6dce5cbe85b00a2',1,'fp::Geometry::Geometry()'],['../structfp_1_1_geometry.html#afe19ae70a18f105e616394c979739f89',1,'fp::Geometry::Geometry(Node const &node)'],['../structfp_1_1_geometry.html#afcb524f26e28258ab595cf67969e4f2f',1,'fp::Geometry::Geometry(Real area_inp, Real volume_inp)']]], + ['get_5fdistance_5fvector_5fto_1',['get_distance_vector_to',['../structfp_1_1_node.html#a24393815d94af2ca2b7b0ec76299bfb5',1,'fp::Node']]], + ['get_5ftwo_5fring_5fgeometry_2',['get_two_ring_geometry',['../classfp_1_1_triangulation.html#aa7d571edcee24274dfd464f08d0f187f',1,'fp::Triangulation']]], + ['global_5fgeometry_3',['global_geometry',['../classfp_1_1_triangulation.html#ace0af615b2b663ef785c72f947479bc4',1,'fp::Triangulation']]] ]; diff --git a/docs/search/functions_7.js b/docs/search/functions_7.js old mode 100644 new mode 100755 diff --git a/docs/search/functions_8.js b/docs/search/functions_8.js old mode 100644 new mode 100755 diff --git a/docs/search/functions_9.js b/docs/search/functions_9.js old mode 100644 new mode 100755 index cf29c45..1554f5b --- a/docs/search/functions_9.js +++ b/docs/search/functions_9.js @@ -1,4 +1,4 @@ var searchData= [ - ['kbt_0',['kBT',['../classfp_1_1_monte_carlo_updater.html#a4e3b7ba1838866d8e4968a404deb5c94',1,'fp::MonteCarloUpdater']]] + ['kbt_0',['kBT',['../classfp_1_1_monte_carlo_updater.html#ac130f551ac1590c7f706351e72b40c5f',1,'fp::MonteCarloUpdater']]] ]; diff --git a/docs/search/functions_a.js b/docs/search/functions_a.js old mode 100644 new mode 100755 index 3265402..4f60abf --- a/docs/search/functions_a.js +++ b/docs/search/functions_a.js @@ -1,15 +1,16 @@ var searchData= [ - ['make_5fdata_0',['make_data',['../structfp_1_1_nodes.html#aa9d0a78ec3fc2f687a3731662619ab44',1,'fp::Nodes']]], - ['make_5fegg_5fdata_1',['make_egg_data',['../classfp_1_1_triangulation.html#aca161d492a4ba155d41000e382a95555',1,'fp::Triangulation']]], - ['make_5fglobal_5fgeometry_2',['make_global_geometry',['../classfp_1_1_triangulation.html#a1afce8afd92f1b88fb15ce7d9cb31edd',1,'fp::Triangulation']]], - ['make_5fverlet_5flist_3',['make_verlet_list',['../classfp_1_1_triangulation.html#a7a4162ec7ad98f342eeae67ee9451b02',1,'fp::Triangulation']]], - ['minus_5fone_4',['minus_one',['../structfp_1_1_neighbors.html#a4fd046f13a1a7c640a2a01e1d0585497',1,'fp::Neighbors']]], - ['mixed_5farea_5',['mixed_area',['../classfp_1_1_triangulation.html#a3e43dfd4b4c9cfd10c5bf4174f2a85d1',1,'fp::Triangulation::mixed_area(vec3< Real > const &lij, vec3< Real > const &lij_p_1, Real triangle_area, Real cot_at_j, Real cot_at_j_p_1)'],['../classfp_1_1_triangulation.html#a847fc218cc1807b7027b069a4239c7db',1,'fp::Triangulation::mixed_area(vec3< Real > const &lij, vec3< Real > const &lij_p_1, Real const &triangle_area)']]], - ['montecarloupdater_6',['MonteCarloUpdater',['../classfp_1_1_monte_carlo_updater.html#ac3e7246b13537a6c2df34e5334289c80',1,'fp::MonteCarloUpdater']]], - ['move_5fattempt_5fcount_7',['move_attempt_count',['../classfp_1_1_monte_carlo_updater.html#a419e39432ab410ba04dd1ea6fcad38e3',1,'fp::MonteCarloUpdater']]], - ['move_5fback_5fcount_8',['move_back_count',['../classfp_1_1_monte_carlo_updater.html#a0afcfe92c1f0f52affb1572521d88df4',1,'fp::MonteCarloUpdater']]], - ['move_5fmc_5fupdater_9',['move_MC_updater',['../classfp_1_1_monte_carlo_updater.html#ac3e40c3b93bf2bf6f2b08291357503be',1,'fp::MonteCarloUpdater']]], - ['move_5fneeds_5fundoing_10',['move_needs_undoing',['../classfp_1_1_monte_carlo_updater.html#a7e172728bb0764e21ba1e44aa76cce83',1,'fp::MonteCarloUpdater']]], - ['move_5fnode_11',['move_node',['../classfp_1_1_triangulation.html#ad8102adbe7dab80cda3209844a939e30',1,'fp::Triangulation']]] + ['make_5fdata_0',['make_data',['../structfp_1_1_nodes.html#a098083d4c3f7ad848fb70837b7ece0f5',1,'fp::Nodes']]], + ['make_5fegg_5fdata_1',['make_egg_data',['../classfp_1_1_triangulation.html#a702095556e9512260ed57535b85c63ac',1,'fp::Triangulation']]], + ['make_5fglobal_5fgeometry_2',['make_global_geometry',['../classfp_1_1_triangulation.html#a05812c9b913aadc99b3bf7a126316467',1,'fp::Triangulation']]], + ['make_5fverlet_5flist_3',['make_verlet_list',['../classfp_1_1_triangulation.html#af67a77a76afa6b91149bdebe6a6a247f',1,'fp::Triangulation']]], + ['min_5fradius_5fwith_5fnon_5foverlapping_5fbeads_4',['min_radius_with_non_overlapping_beads',['../namespacefp.html#a002936af49386985bc3a8c16bcd3f18b',1,'fp']]], + ['minus_5fone_5',['minus_one',['../structfp_1_1_neighbors.html#abd825093ef365d4fe88df97d1ce1789a',1,'fp::Neighbors']]], + ['mixed_5farea_6',['mixed_area',['../classfp_1_1_triangulation.html#add5f9a26549294b8b94c623056a58b0d',1,'fp::Triangulation']]], + ['montecarloupdater_7',['MonteCarloUpdater',['../classfp_1_1_monte_carlo_updater.html#afb5cbe50420e978c618d5ce7f909c588',1,'fp::MonteCarloUpdater']]], + ['move_5fattempt_5fcount_8',['move_attempt_count',['../classfp_1_1_monte_carlo_updater.html#ab44cc6033ff475b9bce9af27742171e3',1,'fp::MonteCarloUpdater']]], + ['move_5fback_5fcount_9',['move_back_count',['../classfp_1_1_monte_carlo_updater.html#ab1c8fe7f2288a978f95154d2c8c7d746',1,'fp::MonteCarloUpdater']]], + ['move_5fmc_5fupdater_10',['move_MC_updater',['../classfp_1_1_monte_carlo_updater.html#aa8bc9d09da6cb006c077e3c18da174d1',1,'fp::MonteCarloUpdater']]], + ['move_5fneeds_5fundoing_11',['move_needs_undoing',['../classfp_1_1_monte_carlo_updater.html#af4528387b65d1058714b1f6aa0fdb90b',1,'fp::MonteCarloUpdater']]], + ['move_5fnode_12',['move_node',['../classfp_1_1_triangulation.html#a37457b9568e1338750e153471a4b7b59',1,'fp::Triangulation']]] ]; diff --git a/docs/search/functions_b.js b/docs/search/functions_b.js old mode 100644 new mode 100755 index 7792da1..8634aa3 --- a/docs/search/functions_b.js +++ b/docs/search/functions_b.js @@ -1,12 +1,12 @@ var searchData= [ - ['new_5fneighbour_5fdistances_5fare_5fbetween_5fmin_5fand_5fmax_5flength_0',['new_neighbour_distances_are_between_min_and_max_length',['../classfp_1_1_monte_carlo_updater.html#ada3c8ad8d719671d9dedecd3ec9bbd2b',1,'fp::MonteCarloUpdater']]], - ['new_5fnext_5fneighbour_5fdistances_5fare_5fbetween_5fmin_5fand_5fmax_5flength_1',['new_next_neighbour_distances_are_between_min_and_max_length',['../classfp_1_1_monte_carlo_updater.html#ad985050d8f094aa3d577df33eac9242d',1,'fp::MonteCarloUpdater']]], - ['new_5fverlet_5fneighbour_5fdistances_5fare_5fbetween_5fmin_5fand_5fmax_5flength_2',['new_verlet_neighbour_distances_are_between_min_and_max_length',['../classfp_1_1_monte_carlo_updater.html#a6a064bcdc7395374ab73913e364f1f81',1,'fp::MonteCarloUpdater']]], - ['nn_5fdistances_3',['nn_distances',['../structfp_1_1_nodes.html#aeaac33789677da84759647308c5f25da',1,'fp::Nodes']]], - ['nn_5fid_4',['nn_id',['../structfp_1_1_nodes.html#a65c0fd75105d0110c204b2b9c2af5640',1,'fp::Nodes']]], - ['nn_5fids_5',['nn_ids',['../structfp_1_1_nodes.html#aa149044ed9e33aa0560311362cd2c660',1,'fp::Nodes']]], - ['nodes_6',['nodes',['../classfp_1_1_triangulation.html#aeeb65b7f5974560fc57e20b50cf73b41',1,'fp::Triangulation::nodes()'],['../structfp_1_1_nodes.html#ab29b1bbd7bae02bdda2a0a94581235bb',1,'fp::Nodes::Nodes()=default'],['../structfp_1_1_nodes.html#afcdc1fecf1c86ee26bd4a04e3126dcc8',1,'fp::Nodes::Nodes(std::vector< Node< Real, Index > > data_inp)'],['../structfp_1_1_nodes.html#aeab72aa27fd66417ac8d5d0c9d000be6',1,'fp::Nodes::Nodes(Json const &node_dict)']]], + ['new_5fneighbour_5fdistances_5fare_5fbetween_5fmin_5fand_5fmax_5flength_0',['new_neighbour_distances_are_between_min_and_max_length',['../classfp_1_1_monte_carlo_updater.html#a173b77e5381e7d98ceb77aaa040b29dd',1,'fp::MonteCarloUpdater']]], + ['new_5fnext_5fneighbour_5fdistances_5fare_5fbetween_5fmin_5fand_5fmax_5flength_1',['new_next_neighbour_distances_are_between_min_and_max_length',['../classfp_1_1_monte_carlo_updater.html#adff0b592bb81bdc289bcdbd170b78401',1,'fp::MonteCarloUpdater']]], + ['new_5fverlet_5fneighbour_5fdistances_5fare_5fbetween_5fmin_5fand_5fmax_5flength_2',['new_verlet_neighbour_distances_are_between_min_and_max_length',['../classfp_1_1_monte_carlo_updater.html#aaf82cdb55f4bf12468ca2a744ac81ffe',1,'fp::MonteCarloUpdater']]], + ['node_5fcurvature_5fsquared_3',['node_curvature_squared',['../namespacefp.html#a078adea1b2428bde7781bb5adde2f253',1,'fp']]], + ['node_5funit_5fbending_5fenergy_4',['node_unit_bending_energy',['../namespacefp.html#aa5f7482d07c411db881895fbed9ab72f',1,'fp']]], + ['nodes_5',['Nodes',['../structfp_1_1_nodes.html#ad937cf2a8083d6ae76a3c87df5039acd',1,'fp::Nodes::Nodes()=default'],['../structfp_1_1_nodes.html#ad4b4a1489e67c8b8a771747ac06ca737',1,'fp::Nodes::Nodes(std::vector< Node > data_inp)'],['../structfp_1_1_nodes.html#ae323a7bf83801c87bf2f025da5298fb2',1,'fp::Nodes::Nodes(Json const &node_dict)']]], + ['nodes_6',['nodes',['../classfp_1_1_triangulation.html#a386d52961986a595f42f286cbcd15b01',1,'fp::Triangulation']]], ['norm_7',['norm',['../classfp_1_1vec3.html#a8568d337f067bd43b63508174f047df2',1,'fp::vec3']]], ['norm_5fsquare_8',['norm_square',['../classfp_1_1vec3.html#a8f4f85470de85d92876fe2c93ea0f425',1,'fp::vec3']]], ['normalize_9',['normalize',['../classfp_1_1vec3.html#a3484a50de6cbbadfa7b04d4352410a10',1,'fp::vec3']]] diff --git a/docs/search/functions_c.js b/docs/search/functions_c.js old mode 100644 new mode 100755 index 0f1ad59..6060d77 --- a/docs/search/functions_c.js +++ b/docs/search/functions_c.js @@ -1,6 +1,6 @@ var searchData= [ - ['operator_2b_3d_0',['operator+=',['../structfp_1_1_geometry.html#af64274f242f134f791bb381ce1419753',1,'fp::Geometry']]], - ['operator_3d_3d_1',['operator==',['../structfp_1_1_node.html#a8bc7daf80f3048d114e9adfe442c5069',1,'fp::Node::operator==()'],['../classfp_1_1vec3.html#aa367e797c70bc3efd3808c492b42a7cf',1,'fp::vec3::operator==()']]], - ['operator_5b_5d_2',['operator[]',['../structfp_1_1_nodes.html#a093e30bf91fecce01cb2a963cdad6415',1,'fp::Nodes::operator[](Index node_id)'],['../structfp_1_1_nodes.html#abfaa815fd0dacc7d85fd75a011fbebdc',1,'fp::Nodes::operator[](Index node_id) const'],['../classfp_1_1_triangulation.html#a49a847019900dc667e873d9510ff402a',1,'fp::Triangulation::operator[]()'],['../classfp_1_1vec3.html#adc1be1017b046b97972b4f4ead8f5323',1,'fp::vec3::operator[](Index idx)'],['../classfp_1_1vec3.html#a7e38014f26c1b1cb52089f55f84563b3',1,'fp::vec3::operator[](Index idx) const']]] + ['operator_2b_3d_0',['operator+=',['../structfp_1_1_geometry.html#a1ad7209337ace3bfb8ca54e3c1f74e85',1,'fp::Geometry']]], + ['operator_3d_3d_1',['operator==',['../structfp_1_1_node.html#ae8fa3d1e0aacf408add48f82dec6b9d5',1,'fp::Node::operator==()'],['../classfp_1_1vec3.html#aa367e797c70bc3efd3808c492b42a7cf',1,'fp::vec3::operator==()']]], + ['operator_5b_5d_2',['operator[]',['../structfp_1_1_nodes.html#a0edc1acce52483313a3356e5d42c4f5c',1,'fp::Nodes::operator[](Index node_id)'],['../structfp_1_1_nodes.html#ae967626cf335321bd0a370d2064b79fd',1,'fp::Nodes::operator[](Index node_id) const'],['../classfp_1_1_triangulation.html#a684520ed10082be92bd0c8c5ae326724',1,'fp::Triangulation::operator[]()'],['../classfp_1_1vec3.html#adc1be1017b046b97972b4f4ead8f5323',1,'fp::vec3::operator[](Index idx)'],['../classfp_1_1vec3.html#a7e38014f26c1b1cb52089f55f84563b3',1,'fp::vec3::operator[](Index idx) const']]] ]; diff --git a/docs/search/functions_d.js b/docs/search/functions_d.js old mode 100644 new mode 100755 index 77e2323..d99a2be --- a/docs/search/functions_d.js +++ b/docs/search/functions_d.js @@ -1,7 +1,6 @@ var searchData= [ - ['partial_5fvoronoi_5farea_5fand_5fface_5fnormal_5fof_5fnode_5fin_5fa_5ftriangle_0',['partial_voronoi_area_and_face_normal_of_node_in_a_triangle',['../classfp_1_1_triangulation.html#a75e93af077cc8434bb76a1a4a39f3adf',1,'fp::Triangulation']]], - ['plus_5fone_1',['plus_one',['../structfp_1_1_neighbors.html#a59501864ac7f34bd676aa97d9faf68cc',1,'fp::Neighbors']]], - ['pop_5fnn_2',['pop_nn',['../structfp_1_1_node.html#acf3d0a7d0c7425beb820fb453c240ed3',1,'fp::Node']]], - ['pos_3',['pos',['../structfp_1_1_nodes.html#a44304df70878d39c9c55ce6cba0cec3d',1,'fp::Nodes']]] + ['plus_5fone_0',['plus_one',['../structfp_1_1_neighbors.html#aa5cd15f625ae3e2e92e5361f1c8d20bd',1,'fp::Neighbors']]], + ['pop_5fnn_1',['pop_nn',['../structfp_1_1_node.html#a6d19f21c3303cd9a02b935bf5a0a4f5e',1,'fp::Node']]], + ['previous_5fand_5fnext_5fneighbour_5fglobal_5fids_2',['previous_and_next_neighbour_global_ids',['../classfp_1_1_triangulation.html#ac9a4311a2afb3a41d08bf1216e0c52eb',1,'fp::Triangulation']]] ]; diff --git a/docs/search/functions_e.js b/docs/search/functions_e.js old mode 100644 new mode 100755 index 7010021..9b0ed80 --- a/docs/search/functions_e.js +++ b/docs/search/functions_e.js @@ -1,4 +1,4 @@ var searchData= [ - ['reset_5fkbt_0',['reset_kBT',['../classfp_1_1_monte_carlo_updater.html#a919b68a956bf4875eecab53dbc950a57',1,'fp::MonteCarloUpdater']]] + ['reset_5fkbt_0',['reset_kBT',['../classfp_1_1_monte_carlo_updater.html#a73273eb46dc52825fb2a7eed413de565',1,'fp::MonteCarloUpdater']]] ]; diff --git a/docs/search/functions_f.js b/docs/search/functions_f.js old mode 100644 new mode 100755 index 27919eb..6feaa97 --- a/docs/search/functions_f.js +++ b/docs/search/functions_f.js @@ -1,16 +1,9 @@ var searchData= [ ['scale_0',['scale',['../classfp_1_1vec3.html#ab50f5353d9f81d47a0a5b87efc7ad056',1,'fp::vec3']]], - ['scale_5fnode_5fcoordinates_1',['scale_node_coordinates',['../classfp_1_1_triangulation.html#a692685c96cd6a0cdba72b50adf3fb49b',1,'fp::Triangulation']]], - ['set_5farea_2',['set_area',['../structfp_1_1_nodes.html#ac77577ce16f2b8ff1feceb217c6853e1',1,'fp::Nodes']]], - ['set_5fcurvature_5fvec_3',['set_curvature_vec',['../structfp_1_1_nodes.html#a563539f00c190fb8fd9fedd6a27bc769',1,'fp::Nodes::set_curvature_vec(Index node_id, vec3< Real > const &new_cv)'],['../structfp_1_1_nodes.html#a535f08dde803985251f08b7f02fa043a',1,'fp::Nodes::set_curvature_vec(Index node_id, vec3< Real > &&new_cv)']]], - ['set_5fnn_5fdistance_4',['set_nn_distance',['../structfp_1_1_nodes.html#a0019211410eea70cd8a4eecad4498992',1,'fp::Nodes::set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > &&dist)'],['../structfp_1_1_nodes.html#a7152c3eab97faef371f717aa1f144a5b',1,'fp::Nodes::set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > const &dist)']]], - ['set_5fnn_5fid_5',['set_nn_id',['../structfp_1_1_nodes.html#a14a196ade9731f70eeed6446b32854ca',1,'fp::Nodes']]], - ['set_5fnn_5fids_6',['set_nn_ids',['../structfp_1_1_nodes.html#a8aa1bcb4a83a714a2abeaaae500a949a',1,'fp::Nodes']]], - ['set_5fpos_7',['set_pos',['../structfp_1_1_nodes.html#ad441e229389a483f2184c9f3ef0647f4',1,'fp::Nodes::set_pos(Index node_id, vec3< Real > const &new_pos)'],['../structfp_1_1_nodes.html#ab0d598ecd535f690a99d81dd4e717d1e',1,'fp::Nodes::set_pos(Index node_id, vec3< Real > &&new_pos)']]], - ['set_5funit_5fbending_5fenergy_8',['set_unit_bending_energy',['../structfp_1_1_nodes.html#ae4dcac75731ab83b336c27ded5df8e8d',1,'fp::Nodes']]], - ['set_5fverlet_5fradius_9',['set_verlet_radius',['../classfp_1_1_triangulation.html#a58c6d3d8705bb041d4114e88bfd32b71',1,'fp::Triangulation']]], - ['set_5fvolume_10',['set_volume',['../structfp_1_1_nodes.html#a4431ab5e1cf3dbc768558ae5b9132bef',1,'fp::Nodes']]], - ['size_11',['size',['../structfp_1_1_nodes.html#a00b3ff9ae4af9a804478d246a0c8c7a1',1,'fp::Nodes::size()'],['../classfp_1_1_triangulation.html#a6622782e18f9333c65cfc2403d8a5bfe',1,'fp::Triangulation::size()'],['../classfp_1_1vec3.html#a19f1aaf1e61b599d434aaa89e0e58351',1,'fp::vec3::size() const']]], - ['subtract_12',['subtract',['../classfp_1_1vec3.html#a61388588fcc141bd691b0c1c25e201a2',1,'fp::vec3']]] + ['scale_5fnode_5fcoordinates_1',['scale_node_coordinates',['../classfp_1_1_triangulation.html#aa3c8d5e088c1c876e8031aced9a1493c',1,'fp::Triangulation']]], + ['set_5fnn_5fdistance_2',['set_nn_distance',['../structfp_1_1_nodes.html#a173a6dd148343b6c4ebfa33349c8429d',1,'fp::Nodes::set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > &&dist)'],['../structfp_1_1_nodes.html#aa01e86f1e81e916acbcc63b4248f74a8',1,'fp::Nodes::set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > const &dist)']]], + ['set_5fverlet_5fradius_3',['set_verlet_radius',['../classfp_1_1_triangulation.html#a58c6d3d8705bb041d4114e88bfd32b71',1,'fp::Triangulation']]], + ['size_4',['size',['../structfp_1_1_nodes.html#a6eca1b76638e0a84bbd2bf4a031da3ab',1,'fp::Nodes::size()'],['../classfp_1_1_triangulation.html#a66275f647ea355aa64086353310a7ba9',1,'fp::Triangulation::size()'],['../classfp_1_1vec3.html#a19f1aaf1e61b599d434aaa89e0e58351',1,'fp::vec3::size() const']]], + ['subtract_5',['subtract',['../classfp_1_1vec3.html#a61388588fcc141bd691b0c1c25e201a2',1,'fp::vec3']]] ]; diff --git a/docs/search/groups_0.js b/docs/search/groups_0.js old mode 100644 new mode 100755 diff --git a/docs/search/groups_1.js b/docs/search/groups_1.js old mode 100644 new mode 100755 diff --git a/docs/search/groups_2.js b/docs/search/groups_2.js old mode 100644 new mode 100755 diff --git a/docs/search/groups_3.js b/docs/search/groups_3.js old mode 100644 new mode 100755 diff --git a/docs/search/groups_4.js b/docs/search/groups_4.js old mode 100644 new mode 100755 diff --git a/docs/search/groups_5.js b/docs/search/groups_5.js old mode 100644 new mode 100755 diff --git a/docs/search/mag.svg b/docs/search/mag.svg old mode 100644 new mode 100755 diff --git a/docs/search/mag_d.svg b/docs/search/mag_d.svg old mode 100644 new mode 100755 diff --git a/docs/search/mag_sel.svg b/docs/search/mag_sel.svg old mode 100644 new mode 100755 diff --git a/docs/search/mag_seld.svg b/docs/search/mag_seld.svg old mode 100644 new mode 100755 diff --git a/docs/search/namespaces_0.js b/docs/search/namespaces_0.js old mode 100644 new mode 100755 diff --git a/docs/search/pages_0.js b/docs/search/pages_0.js old mode 100644 new mode 100755 diff --git a/docs/search/pages_1.js b/docs/search/pages_1.js old mode 100644 new mode 100755 diff --git a/docs/search/related_0.js b/docs/search/related_0.js old mode 100644 new mode 100755 index a2b16b3..9d8e5b1 --- a/docs/search/related_0.js +++ b/docs/search/related_0.js @@ -1,11 +1,11 @@ var searchData= [ ['operator_2a_0',['operator*',['../classfp_1_1vec3.html#aae0a63764676c772cd8ed6c3cc0aef38',1,'fp::vec3::operator*'],['../classfp_1_1vec3.html#a58c98b07b3903857039bbcfcf390b037',1,'fp::vec3::operator*']]], - ['operator_2b_1',['operator+',['../structfp_1_1_geometry.html#a1ae896003b13c5f110116085a2658471',1,'fp::Geometry::operator+'],['../classfp_1_1vec3.html#ad3792f8349787c827e4f5b66b0e62156',1,'fp::vec3::operator+']]], - ['operator_2b_3d_2',['operator+=',['../structfp_1_1_geometry.html#a7d19899dde91a5b7b30635de7b321dd9',1,'fp::Geometry::operator+='],['../classfp_1_1vec3.html#a86a997aa250e63ef9b0e106bffab6368',1,'fp::vec3::operator+=']]], - ['operator_2d_3',['operator-',['../structfp_1_1_geometry.html#ad1551fc47c469d47625068d5424a2cef',1,'fp::Geometry::operator-'],['../classfp_1_1vec3.html#a40d3452bbc375c85aedba29afe4697f2',1,'fp::vec3::operator-'],['../classfp_1_1vec3.html#ac3763454def892f79476dad1079adb18',1,'fp::vec3::operator-'],['../classfp_1_1vec3.html#adaf7d3b941eeaa8bc1bb3ee5dd865552',1,'fp::vec3::operator-']]], - ['operator_2d_3d_4',['operator-=',['../structfp_1_1_geometry.html#ad54e751bccf6ae11d4af543ef6a23c23',1,'fp::Geometry::operator-='],['../classfp_1_1vec3.html#ae9b219ccba98f5d12db4f50da6970459',1,'fp::vec3::operator-=']]], + ['operator_2b_1',['operator+',['../structfp_1_1_geometry.html#acfea07971d44f8daf22bfc023f49b2a3',1,'fp::Geometry::operator+'],['../classfp_1_1vec3.html#ad3792f8349787c827e4f5b66b0e62156',1,'fp::vec3::operator+']]], + ['operator_2b_3d_2',['operator+=',['../structfp_1_1_geometry.html#ac692b9c2c5ebc614b36fb9771a07e773',1,'fp::Geometry::operator+='],['../classfp_1_1vec3.html#a86a997aa250e63ef9b0e106bffab6368',1,'fp::vec3::operator+=']]], + ['operator_2d_3',['operator-',['../structfp_1_1_geometry.html#a3714cc223f61f406d01becb91cab6ab9',1,'fp::Geometry::operator-'],['../classfp_1_1vec3.html#a40d3452bbc375c85aedba29afe4697f2',1,'fp::vec3::operator-'],['../classfp_1_1vec3.html#ac3763454def892f79476dad1079adb18',1,'fp::vec3::operator-']]], + ['operator_2d_3d_4',['operator-=',['../structfp_1_1_geometry.html#a768de5f3d63132e0be2ad65c3840c8bc',1,'fp::Geometry::operator-='],['../classfp_1_1vec3.html#ae9b219ccba98f5d12db4f50da6970459',1,'fp::vec3::operator-=']]], ['operator_2f_5',['operator/',['../classfp_1_1vec3.html#a8d8ccff0006cc4699a6773e85de7e4cb',1,'fp::vec3']]], ['operator_2f_3d_6',['operator/=',['../classfp_1_1vec3.html#a34315674ec0ce3613c42ca5c9ec82c6f',1,'fp::vec3']]], - ['operator_3c_3c_7',['operator<<',['../structfp_1_1_node.html#ac8b3254d4da11f9069ce0cbc28aa0288',1,'fp::Node::operator<<'],['../classfp_1_1vec3.html#ac70e0b9511e58cb1dc2b0e327aacf70d',1,'fp::vec3::operator<<']]] + ['operator_3c_3c_7',['operator<<',['../structfp_1_1_node.html#ad876a0744710232bd15fa8a1365ed8c8',1,'fp::Node::operator<<'],['../classfp_1_1vec3.html#ac70e0b9511e58cb1dc2b0e327aacf70d',1,'fp::vec3::operator<<']]] ]; diff --git a/docs/search/search.css b/docs/search/search.css old mode 100644 new mode 100755 diff --git a/docs/search/search.js b/docs/search/search.js old mode 100644 new mode 100755 index 6fd40c6..666af01 --- a/docs/search/search.js +++ b/docs/search/search.js @@ -22,58 +22,9 @@ @licend The above is the entire license notice for the JavaScript code in this file */ -function convertToId(search) -{ - var result = ''; - for (i=0;i document.getElementById("MSearchField"); + this.DOMSearchSelect = () => document.getElementById("MSearchSelect"); + this.DOMSearchSelectWindow = () => document.getElementById("MSearchSelectWindow"); + this.DOMPopupSearchResults = () => document.getElementById("MSearchResults"); + this.DOMPopupSearchResultsWindow = () => document.getElementById("MSearchResultsWindow"); + this.DOMSearchClose = () => document.getElementById("MSearchClose"); + this.DOMSearchBox = () => document.getElementById("MSearchBox"); // ------------ Event Handlers // Called when focus is added or removed from the search field. - this.OnSearchFieldFocus = function(isActive) - { + this.OnSearchFieldFocus = function(isActive) { this.Activate(isActive); } - this.OnSearchSelectShow = function() - { - var searchSelectWindow = this.DOMSearchSelectWindow(); - var searchField = this.DOMSearchSelect(); + this.OnSearchSelectShow = function() { + const searchSelectWindow = this.DOMSearchSelectWindow(); + const searchField = this.DOMSearchSelect(); - var left = getXPos(searchField); - var top = getYPos(searchField); - top += searchField.offsetHeight; + const left = getXPos(searchField); + const top = getYPos(searchField) + searchField.offsetHeight; // show search selection popup searchSelectWindow.style.display='block'; @@ -146,55 +102,43 @@ function SearchBox(name, resultsPath, extension) searchSelectWindow.style.top = top + 'px'; // stop selection hide timer - if (this.hideTimeout) - { + if (this.hideTimeout) { clearTimeout(this.hideTimeout); this.hideTimeout=0; } return false; // to avoid "image drag" default event } - this.OnSearchSelectHide = function() - { + this.OnSearchSelectHide = function() { this.hideTimeout = setTimeout(this.CloseSelectionWindow.bind(this), this.closeSelectionTimeout); } // Called when the content of the search field is changed. - this.OnSearchFieldChange = function(evt) - { - if (this.keyTimeout) // kill running timer - { + this.OnSearchFieldChange = function(evt) { + if (this.keyTimeout) { // kill running timer clearTimeout(this.keyTimeout); this.keyTimeout = 0; } - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==40 || e.keyCode==13) - { - if (e.shiftKey==1) - { + const e = evt ? evt : window.event; // for IE + if (e.keyCode==40 || e.keyCode==13) { + if (e.shiftKey==1) { this.OnSearchSelectShow(); - var win=this.DOMSearchSelectWindow(); - for (i=0;i do a search - { + const searchValue = this.DOMSearchField().value.replace(/ +/g, ""); + if (searchValue!="" && this.searchActive) { // something was found -> do a search this.Search(); } } - this.OnSearchSelectKey = function(evt) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==40 && this.searchIndex0) // Up - { + } else if (e.keyCode==38 && this.searchIndex>0) { // Up this.searchIndex--; this.OnSelectItem(this.searchIndex); - } - else if (e.keyCode==13 || e.keyCode==27) - { + } else if (e.keyCode==13 || e.keyCode==27) { e.stopPropagation(); this.OnSelectItem(this.searchIndex); this.CloseSelectionWindow(); @@ -301,82 +239,75 @@ function SearchBox(name, resultsPath, extension) // --------- Actions // Closes the results window. - this.CloseResultsWindow = function() - { + this.CloseResultsWindow = function() { this.DOMPopupSearchResultsWindow().style.display = 'none'; this.DOMSearchClose().style.display = 'none'; this.Activate(false); } - this.CloseSelectionWindow = function() - { + this.CloseSelectionWindow = function() { this.DOMSearchSelectWindow().style.display = 'none'; } // Performs a search. - this.Search = function() - { + this.Search = function() { this.keyTimeout = 0; // strip leading whitespace - var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + const searchValue = this.DOMSearchField().value.replace(/^ +/, ""); - var code = searchValue.toLowerCase().charCodeAt(0); - var idxChar = searchValue.substr(0, 1).toLowerCase(); - if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair - { + const code = searchValue.toLowerCase().charCodeAt(0); + let idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) { // surrogate pair idxChar = searchValue.substr(0, 2); } - var jsFile; - - var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); - if (idx!=-1) - { - var hexCode=idx.toString(16); - jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js'; + let jsFile; + let idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) { + const hexCode=idx.toString(16); + jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js'; } - var loadJS = function(url, impl, loc){ - var scriptTag = document.createElement('script'); + const loadJS = function(url, impl, loc) { + const scriptTag = document.createElement('script'); scriptTag.src = url; scriptTag.onload = impl; scriptTag.onreadystatechange = impl; loc.appendChild(scriptTag); } - var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); - var domSearchBox = this.DOMSearchBox(); - var domPopupSearchResults = this.DOMPopupSearchResults(); - var domSearchClose = this.DOMSearchClose(); - var resultsPath = this.resultsPath; + const domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + const domSearchBox = this.DOMSearchBox(); + const domPopupSearchResults = this.DOMPopupSearchResults(); + const domSearchClose = this.DOMSearchClose(); + const resultsPath = this.resultsPath; - var handleResults = function() { + const handleResults = function() { document.getElementById("Loading").style.display="none"; if (typeof searchData !== 'undefined') { createResults(resultsPath); document.getElementById("NoMatches").style.display="none"; } - + if (idx!=-1) { searchResults.Search(searchValue); } else { // no file with search results => force empty search results searchResults.Search('===='); } - if (domPopupSearchResultsWindow.style.display!='block') - { + if (domPopupSearchResultsWindow.style.display!='block') { domSearchClose.style.display = 'inline-block'; - var left = getXPos(domSearchBox) + 150; - var top = getYPos(domSearchBox) + 20; + let left = getXPos(domSearchBox) + 150; + let top = getYPos(domSearchBox) + 20; domPopupSearchResultsWindow.style.display = 'block'; left -= domPopupSearchResults.offsetWidth; - var maxWidth = document.body.clientWidth; - var maxHeight = document.body.clientHeight; - var width = 300; + const maxWidth = document.body.clientWidth; + const maxHeight = document.body.clientHeight; + let width = 300; if (left<10) left=10; if (width+left+8>maxWidth) width=maxWidth-left-8; - var height = 400; + let height = 400; if (height+top+8>maxHeight) height=maxHeight-top-8; domPopupSearchResultsWindow.style.top = top + 'px'; domPopupSearchResultsWindow.style.left = left + 'px'; @@ -398,17 +329,13 @@ function SearchBox(name, resultsPath, extension) // Activates or deactivates the search panel, resetting things to // their default values if necessary. - this.Activate = function(isActive) - { + this.Activate = function(isActive) { if (isActive || // open it - this.DOMPopupSearchResultsWindow().style.display == 'block' - ) - { + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) { this.DOMSearchBox().className = 'MSearchBoxActive'; this.searchActive = true; - } - else if (!isActive) // directly remove the panel - { + } else if (!isActive) { // directly remove the panel this.DOMSearchBox().className = 'MSearchBoxInactive'; this.searchActive = false; this.lastSearchValue = '' @@ -421,409 +348,333 @@ function SearchBox(name, resultsPath, extension) // ----------------------------------------------------------------------- // The class that handles everything on the search results page. -function SearchResults(name) -{ - // The number of matches from the last run of . - this.lastMatchCount = 0; - this.lastKey = 0; - this.repeatOn = false; - - // Toggles the visibility of the passed element ID. - this.FindChildElement = function(id) - { - var parentElement = document.getElementById(id); - var element = parentElement.firstChild; - - while (element && element!=parentElement) - { - if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') - { - return element; - } +function SearchResults() { + + function convertToId(search) { + let result = ''; + for (let i=0;i. + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; - if (element && element!=parentElement) - { - element = element.nextSibling; - } - } + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) { + const parentElement = document.getElementById(id); + let element = parentElement.firstChild; + + while (element && element!=parentElement) { + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') { + return element; } - } - this.Toggle = function(id) - { - var element = this.FindChildElement(id); - if (element) - { - if (element.style.display == 'block') - { - element.style.display = 'none'; + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) { + element = element.firstChild; + } else if (element.nextSibling) { + element = element.nextSibling; + } else { + do { + element = element.parentNode; } - else - { - element.style.display = 'block'; + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) { + element = element.nextSibling; } } } + } - // Searches for the passed string. If there is no parameter, - // it takes it from the URL query. - // - // Always returns true, since other documents may try to call it - // and that may or may not be possible. - this.Search = function(search) - { - if (!search) // get search word from URL - { - search = window.location.search; - search = search.substring(1); // Remove the leading '?' - search = unescape(search); - } - - search = search.replace(/^ +/, ""); // strip leading spaces - search = search.replace(/ +$/, ""); // strip trailing spaces - search = search.toLowerCase(); - search = convertToId(search); - - var resultRows = document.getElementsByTagName("div"); - var matches = 0; - - var i = 0; - while (i < resultRows.length) - { - var row = resultRows.item(i); - if (row.className == "SRResult") - { - var rowMatchName = row.id.toLowerCase(); - rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' - - if (search.length<=rowMatchName.length && - rowMatchName.substr(0, search.length)==search) - { - row.style.display = 'block'; - matches++; - } - else - { - row.style.display = 'none'; - } - } - i++; - } - document.getElementById("Searching").style.display='none'; - if (matches == 0) // no results - { - document.getElementById("NoMatches").style.display='block'; - } - else // at least one result - { - document.getElementById("NoMatches").style.display='none'; + this.Toggle = function(id) { + const element = this.FindChildElement(id); + if (element) { + if (element.style.display == 'block') { + element.style.display = 'none'; + } else { + element.style.display = 'block'; } - this.lastMatchCount = matches; - return true; } + } - // return the first item with index index or higher that is visible - this.NavNext = function(index) - { - var focusItem; - while (1) - { - var focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') - { - break; - } - else if (!focusItem) // last element - { - break; + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) { + if (!search) { // get search word from URL + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + const resultRows = document.getElementsByTagName("div"); + let matches = 0; + + let i = 0; + while (i < resultRows.length) { + const row = resultRows.item(i); + if (row.className == "SRResult") { + let rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) { + row.style.display = 'block'; + matches++; + } else { + row.style.display = 'none'; } - focusItem=null; - index++; } - return focusItem; + i++; } + document.getElementById("Searching").style.display='none'; + if (matches == 0) { // no results + document.getElementById("NoMatches").style.display='block'; + } else { // at least one result + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } - this.NavPrev = function(index) - { - var focusItem; - while (1) - { - var focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') - { - break; - } - else if (!focusItem) // last element - { - break; - } - focusItem=null; - index--; + // return the first item with index index or higher that is visible + this.NavNext = function(index) { + let focusItem; + for (;;) { + const focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { + break; + } else if (!focusItem) { // last element + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) { + let focusItem; + for (;;) { + const focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { + break; + } else if (!focusItem) { // last element + break; } - return focusItem; + focusItem=null; + index--; } + return focusItem; + } - this.ProcessKeys = function(e) - { - if (e.type == "keydown") - { - this.repeatOn = false; - this.lastKey = e.keyCode; - } - else if (e.type == "keypress") - { - if (!this.repeatOn) - { - if (this.lastKey) this.repeatOn = true; - return false; // ignore first keypress after keydown - } - } - else if (e.type == "keyup") - { - this.lastKey = 0; - this.repeatOn = false; + this.ProcessKeys = function(e) { + if (e.type == "keydown") { + this.repeatOn = false; + this.lastKey = e.keyCode; + } else if (e.type == "keypress") { + if (!this.repeatOn) { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown } - return this.lastKey!=0; + } else if (e.type == "keyup") { + this.lastKey = 0; + this.repeatOn = false; } + return this.lastKey!=0; + } - this.Nav = function(evt,itemIndex) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) // Up - { - var newIndex = itemIndex-1; - var focusItem = this.NavPrev(newIndex); - if (focusItem) - { - var child = this.FindChildElement(focusItem.parentNode.parentNode.id); - if (child && child.style.display == 'block') // children visible - { - var n=0; - var tmpElem; - while (1) // search for last child - { - tmpElem = document.getElementById('Item'+newIndex+'_c'+n); - if (tmpElem) - { - focusItem = tmpElem; - } - else // found it! - { - break; - } - n++; + this.Nav = function(evt,itemIndex) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) { // Up + const newIndex = itemIndex-1; + let focusItem = this.NavPrev(newIndex); + if (focusItem) { + let child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') { // children visible + let n=0; + let tmpElem; + for (;;) { // search for last child + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) { + focusItem = tmpElem; + } else { // found it! + break; } + n++; } } - if (focusItem) - { - focusItem.focus(); - } - else // return focus to search field - { - document.getElementById("MSearchField").focus(); - } - } - else if (this.lastKey==40) // Down - { - var newIndex = itemIndex+1; - var focusItem; - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem && elem.style.display == 'block') // children visible - { - focusItem = document.getElementById('Item'+itemIndex+'_c0'); - } - if (!focusItem) focusItem = this.NavNext(newIndex); - if (focusItem) focusItem.focus(); - } - else if (this.lastKey==39) // Right - { - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'block'; - } - else if (this.lastKey==37) // Left - { - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'none'; } - else if (this.lastKey==27) // Escape - { - e.stopPropagation(); - searchBox.CloseResultsWindow(); + if (focusItem) { + focusItem.focus(); + } else { // return focus to search field document.getElementById("MSearchField").focus(); } - else if (this.lastKey==13) // Enter - { - return true; - } - return false; + } else if (this.lastKey==40) { // Down + const newIndex = itemIndex+1; + let focusItem; + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') { // children visible + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } else if (this.lastKey==39) { // Right + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } else if (this.lastKey==37) { // Left + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } else if (this.lastKey==27) { // Escape + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } else if (this.lastKey==13) { // Enter + return true; } + return false; + } - this.NavChild = function(evt,itemIndex,childIndex) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) // Up - { - if (childIndex>0) - { - var newIndex = childIndex-1; - document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); - } - else // already at first child, jump to parent - { - document.getElementById('Item'+itemIndex).focus(); - } + this.NavChild = function(evt,itemIndex,childIndex) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) { // Up + if (childIndex>0) { + const newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } else { // already at first child, jump to parent + document.getElementById('Item'+itemIndex).focus(); } - else if (this.lastKey==40) // Down - { - var newIndex = childIndex+1; - var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); - if (!elem) // last child, jump to parent next parent - { - elem = this.NavNext(itemIndex+1); - } - if (elem) - { - elem.focus(); - } + } else if (this.lastKey==40) { // Down + const newIndex = childIndex+1; + let elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) { // last child, jump to parent next parent + elem = this.NavNext(itemIndex+1); } - else if (this.lastKey==27) // Escape - { - e.stopPropagation(); - searchBox.CloseResultsWindow(); - document.getElementById("MSearchField").focus(); + if (elem) { + elem.focus(); } - else if (this.lastKey==13) // Enter - { - return true; - } - return false; + } else if (this.lastKey==27) { // Escape + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } else if (this.lastKey==13) { // Enter + return true; } + return false; + } } -function setKeyActions(elem,action) -{ - elem.setAttribute('onkeydown',action); - elem.setAttribute('onkeypress',action); - elem.setAttribute('onkeyup',action); -} +function createResults(resultsPath) { -function setClassAttr(elem,attr) -{ - elem.setAttribute('class',attr); - elem.setAttribute('className',attr); -} + function setKeyActions(elem,action) { + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); + } + + function setClassAttr(elem,attr) { + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); + } -function createResults(resultsPath) -{ - var results = document.getElementById("SRResults"); + const results = document.getElementById("SRResults"); results.innerHTML = ''; - for (var e=0; e { + const id = elem[0]; + const srResult = document.createElement('div'); srResult.setAttribute('id','SR_'+id); setClassAttr(srResult,'SRResult'); - var srEntry = document.createElement('div'); + const srEntry = document.createElement('div'); setClassAttr(srEntry,'SREntry'); - var srLink = document.createElement('a'); - srLink.setAttribute('id','Item'+e); - setKeyActions(srLink,'return searchResults.Nav(event,'+e+')'); + const srLink = document.createElement('a'); + srLink.setAttribute('id','Item'+index); + setKeyActions(srLink,'return searchResults.Nav(event,'+index+')'); setClassAttr(srLink,'SRSymbol'); - srLink.innerHTML = searchData[e][1][0]; + srLink.innerHTML = elem[1][0]; srEntry.appendChild(srLink); - if (searchData[e][1].length==2) // single result - { - srLink.setAttribute('href',resultsPath+searchData[e][1][1][0]); + if (elem[1].length==2) { // single result + srLink.setAttribute('href',resultsPath+elem[1][1][0]); srLink.setAttribute('onclick','searchBox.CloseResultsWindow()'); - if (searchData[e][1][1][1]) - { + if (elem[1][1][1]) { srLink.setAttribute('target','_parent'); - } - else - { + } else { srLink.setAttribute('target','_blank'); } - var srScope = document.createElement('span'); + const srScope = document.createElement('span'); setClassAttr(srScope,'SRScope'); - srScope.innerHTML = searchData[e][1][1][2]; + srScope.innerHTML = elem[1][1][2]; srEntry.appendChild(srScope); - } - else // multiple results - { + } else { // multiple results srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")'); - var srChildren = document.createElement('div'); + const srChildren = document.createElement('div'); setClassAttr(srChildren,'SRChildren'); - for (var c=0; c + + + + + + +flippy: flippy/utilities/sim_utils.hpp Source File + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
sim_utils.hpp
+
+
+
1#ifndef FLIPPY_SIM_UTILS_H
+
2#define FLIPPY_SIM_UTILS_H
+
3#include <custom_concepts.hpp>
+
4#include <random>
+
5#include <optional>
+
6#include <Nodes.hpp>
+
7#include <vec3.hpp>
+
8
+
9namespace fp{
+
10
+
11 [[maybe_unused]] [[nodiscard]] static Real sphere_vol(Real R){return (4._r/3._r)* PI *R*R*R;}
+
12 [[maybe_unused]] [[nodiscard]] static Real sphere_area(Real R){return 4._r * PI *R*R;}
+
13
+
14 [[maybe_unused]] [[nodiscard]] static Real linear_adaptation(Real x, Real x_init, Real x_fin,
+
15 Real val_init, Real val_fin)
+
16 {
+
17 if (x <= x_init) { return val_init; }
+
18 if (x > x_fin) { return val_fin; }
+
19// if (std::abs(x_fin-x_init)<0.001){return val_init;}
+
20 return val_init + (val_fin-val_init)/(x_fin-x_init)*(x-x_init);
+
21 }
+
22
+
23 [[maybe_unused]] [[nodiscard]] static Index steps_for_fixed_speed_adaptation(Real x_init, Real val_init, Real val_fin, Real delta_val)
+
24 {
+
25 return static_cast<Index>(std::ceil((val_fin-val_init)/delta_val + x_init));
+
26 }
+
27
+
+
29 [[maybe_unused]] [[nodiscard]] static Real min_radius_with_non_overlapping_beads(Real min_allowed_distance_between_bead_centers, Index sub_triangulation_iteration_count){
+
30 Real l_min = min_allowed_distance_between_bead_centers;
+
31 Real n = static_cast<Real>(sub_triangulation_iteration_count);
+
32
+
33 return l_min / (2_r * std::sin(std::asin(1_r / (2_r * std::sin(2_r * PI / 5_r ))) / (n + 1_r)));
+
34 }
+
+
35
+
+ +
37 Real d0_;
+
38 Real delta_d_;
+
39 Real p_target_;
+
40 Real p_accum_{static_cast<Real>(0.f)};
+
41 Real p_count_{static_cast<Real>(1.f)};
+
42
+
43 Real prob(std::optional<Real> e_diff, Real kBT){ return (e_diff.has_value()?std::min(std::exp(e_diff.value()/kBT),1_r):0_r); }
+
44
+
45 public:
+
46 DynamicDisplacementUpdater(Real initial_displacement, Real displacement_adaptation_step_size, Real p_target)
+
47 : d0_(initial_displacement), delta_d_(displacement_adaptation_step_size), p_target_(p_target) { }
+
48
+
49 Real new_displacement_magnitude(){
+
50 Real p = p_accum_/p_count_;
+
51 p_accum_ = static_cast<Real>(0.f);
+
52 p_count_ = static_cast<Real>(1.f);
+
53 Real dp = p - p_target_;
+
54 d0_ = d0_ + 0.5f*dp*delta_d_*d0_;
+
55 return d0_;
+
56 }
+
57
+
58 std::uniform_real_distribution<Real> new_displ_distr(){
+
59 Real linear_displ = new_displacement_magnitude();
+
60 return std::uniform_real_distribution<Real>(-linear_displ, linear_displ);
+
61 }
+
62
+
63 void probability_aggregator(std::optional<Real> e_diff, Real kBt){
+
64 p_accum_ += prob(e_diff, kBt);
+
65 p_count_ += static_cast<Real>(1.);
+
66 }
+
67
+
68 void reset_target_acceptance_probability(Real p_target){ p_target_ = p_target; }
+
69 [[nodiscard]] Real target_acceptance_probability() const { return p_target_; }
+
70
+
71
+
72 };
+
+
73
+
+
74 [[maybe_unused]] [[nodiscard]] static Real node_curvature_squared(Node const& node){
+
76
+
87 const vec3<Real> K = node.curvature_vec;
+
88 const Real C2 = K.norm_square();
+
89
+
90 return C2;
+
91 }
+
+
92
+
+
93 [[maybe_unused]] [[nodiscard]] static Real node_unit_bending_energy(Node const& node){
+
95
+
106 const vec3<Real> K = node.curvature_vec;
+
107 const Real A = node.area;
+
108 const Real e = static_cast<Real>(0.5)*A*K.norm_square();
+
109
+
110 return e;
+
111 }
+
+
112
+
113 [[maybe_unused]] [[nodiscard]] static Real changed_neighborhood_bending_energy(Node const& node,
+
114 fp::Nodes const& nodes,
+
115 std::vector<Index>const& changed_neighborhood) {
+
116 fp::Real eb = fp::node_unit_bending_energy(node);
+
117
+
118 for (auto node_id: changed_neighborhood) { eb += fp::node_unit_bending_energy(nodes[node_id]); }
+
119 return eb;
+
120 }
+
121
+
122 namespace TrgMath{
+
123
+
124
+
125 [[maybe_unused]] static Real cot_between_vectors(vec3<Real> const& v1, vec3<Real> const& v2)
+
126 {
+
127 return v1.dot(v2)/(v1.cross(v2).norm());
+
128 };
+
129
+
130//
+
131// /**
+
132// * given a node `i` and its neighbor `j`, they will share two common neighbor nodes, `p` and `m`.
+
133// * This function finds the angles at `p` & `m` opposite of `i-j` link.
+
134// * This function implements the cot(alpha_ij) + cot(beta_ij) from fig. (6c) from [.
+
135// * The order of these neighbors does not matter for the correct sign of the angles.
+
136// * @param node_id @NodeIDStub
+
137// * @param nn_id @NNIDStub
+
138// * @param cnn_0 common neighbor node 0
+
139// * @param cnn_1 common neighbor node 1
+
140// * @return cot(alpha_ij_jm1) + cot(alpha_ij_jp1)
+
141// */
+
142// static Real cot_alphas_sum(Node const& node, Node const& nn, Node const& cnn_0, Node const& cnn_1)
+
143// {
+
144//
+
145// vec3<Real> l0_ = node.pos - cnn_0.pos;
+
146// vec3<Real> l1_ = nn.pos - cnn_0.pos;
+
147//
+
148// Real cot_sum = cot_between_vectors(l0_, l1_);
+
149// l0_ = node.pos - cnn_1.pos;
+
150// l1_ = nn.pos - cnn_1.pos;
+
151//
+
152// cot_sum += cot_between_vectors(l0_, l1_);
+
153// return cot_sum;
+
154// }
+
155 }
+
156}
+
157
+
158
+
159#endif
+
This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node o...
+
Definition sim_utils.hpp:36
+
Internal implementation of a 3D vector.
Definition vec3.hpp:43
+
Real norm_square() const
Returns the square of the norm of the vector.
Definition vec3.hpp:175
+
This file contains the concepts that are costomly defined for the flippy class templates.
+
Definition custom_concepts.hpp:8
+
static Real min_radius_with_non_overlapping_beads(Real min_allowed_distance_between_bead_centers, Index sub_triangulation_iteration_count)
N_node=12+30*n+20*n*(n-1)/2 where n is the same as sub_triangulation_iteration_count.
Definition sim_utils.hpp:29
+
static Real node_curvature_squared(Node const &node)
Definition sim_utils.hpp:74
+
static Real node_unit_bending_energy(Node const &node)
Definition sim_utils.hpp:93
+
A data structure containing all geometric and topological information associated with a node.
Definition Nodes.hpp:30
+
Real area
Voronoi area associated with the node.
Definition Nodes.hpp:45
+
vec3< Real > curvature_vec
Curvature vector of the node.
Definition Nodes.hpp:71
+
Data structure containing all nodes of the Triangulation.
Definition Nodes.hpp:225
+
Header file containing the definition and implementation a 3 dimensional vector class,...
+
+
+ + + + diff --git a/docs/splitbar.png b/docs/splitbar.png old mode 100644 new mode 100755 diff --git a/docs/splitbard.png b/docs/splitbard.png old mode 100644 new mode 100755 diff --git a/docs/stl_serializer_8hpp_source.html b/docs/stl_serializer_8hpp_source.html old mode 100644 new mode 100755 index 9035ad6..93836db --- a/docs/stl_serializer_8hpp_source.html +++ b/docs/stl_serializer_8hpp_source.html @@ -3,16 +3,18 @@ - + flippy: flippy/stlSerializer.hpp Source File + - + + @@ -43,28 +45,28 @@ - + + -
@@ -115,8 +117,7 @@
6#include "vec3.hpp"
7
8
-
- +
9namespace fp::implementation {
11 float normal[3]{};
@@ -157,7 +158,7 @@
43 inp.read(reinterpret_cast<char *>(&solid.num_triangles), sizeof(rawSTLSolid::num_triangles));
44 std::vector<rawSTLTriangle> triangles;
45 triangles.reserve(solid.num_triangles);
-
46 std::cout << "loading STL solid with: " << solid.num_triangles << " triangles'\n";
+
46// std::cout << "loading STL solid with: " << solid.num_triangles << " triangles'\n";
47 for (uint32_t i = 0; i < solid.num_triangles; ++i) {
48 triangles.push_back(loadSTLTriangle(inp));
49 }
@@ -265,14 +266,13 @@
146
147}
-
148
149#endif //FLIPPY_HPP_STLSERIALIZER_HPP
Definition stlSerializer.hpp:123
Definition stlSerializer.hpp:66
Internal implementation of a 3D vector.
Definition vec3.hpp:43
vec3< Real > const & normalize()
Normalize the vector in place. And return a reference to the new normalized vector.
Definition vec3.hpp:184
-
Definition stlSerializer.hpp:9
+
Definition custom_concepts.hpp:38
Definition stlSerializer.hpp:19
Definition stlSerializer.hpp:10
Definition stlSerializer.hpp:55
@@ -283,7 +283,7 @@ diff --git a/docs/structfp_1_1_bond_flip_data-members.html b/docs/structfp_1_1_bond_flip_data-members.html old mode 100644 new mode 100755 index 37a61d1..30e3feb --- a/docs/structfp_1_1_bond_flip_data-members.html +++ b/docs/structfp_1_1_bond_flip_data-members.html @@ -3,16 +3,18 @@ - + flippy: Member List + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -99,21 +106,21 @@
-
fp::BondFlipData< Index > Member List
+
fp::BondFlipData Member List
-

This is the complete list of members for fp::BondFlipData< Index >, including all inherited members.

+

This is the complete list of members for fp::BondFlipData, including all inherited members.

- - - + + +
common_nn_0fp::BondFlipData< Index >
common_nn_1fp::BondFlipData< Index >
flippedfp::BondFlipData< Index >
common_nn_0fp::BondFlipData
common_nn_1fp::BondFlipData
flippedfp::BondFlipData
diff --git a/docs/structfp_1_1_bond_flip_data.html b/docs/structfp_1_1_bond_flip_data.html old mode 100644 new mode 100755 index 232b1c5..4f4b76e --- a/docs/structfp_1_1_bond_flip_data.html +++ b/docs/structfp_1_1_bond_flip_data.html @@ -3,16 +3,18 @@ - + -flippy: fp::BondFlipData< Index > Struct Template Reference +flippy: fp::BondFlipData Struct Reference + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
@@ -102,62 +109,67 @@ -
fp::BondFlipData< Index > Struct Template Reference
+
fp::BondFlipData Struct Reference

A helper struct; keeps track of bond flips. - More...

+ More...

#include <Triangulation.hpp>

-Collaboration diagram for fp::BondFlipData< Index >:
+Collaboration diagram for fp::BondFlipData:
-
Collaboration graph
+
Collaboration graph
+ + + + + + +
[legend]
- - - - - - - - - + + + + + + + + +

Public Attributes

-bool flipped = false
 track if the bond was flipped.
 
-Index common_nn_0 = static_cast<Index>(VERY_LARGE_NUMBER_)
 Global id of a node that is supposed to receive a bond after a flip.
 
-Index common_nn_1 = static_cast<Index>(VERY_LARGE_NUMBER_)
 Global id of a node that is supposed to receive a bond after a flip.
 
+bool flipped = false
 track if the bond was flipped.
 
+Index common_nn_0 = VERY_LARGE_NUMBER_
 Global id of a node that is supposed to receive a bond after a flip.
 
+Index common_nn_1 = VERY_LARGE_NUMBER_
 Global id of a node that is supposed to receive a bond after a flip.
 

Detailed Description

-
template<indexing_number Index>
-struct fp::BondFlipData< Index >

A helper struct; keeps track of bond flips.

-

A bond flip can be unsuccessful, e.g., if the requested two nodes that are donating an edge already have too few edges (more details on bond flips and how they can fail are provided in the Triangulation.flip_bond(Index, Index, Real, Real) function). If the flip does happen, then flipped will be changed to true by the Triangulation.flip_bond(Index, Index, Real, Real) function and common_nn_0 and common_nn_1 will record the ids of nodes that receive new common bond. If the flip does not happen then the common_nn_0 and common_nn_1 data members will hold a VERY_LARGE_NUMBER_ with which they were initiated.

-

The initiation with VERY_LARGE_NUMBER_ is done to avoid common_nn_0 and common_nn_1 being zero initiated. This mechanism will lead to wrong behavior that is easier to identify during debugging in situations of un-careful usage. Example of such un-careful usage is if the end-user does not check that the bonds were not flipped and tries to un-flip bonds.

-
State of the triangulation before and after the flip.
- +

A helper struct; keeps track of bond flips.

+

A bond flip can be unsuccessful, e.g., if the requested two nodes that are donating an edge already have too few edges (more details on bond flips and how they can fail are provided in the Triangulation.flip_bond(Index, Index, Real, Real) function). If the flip does happen, then flipped will be changed to true by the Triangulation.flip_bond(Index, Index, Real, Real) function and common_nn_0 and common_nn_1 will record the ids of nodes that receive new common bond. If the flip does not happen then the common_nn_0 and common_nn_1 data members will hold a VERY_LARGE_NUMBER_ with which they were initiated.

+

The initiation with VERY_LARGE_NUMBER_ is done to avoid common_nn_0 and common_nn_1 being zero initiated. This mechanism will lead to wrong behavior that is easier to identify during debugging in situations of un-careful usage. Example of such un-careful usage is if the end-user does not check that the bonds were not flipped and tries to un-flip bonds.

+
State of the triangulation before and after the flip.
+
before the flip after the flip
- +
common nn 1 common nn 1
/ \ / | \
/ \ / | \
-
node --------- nn node | nn
+
node --------- nn node | nn
\ / \ | /
\ / \ | /
- -
A helper struct; keeps track of bond flips.
Definition Triangulation.hpp:84
+
common nn 0 common nn 0
Template Parameters
- +
Indextype that will be used for all integer numbers inside this class/struct. Any data type that satisfies the indexing_number concept is allowed, for example, unsigned int.
Indextype that will be used for all integer numbers inside this class/struct. Any data type that satisfies the indexing_number concept is allowed, for example, unsigned int.
-
See also
Triangulation.flip_bond(Index, Index, Real, Real)
+
See also
Triangulation.flip_bond(Index, Index, Real, Real)
-Triangulation.unflip_bond(Index, Index, BondFlipData<Index> const&)
+Triangulation.unflip_bond(Index, Index, BondFlipData<Index> const&)
-Triangulation.flip_bond_unchecked(Index, Index, Index, Index)
+Triangulation.flip_bond_unchecked(Index, Index, Index, Index)

The documentation for this struct was generated from the following file: @@ -167,7 +179,7 @@ diff --git a/docs/structfp_1_1_bond_flip_data.js b/docs/structfp_1_1_bond_flip_data.js old mode 100644 new mode 100755 index 368a7ee..ed79a21 --- a/docs/structfp_1_1_bond_flip_data.js +++ b/docs/structfp_1_1_bond_flip_data.js @@ -1,6 +1,6 @@ var structfp_1_1_bond_flip_data = [ - [ "flipped", "structfp_1_1_bond_flip_data.html#a7723f26e8083b2d90c3e13e2dde08245", null ], - [ "common_nn_0", "structfp_1_1_bond_flip_data.html#af28b1b0fb90fcd3bf5a0363bf89569a9", null ], - [ "common_nn_1", "structfp_1_1_bond_flip_data.html#a5792fe8f43d65f6aba3d0acd22dabf57", null ] + [ "flipped", "structfp_1_1_bond_flip_data.html#af704e81a0ccea5f53ad4e32b9b0c059f", null ], + [ "common_nn_0", "structfp_1_1_bond_flip_data.html#a89ec12c1be800708301b6c7ae187ef24", null ], + [ "common_nn_1", "structfp_1_1_bond_flip_data.html#aba21c408f0fc4f84dbe77e6a7d00df11", null ] ]; \ No newline at end of file diff --git a/docs/structfp_1_1_bond_flip_data__coll__graph.dot b/docs/structfp_1_1_bond_flip_data__coll__graph.dot deleted file mode 100644 index 3a34084..0000000 --- a/docs/structfp_1_1_bond_flip_data__coll__graph.dot +++ /dev/null @@ -1,12 +0,0 @@ -digraph "fp::BondFlipData< Index >" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="fp::BondFlipData\< Index \>",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="A helper struct; keeps track of bond flips."]; - Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" flipped",fontcolor="grey" ]; - Node2 [id="Node000002",label="bool",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; - Node3 -> Node1 [id="edge2_Node000001_Node000003",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" common_nn_0\ncommon_nn_1",fontcolor="grey" ]; - Node3 [id="Node000003",label="Index",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; -} diff --git a/docs/structfp_1_1_bond_flip_data__coll__graph.map b/docs/structfp_1_1_bond_flip_data__coll__graph.map new file mode 100755 index 0000000..d0856ef --- /dev/null +++ b/docs/structfp_1_1_bond_flip_data__coll__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/structfp_1_1_bond_flip_data__coll__graph.md5 b/docs/structfp_1_1_bond_flip_data__coll__graph.md5 new file mode 100755 index 0000000..e9fd239 --- /dev/null +++ b/docs/structfp_1_1_bond_flip_data__coll__graph.md5 @@ -0,0 +1 @@ +d5c8b0aaec1a2262bf051354bcc09897 \ No newline at end of file diff --git a/docs/structfp_1_1_bond_flip_data__coll__graph.png b/docs/structfp_1_1_bond_flip_data__coll__graph.png new file mode 100755 index 0000000..a1db2dc Binary files /dev/null and b/docs/structfp_1_1_bond_flip_data__coll__graph.png differ diff --git a/docs/structfp_1_1_geometry-members.html b/docs/structfp_1_1_geometry-members.html old mode 100644 new mode 100755 index 75557fa..2d8df77 --- a/docs/structfp_1_1_geometry-members.html +++ b/docs/structfp_1_1_geometry-members.html @@ -3,16 +3,18 @@ - + flippy: Member List + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -99,29 +106,28 @@
-
fp::Geometry< Real, Index > Member List
+
fp::Geometry Member List
-

This is the complete list of members for fp::Geometry< Real, Index >, including all inherited members.

+

This is the complete list of members for fp::Geometry, including all inherited members.

- - - - - - - - - - - + + + + + + + + + +
areafp::Geometry< Real, Index >
Geometry()fp::Geometry< Real, Index >inline
Geometry(Node< Real, Index > const &node)fp::Geometry< Real, Index >inlineexplicit
Geometry(Real area_inp, Real volume_inp, Real unit_bending_energy_inp)fp::Geometry< Real, Index >inline
operator+fp::Geometry< Real, Index >friend
operator+=fp::Geometry< Real, Index >friend
operator+=(Node< Real, Index > const &node)fp::Geometry< Real, Index >inline
operator-fp::Geometry< Real, Index >friend
operator-=fp::Geometry< Real, Index >friend
unit_bending_energyfp::Geometry< Real, Index >
volumefp::Geometry< Real, Index >
areafp::Geometry
Geometry()fp::Geometryinline
Geometry(Node const &node)fp::Geometryinlineexplicit
Geometry(Real area_inp, Real volume_inp)fp::Geometryinline
operator+(Geometry const &lhs, Geometry const &rhs)fp::Geometryfriend
operator+=(Geometry &lhs, Geometry const &rhs)fp::Geometryfriend
operator+=(Node const &node)fp::Geometryinline
operator-(Geometry const &lhs, Geometry const &rhs)fp::Geometryfriend
operator-=(Geometry &lhs, Geometry const &rhs)fp::Geometryfriend
volumefp::Geometry
diff --git a/docs/structfp_1_1_geometry.html b/docs/structfp_1_1_geometry.html old mode 100644 new mode 100755 index 65df192..ae8e4a4 --- a/docs/structfp_1_1_geometry.html +++ b/docs/structfp_1_1_geometry.html @@ -3,16 +3,18 @@ - + -flippy: fp::Geometry< Real, Index > Struct Template Reference +flippy: fp::Geometry Struct Reference + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
@@ -104,92 +111,89 @@ Public Attributes | Friends | List of all members
-
fp::Geometry< Real, Index > Struct Template Reference
+
fp::Geometry Struct Reference

A helper struct. Used by the triangulation class to pass data around in one convenient package. - More...

+ More...

#include <Triangulation.hpp>

-Collaboration diagram for fp::Geometry< Real, Index >:
+Collaboration diagram for fp::Geometry:
-
Collaboration graph
+
Collaboration graph
+ + + + +
[legend]
- - - - - - - - - - - - + + + + + + + + + + +

Public Member Functions

+
 Geometry ()
 Default constructor, that zero initiates all the data members.
 
 Geometry (Node< Real, Index > const &node)
 Construct from a node.
 
 Geometry (Real area_inp, Real volume_inp, Real unit_bending_energy_inp)
 Direct Constructor.
 
void operator+= (Node< Real, Index > const &node)
 Overloaded addition and assignment operator.
 
 Default constructor, that zero initiates all the data members.
 
 Geometry (Node const &node)
 Construct from a node.
 
 Geometry (Real area_inp, Real volume_inp)
 Direct Constructor.
 
void operator+= (Node const &node)
 Overloaded addition and assignment operator.
 
- - - - - - - - + + + +

Public Attributes

+
Real area
 Area of the patch. Sum over the associated areas of individual nodes that comprise the patch. (Compare to Node::area).
 
-Real volume
 Volume of the patch. Sum over the associated volumes of individual nodes that comprise the patch. (Compare to Node::volume).
 
Real unit_bending_energy
 
 Area of the patch. Sum over the associated areas of individual nodes that comprise the patch. (Compare to Node::area).
 
Real volume
 
- - - - - - - - - - - - + + + + + + + + + + + +

Friends

Geometry< Real, Index > operator+ (Geometry< Real, Index > const &lhs, Geometry< Real, Index > const &rhs)
 Overloaded addition operator.
 
Geometry< Real, Index > operator- (Geometry< Real, Index > const &lhs, Geometry< Real, Index > const &rhs)
 Overloaded subtraction operator.
 
void operator+= (Geometry< Real, Index > &lhs, Geometry< Real, Index > const &rhs)
 Overloaded addition and assignment operator.
 
void operator-= (Geometry< Real, Index > &lhs, Geometry< Real, Index > const &rhs)
 Overloaded subtraction and assignment operator.
 
Geometry operator+ (Geometry const &lhs, Geometry const &rhs)
 Overloaded addition operator.
 
Geometry operator- (Geometry const &lhs, Geometry const &rhs)
 Overloaded subtraction operator.
 
void operator+= (Geometry &lhs, Geometry const &rhs)
 Overloaded addition and assignment operator.
 
void operator-= (Geometry &lhs, Geometry const &rhs)
 Overloaded subtraction and assignment operator.
 

Detailed Description

-
template<floating_point_number Real, indexing_number Index>
-struct fp::Geometry< Real, Index >

A helper struct. Used by the triangulation class to pass data around in one convenient package.

+

A helper struct. Used by the triangulation class to pass data around in one convenient package.

Geometry is a struct that contains the usually needed geometric data in a triangulation. This struct can hold such data for a single node, a collection of nodes, or the entire triangulation. In the abstract, the fp::Geometry struct contains geometric data associated with some surface patch. This is useful since we often need to aggregate information for a node and its neighboring nodes.

The Data members of this struct are public, and thus, it does not guarantee the correctness or consistency of the data it holds, since it can be changed externally. The geometry struct also provides overloaded arithmetic operators, that are usually useful when aggregating geometric data from single nodes over a larger patch of the surface.

Template Parameters
- - + +
Realtype that will be used for all floating point numbers inside this class/struct. Any data type that satisfies the floating_point_number concept is allowed, for example, float.
Indextype that will be used for all integer numbers inside this class/struct. Any data type that satisfies the indexing_number concept is allowed, for example, unsigned int.
Realtype that will be used for all floating point numbers inside this class/struct. Any data type that satisfies the floating_point_number concept is allowed, for example, float.
Indextype that will be used for all integer numbers inside this class/struct. Any data type that satisfies the indexing_number concept is allowed, for example, unsigned int.

Constructor & Destructor Documentation

- -

◆ Geometry() [1/2]

+ +

◆ Geometry() [1/2]

-
-template<floating_point_number Real, indexing_number Index>
- + - - +
fp::Geometry< Real, Index >::Geometry fp::Geometry::Geometry (Node< Real, Index > constnode)Node const & node)
@@ -210,39 +214,24 @@

-

◆ Geometry() [2/2]

+ +

◆ Geometry() [2/2]

-
-template<floating_point_number Real, indexing_number Index>
@@ -265,22 +254,19 @@

Member Function Documentation

- -

◆ operator+=()

+ +

◆ operator+=()

-
-template<floating_point_number Real, indexing_number Index>
- + - - + - - - - - - - - - - - - - +
fp::Geometry< Real, Index >::Geometry fp::Geometry::Geometry (Real area_inp, Real area_inp,
Real volume_inp,
Real unit_bending_energy_inp 
)Real volume_inp )
- + - - +
void fp::Geometry< Real, Index >::operator+= void fp::Geometry::operator+= (Node< Real, Index > constnode)Node const & node)
@@ -302,33 +288,24 @@

Friends And Related Symbol Documentation

- -

◆ operator+

+ +

◆ operator+

-
-template<floating_point_number Real, indexing_number Index>
@@ -341,12 +318,14 @@

++
//Example
-
+
-
res.area == lhs.area + rhs.area; // true
-
res.volume == lhs.volume + rhs.volume; // true
-
res.unit_bending_energy == lhs.unit_bending_energy + rhs.unit_bending_energy; // true
-
A helper struct; keeps track of bond flips.
Definition Triangulation.hpp:84
+
res.area == lhs.area + rhs.area; // true
+
res.volume == lhs.volume + rhs.volume; // true
+
res.unit_bending_energy == lhs.unit_bending_energy + rhs.unit_bending_energy; // true
+
A helper struct. Used by the triangulation class to pass data around in one convenient package.
Definition Triangulation.hpp:138
+
Real area
Area of the patch. Sum over the associated areas of individual nodes that comprise the patch....
Definition Triangulation.hpp:139
+
Real volume
Definition Triangulation.hpp:140
Parameters

- + - - + - - - - - - - +
Geometry< Real, Index > operator+ Geometry operator+ (Geometry< Real, Index > constlhs, Geometry const & lhs,
Geometry< Real, Index > constrhs 
)Geometry const & rhs )
@@ -358,33 +337,24 @@

-

◆ operator-

+ +

◆ operator-

-
-template<floating_point_number Real, indexing_number Index>

lhs
@@ -397,11 +367,11 @@

++
//Example
-
+
-
res.area == lhs.area - rhs.area; // true
-
res.volume == lhs.volume - rhs.volume; // true
-
res.unit_bending_energy == lhs.unit_bending_energy - rhs.unit_bending_energy; // true
+
res.area == lhs.area - rhs.area; // true
+
res.volume == lhs.volume - rhs.volume; // true
+
res.unit_bending_energy == lhs.unit_bending_energy - rhs.unit_bending_energy; // true
Parameters

- + - - + - - - - - - - +
Geometry< Real, Index > operator- Geometry operator- (Geometry< Real, Index > constlhs, Geometry const & lhs,
Geometry< Real, Index > constrhs 
)Geometry const & rhs )
@@ -413,33 +383,24 @@

-

◆ operator+=

+ +

◆ operator+=

-
-template<floating_point_number Real, indexing_number Index>

lhs
@@ -458,37 +419,28 @@

See also
Geometry<Real, Index> operator+(Geometry<Real, Index> const& lhs, Geometry<Real, Index> const& rhs)
+
See also
Geometry operator+(Geometry const& lhs, Geometry const& rhs)
- -

◆ operator-=

+ +

◆ operator-=

-
-template<floating_point_number Real, indexing_number Index>

- + - - + - - - - - - - +
void operator+= void operator+= (Geometry< Real, Index > & lhs, Geometry & lhs,
Geometry< Real, Index > constrhs 
)Geometry const & rhs )
@@ -507,25 +459,23 @@

See also
Geometry<Real, Index> operator-(Geometry<Real, Index> const& lhs, Geometry<Real, Index> const& rhs)
+
See also
Geometry operator-(Geometry const& lhs, Geometry const& rhs)

Member Data Documentation

- -

◆ unit_bending_energy

+ +

◆ volume

-
-template<floating_point_number Real, indexing_number Index>

- + - - + - - - - - - - +
void operator-= void operator-= (Geometry< Real, Index > & lhs, Geometry & lhs,
Geometry< Real, Index > constrhs 
)Geometry const & rhs )
- +
Real fp::Geometry< Real, Index >::unit_bending_energyReal fp::Geometry::volume
-

Volume of the patch. Sum over the associated unit bending energies of individual nodes that comprise the patch. (Compare to Node::unit_bending_energy).

+

Volume of the patch. Sum over the associated volumes of individual nodes that comprise the patch. (Compare to Node::volume).

@@ -538,7 +488,7 @@

    - +
diff --git a/docs/structfp_1_1_geometry.js b/docs/structfp_1_1_geometry.js old mode 100644 new mode 100755 index 9722012..a908e8d --- a/docs/structfp_1_1_geometry.js +++ b/docs/structfp_1_1_geometry.js @@ -1,14 +1,13 @@ var structfp_1_1_geometry = [ - [ "Geometry", "structfp_1_1_geometry.html#a6bababab0cc9d995cd9d52dfc87442a0", null ], - [ "Geometry", "structfp_1_1_geometry.html#a6627a3e6e7ec703d8db7c756464aed8e", null ], - [ "Geometry", "structfp_1_1_geometry.html#a2c84ea40f4dec6a64541e9d4aaa9eda3", null ], - [ "operator+=", "structfp_1_1_geometry.html#af64274f242f134f791bb381ce1419753", null ], - [ "operator+", "structfp_1_1_geometry.html#a1ae896003b13c5f110116085a2658471", null ], - [ "operator-", "structfp_1_1_geometry.html#ad1551fc47c469d47625068d5424a2cef", null ], - [ "operator+=", "structfp_1_1_geometry.html#a7d19899dde91a5b7b30635de7b321dd9", null ], - [ "operator-=", "structfp_1_1_geometry.html#ad54e751bccf6ae11d4af543ef6a23c23", null ], - [ "area", "structfp_1_1_geometry.html#a261444235eb423476167d8185b59cd67", null ], - [ "volume", "structfp_1_1_geometry.html#a04eb3d9d41651703001ab4601a1fd353", null ], - [ "unit_bending_energy", "structfp_1_1_geometry.html#a8ae88ad31c5e8ad04e949d508d3023e8", null ] + [ "Geometry", "structfp_1_1_geometry.html#ab34dc017d3d153b9d6dce5cbe85b00a2", null ], + [ "Geometry", "structfp_1_1_geometry.html#afe19ae70a18f105e616394c979739f89", null ], + [ "Geometry", "structfp_1_1_geometry.html#afcb524f26e28258ab595cf67969e4f2f", null ], + [ "operator+=", "structfp_1_1_geometry.html#a1ad7209337ace3bfb8ca54e3c1f74e85", null ], + [ "operator+", "structfp_1_1_geometry.html#acfea07971d44f8daf22bfc023f49b2a3", null ], + [ "operator-", "structfp_1_1_geometry.html#a3714cc223f61f406d01becb91cab6ab9", null ], + [ "operator+=", "structfp_1_1_geometry.html#ac692b9c2c5ebc614b36fb9771a07e773", null ], + [ "operator-=", "structfp_1_1_geometry.html#a768de5f3d63132e0be2ad65c3840c8bc", null ], + [ "area", "structfp_1_1_geometry.html#a1f0f7950d80852acf9af7ee9891624b9", null ], + [ "volume", "structfp_1_1_geometry.html#ad2705489aa1d5f77b99b2bbdf522d226", null ] ]; \ No newline at end of file diff --git a/docs/structfp_1_1_geometry__coll__graph.dot b/docs/structfp_1_1_geometry__coll__graph.dot deleted file mode 100644 index 6fbf8c9..0000000 --- a/docs/structfp_1_1_geometry__coll__graph.dot +++ /dev/null @@ -1,10 +0,0 @@ -digraph "fp::Geometry< Real, Index >" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="fp::Geometry\< Real,\l Index \>",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="A helper struct. Used by the triangulation class to pass data around in one convenient package."]; - Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" area\nunit_bending_energy\nvolume",fontcolor="grey" ]; - Node2 [id="Node000002",label="Real",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; -} diff --git a/docs/structfp_1_1_geometry__coll__graph.map b/docs/structfp_1_1_geometry__coll__graph.map new file mode 100755 index 0000000..da118f6 --- /dev/null +++ b/docs/structfp_1_1_geometry__coll__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/structfp_1_1_geometry__coll__graph.md5 b/docs/structfp_1_1_geometry__coll__graph.md5 new file mode 100755 index 0000000..fa94ca4 --- /dev/null +++ b/docs/structfp_1_1_geometry__coll__graph.md5 @@ -0,0 +1 @@ +108be866c44ba78f112cf03886ad4b44 \ No newline at end of file diff --git a/docs/structfp_1_1_geometry__coll__graph.png b/docs/structfp_1_1_geometry__coll__graph.png new file mode 100755 index 0000000..70f2c80 Binary files /dev/null and b/docs/structfp_1_1_geometry__coll__graph.png differ diff --git a/docs/structfp_1_1_neighbors-members.html b/docs/structfp_1_1_neighbors-members.html old mode 100644 new mode 100755 index b7a2301..d53f6ce --- a/docs/structfp_1_1_neighbors-members.html +++ b/docs/structfp_1_1_neighbors-members.html @@ -3,16 +3,18 @@ - + flippy: Member List + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -99,22 +106,22 @@
-
fp::Neighbors< Index > Member List
+
fp::Neighbors Member List
-

This is the complete list of members for fp::Neighbors< Index >, including all inherited members.

+

This is the complete list of members for fp::Neighbors, including all inherited members.

- - - - + + + +
j_m_1fp::Neighbors< Index >
j_p_1fp::Neighbors< Index >
minus_one(Index j, Index ring_size)fp::Neighbors< Index >inlinestatic
plus_one(Index j, Index ring_size)fp::Neighbors< Index >inlinestatic
j_m_1fp::Neighbors
j_p_1fp::Neighbors
minus_one(Index j, Index ring_size)fp::Neighborsinlinestatic
plus_one(Index j, Index ring_size)fp::Neighborsinlinestatic
diff --git a/docs/structfp_1_1_neighbors.html b/docs/structfp_1_1_neighbors.html old mode 100644 new mode 100755 index 8b128f7..555ef57 --- a/docs/structfp_1_1_neighbors.html +++ b/docs/structfp_1_1_neighbors.html @@ -3,16 +3,18 @@ - + -flippy: fp::Neighbors< Index > Struct Template Reference +flippy: fp::Neighbors Struct Reference + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
-
fp::Neighbors< Index > Struct Template Reference
+
fp::Neighbors Struct Reference

#include <Triangulation.hpp>

-Collaboration diagram for fp::Neighbors< Index >:
+Collaboration diagram for fp::Neighbors:
-
Collaboration graph
+
Collaboration graph
+ + + + +
[legend]
- - - - + + + +

Static Public Member Functions

static Index plus_one (Index j, Index ring_size)
 
static Index minus_one (Index j, Index ring_size)
 
static Index plus_one (Index j, Index ring_size)
 
static Index minus_one (Index j, Index ring_size)
 
- - - - - - + + + + + +

Public Attributes

-Index j_m_1 {VERY_LARGE_NUMBER_}
 neighbor j+1
 
-Index j_p_1 {VERY_LARGE_NUMBER_}
 neighbor j-1
 
+Index j_m_1 {VERY_LARGE_NUMBER_}
 neighbor j+1
 
+Index j_p_1 {VERY_LARGE_NUMBER_}
 neighbor j-1
 

Detailed Description

-
template<indexing_number Index>
-struct fp::Neighbors< Index >

A helper struct; makes addition and subtraction on a ring easier. Each fp::Node stores its next neighbors in a vector Node.nn_ids, where the adjacent members in a vector are also next neighbors of each other. This struct provides a safe way to always access the next or previous member of the nn_ids vector, even if a wraparound is necessary.

See also
fp::Node.
+

A helper struct; makes addition and subtraction on a ring easier. Each fp::Node stores its next neighbors in a vector Node.nn_ids, where the adjacent members in a vector are also next neighbors of each other. This struct provides a safe way to always access the next or previous member of the nn_ids vector, even if a wraparound is necessary.

See also
fp::Node.
Template Parameters
- +
Indextype that will be used for all integer numbers inside this class/struct. Any data type that satisfies the indexing_number concept is allowed, for example, unsigned int.
Indextype that will be used for all integer numbers inside this class/struct. Any data type that satisfies the indexing_number concept is allowed, for example, unsigned int.

Member Function Documentation

- -

◆ plus_one()

+ +

◆ plus_one()

-
-template<indexing_number Index>
@@ -180,46 +182,55 @@

Parameters

- + - - + - - - - - - - +
static Index fp::Neighbors< Index >::plus_one static Index fp::Neighbors::plus_one (Index j, Index j,
Index ring_size 
)Index ring_size )
- +
jindex of the j-th next neighbor
ring_sizecorresponds to the number of elements of Node.nn_ids
ring_sizecorresponds to the number of elements of Node.nn_ids
-
Returns
j+1 if j < ring_size - 1 and 0 otherwise. I.e., if j is the index of Node.nn_ids, its next neighbor will be stored in j+1 element, unless j is the last element, then its next neighbor will be stored in the 0th element.
+
Returns
j+1 if j < ring_size - 1 and 0 otherwise. I.e., if j is the index of Node.nn_ids, its next neighbor will be stored in j+1 element, unless j is the last element, then its next neighbor will be stored in the 0th element.
Here is the caller graph for this function:
-
+
+ + + + + + + + + + + + + + + + + +
- -

◆ minus_one()

+ +

◆ minus_one()

-
-template<indexing_number Index>
@@ -231,11 +242,11 @@

Parameters

- + - - + - - - - - - - +
static Index fp::Neighbors< Index >::minus_one static Index fp::Neighbors::minus_one (Index j, Index j,
Index ring_size 
)Index ring_size )
- +
jindex of the j-th next neighbor
ring_sizecorresponds to the number of elements of Node.nn_ids
ring_sizecorresponds to the number of elements of Node.nn_ids
-
Returns
j-1 if j > 0 and ring_size - 1 otherwise. I.e., if j is the index of Node.nn_ids, its previous next neighbor will be stored in j-1 element, unless j is the 0th element, then its previous next neighbor will be stored in the last element.
+
Returns
j-1 if j > 0 and ring_size - 1 otherwise. I.e., if j is the index of Node.nn_ids, its previous next neighbor will be stored in j-1 element, unless j is the 0th element, then its previous next neighbor will be stored in the last element.
@@ -248,7 +259,7 @@

diff --git a/docs/structfp_1_1_neighbors.js b/docs/structfp_1_1_neighbors.js old mode 100644 new mode 100755 index 5fca88e..ca8c807 --- a/docs/structfp_1_1_neighbors.js +++ b/docs/structfp_1_1_neighbors.js @@ -1,7 +1,7 @@ var structfp_1_1_neighbors = [ - [ "plus_one", "structfp_1_1_neighbors.html#a59501864ac7f34bd676aa97d9faf68cc", null ], - [ "minus_one", "structfp_1_1_neighbors.html#a4fd046f13a1a7c640a2a01e1d0585497", null ], - [ "j_m_1", "structfp_1_1_neighbors.html#a78c69e6e87ac732d788d662274eeb492", null ], - [ "j_p_1", "structfp_1_1_neighbors.html#a089ec17c7edaa1ed1fad07f703ee8368", null ] + [ "plus_one", "structfp_1_1_neighbors.html#aa5cd15f625ae3e2e92e5361f1c8d20bd", null ], + [ "minus_one", "structfp_1_1_neighbors.html#abd825093ef365d4fe88df97d1ce1789a", null ], + [ "j_m_1", "structfp_1_1_neighbors.html#a2ba3f761243ca71cca19b359c64902cc", null ], + [ "j_p_1", "structfp_1_1_neighbors.html#a85965893be3127eff60cad6d393648d9", null ] ]; \ No newline at end of file diff --git a/docs/structfp_1_1_neighbors__coll__graph.dot b/docs/structfp_1_1_neighbors__coll__graph.dot deleted file mode 100644 index bf9d85b..0000000 --- a/docs/structfp_1_1_neighbors__coll__graph.dot +++ /dev/null @@ -1,10 +0,0 @@ -digraph "fp::Neighbors< Index >" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="fp::Neighbors\< Index \>",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; - Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" j_m_1\nj_p_1",fontcolor="grey" ]; - Node2 [id="Node000002",label="Index",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; -} diff --git a/docs/structfp_1_1_neighbors__coll__graph.map b/docs/structfp_1_1_neighbors__coll__graph.map new file mode 100755 index 0000000..1f5f7f0 --- /dev/null +++ b/docs/structfp_1_1_neighbors__coll__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/structfp_1_1_neighbors__coll__graph.md5 b/docs/structfp_1_1_neighbors__coll__graph.md5 new file mode 100755 index 0000000..0ffeae9 --- /dev/null +++ b/docs/structfp_1_1_neighbors__coll__graph.md5 @@ -0,0 +1 @@ +6f24857d5722675f126923c8f99e5700 \ No newline at end of file diff --git a/docs/structfp_1_1_neighbors__coll__graph.png b/docs/structfp_1_1_neighbors__coll__graph.png new file mode 100755 index 0000000..4931848 Binary files /dev/null and b/docs/structfp_1_1_neighbors__coll__graph.png differ diff --git a/docs/structfp_1_1_neighbors_a59501864ac7f34bd676aa97d9faf68cc_icgraph.dot b/docs/structfp_1_1_neighbors_a59501864ac7f34bd676aa97d9faf68cc_icgraph.dot deleted file mode 100644 index 64ecf9f..0000000 --- a/docs/structfp_1_1_neighbors_a59501864ac7f34bd676aa97d9faf68cc_icgraph.dot +++ /dev/null @@ -1,21 +0,0 @@ -digraph "fp::Neighbors::plus_one" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Neighbors::plus_one",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Triangulation::\lupdate_bulk_node_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a5d5763865ac706a2e800ed306d070d68",tooltip="Update the geometric quantities associated with the given node."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Triangulation::\lmake_global_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a1afce8afd92f1b88fb15ce7d9cb31edd",tooltip="Initiates the global geometry of the triangulation."]; - Node2 -> Node4 [id="edge3_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::Triangulation::\lupdate_diamond_geometry",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a762c6430c00d719a8ea5a4a3e89715a8",tooltip="Calculates and updates the geometric quantities of the diamond configuration of nodes associated with..."]; - Node4 -> Node5 [id="edge4_Node000004_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="fp::Triangulation::\lunflip_bond",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_triangulation.html#a5d1ec431a7a0040d7963e4297a80faaa",tooltip="Un-flip a bond that was just flipped."]; - Node5 -> Node6 [id="edge5_Node000005_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#a8de725c1ae28fd44d096ffb82467b598",tooltip="Attempt a flip Monte Carlo Step."]; - Node5 -> Node7 [id="edge6_Node000005_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node7 [id="Node000007",label="fp::MonteCarloUpdater\l::flip_MC_updater",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$classfp_1_1_monte_carlo_updater.html#acf28ad26646a0e87dce57eed5ca5047c",tooltip="Attempt a flip Monte Carlo Step."]; -} diff --git a/docs/structfp_1_1_neighbors_aa5cd15f625ae3e2e92e5361f1c8d20bd_icgraph.map b/docs/structfp_1_1_neighbors_aa5cd15f625ae3e2e92e5361f1c8d20bd_icgraph.map new file mode 100755 index 0000000..b00877c --- /dev/null +++ b/docs/structfp_1_1_neighbors_aa5cd15f625ae3e2e92e5361f1c8d20bd_icgraph.map @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/docs/structfp_1_1_neighbors_aa5cd15f625ae3e2e92e5361f1c8d20bd_icgraph.md5 b/docs/structfp_1_1_neighbors_aa5cd15f625ae3e2e92e5361f1c8d20bd_icgraph.md5 new file mode 100755 index 0000000..3ba8c52 --- /dev/null +++ b/docs/structfp_1_1_neighbors_aa5cd15f625ae3e2e92e5361f1c8d20bd_icgraph.md5 @@ -0,0 +1 @@ +79ccadf7f326eac6c58023cb0a710ef0 \ No newline at end of file diff --git a/docs/structfp_1_1_neighbors_aa5cd15f625ae3e2e92e5361f1c8d20bd_icgraph.png b/docs/structfp_1_1_neighbors_aa5cd15f625ae3e2e92e5361f1c8d20bd_icgraph.png new file mode 100755 index 0000000..f51f4fb Binary files /dev/null and b/docs/structfp_1_1_neighbors_aa5cd15f625ae3e2e92e5361f1c8d20bd_icgraph.png differ diff --git a/docs/structfp_1_1_node-members.html b/docs/structfp_1_1_node-members.html old mode 100644 new mode 100755 index 6114759..a0b5852 --- a/docs/structfp_1_1_node-members.html +++ b/docs/structfp_1_1_node-members.html @@ -3,16 +3,18 @@ - + flippy: Member List + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
@@ -99,33 +106,32 @@
-
fp::Node< Real, Index > Member List
+
fp::Node Member List
-

This is the complete list of members for fp::Node< Real, Index >, including all inherited members.

+

This is the complete list of members for fp::Node, including all inherited members.

- - - - - - - - - - - - - - - + + + + + + + + + + + + + +
areafp::Node< Real, Index >
curvature_vecfp::Node< Real, Index >
emplace_nn_id(Index to_emplace_nn_id, vec3< Real > const &to_emplace_nn_pos, Index loc_idx)fp::Node< Real, Index >inline
find_nns_loc_pointer(Index nn_id)fp::Node< Real, Index >inline
get_distance_vector_to(Index nn_id) constfp::Node< Real, Index >inline
idfp::Node< Real, Index >
nn_distancesfp::Node< Real, Index >
nn_idsfp::Node< Real, Index >
operator<<fp::Node< Real, Index >friend
operator==(Node< Real, Index > const &other_node) const =defaultfp::Node< Real, Index >
pop_nn(Index to_pop_nn_id)fp::Node< Real, Index >inline
posfp::Node< Real, Index >
unit_bending_energyfp::Node< Real, Index >
verlet_listfp::Node< Real, Index >
volumefp::Node< Real, Index >
areafp::Node
curvature_vecfp::Node
emplace_nn_id(Index to_emplace_nn_id, vec3< Real > const &to_emplace_nn_pos, Index loc_idx)fp::Nodeinline
find_nns_loc_pointer(Index nn_id)fp::Nodeinline
get_distance_vector_to(Index nn_id) constfp::Nodeinline
idfp::Node
nn_distancesfp::Node
nn_idsfp::Node
operator<<(std::ostream &os, Node const &node)fp::Nodefriend
operator==(Node const &other_node) const =defaultfp::Node
pop_nn(Index to_pop_nn_id)fp::Nodeinline
posfp::Node
verlet_listfp::Node
volumefp::Node
diff --git a/docs/structfp_1_1_node.html b/docs/structfp_1_1_node.html old mode 100644 new mode 100755 index 37c41c8..1496730 --- a/docs/structfp_1_1_node.html +++ b/docs/structfp_1_1_node.html @@ -3,16 +3,18 @@ - + -flippy: fp::Node< Real, Index > Struct Template Reference +flippy: fp::Node Struct Reference + - + + @@ -43,19 +45,24 @@ - + + @@ -73,7 +80,7 @@
@@ -104,103 +111,109 @@ Public Attributes | Friends | List of all members
-
fp::Node< Real, Index > Struct Template Reference
+
fp::Node Struct Reference

A data structure containing all geometric and topological information associated with a node. - More...

+ More...

#include <Nodes.hpp>

-Collaboration diagram for fp::Node< Real, Index >:
+Collaboration diagram for fp::Node:
-
Collaboration graph
+
Collaboration graph
+ + + + + + + + + + + + +
[legend]
- - - - - - - - - - - - - + + + + + + + + + + + + +

Public Member Functions

void pop_nn (Index to_pop_nn_id)
 Find and deletes the element with the id to_pop_nn_id in the nn_id vector.
 
auto find_nns_loc_pointer (Index nn_id)
 
void emplace_nn_id (Index to_emplace_nn_id, vec3< Real > const &to_emplace_nn_pos, Index loc_idx)
 
vec3< Real > constget_distance_vector_to (Index nn_id) const
 This function can provide the stored distance vector to the next neighbor.
 
bool operator== (Node< Real, Index > const &other_node) const =default
 Default equality operator.
 
auto find_nns_loc_pointer (Index nn_id)
 
void pop_nn (Index to_pop_nn_id)
 Find and deletes the element with the id to_pop_nn_id in the nn_id vector.
 
void emplace_nn_id (Index to_emplace_nn_id, vec3< Real > const &to_emplace_nn_pos, Index loc_idx)
 
vec3< Real > const & get_distance_vector_to (Index nn_id) const
 This function can provide the stored distance vector to the next neighbor.
 
bool operator== (Node const &other_node) const =default
 Default equality operator.
 
- - - - - - - - - - - - - + + + + + + + + - - - - - - - - - + + + + + + + + - - - + + - - + +

Public Attributes

+
Index id
 Global id of the Node, which is a number between 0 and max_number_of_nodes - 1.
 
Real area
 Voronoi area associated with the node.
 
Real volume
 If the node is part of a closed surface triangulation, then the volume contains the volume of the tetrahedron connected to each voronoi cell sub-triangle and the center of the lab coordinate system as defined in Gueguen et al. 2017.
 
Real unit_bending_energy
 unit_bending_energy corresponds to the Helfrich bending energy with bending rigidity 1 and gaussian bending stiffness 0.
 
+
 Global id of the Node, which is a number between 0 and max_number_of_nodes - 1.
 
Real area
 Voronoi area associated with the node.
 
Real volume
 If the node is part of a closed surface triangulation, then the volume contains the volume of the tetrahedron connected to each voronoi cell sub-triangle and the center of the lab coordinate system as defined in Gueguen et al. 2017.
 
vec3< Real > pos
 Position of the node in the lab frame.
 
vec3< Real > curvature_vec
 Curvature vector of the node.
 
std::vector< Index > nn_ids
 A vector containing the global ids of the current node's next neighbors.
 
+
 Position of the node in the lab frame.
 
vec3< Real > curvature_vec
 Curvature vector of the node.
 
std::vector< Index > nn_ids
 A vector containing the global ids of the current node's next neighbors.
 
std::vector< vec3< Real > > nn_distances
 Distance vectors pointing from the node to its next neighbors.
 
+
 Distance vectors pointing from the node to its next neighbors.
 
std::vector< Index > verlet_list
 The Verlet list contains the ids of nodes that are close to this node.
 
 The Verlet list contains the ids of nodes that are close to this node.
 
- - - + + +

Friends

std::ostream & operator<< (std::ostream &os, Node< Real, Index > const &node)
 Streaming operator that can print formatted output to standard out with all Node data fields.
 
std::ostream & operator<< (std::ostream &os, Node const &node)
 Streaming operator that can print formatted output to standard out with all Node data fields.
 

Detailed Description

-
template<floating_point_number Real, indexing_number Index>
-struct fp::Node< Real, Index >

A data structure containing all geometric and topological information associated with a node.

-

This is a DUMB DATA STRUCTURE, meaning that it is not responsible for the coherence of the data it contains. For performance reasons, methods associated with Node struct will never check if the Node::curvature is the norm of the Node::curvature_vector or if the Node::nn_ids and Node::nn_distances are in the correct order. It is the responsibility of higher-order structures like Nodes and Triangulation to check that correct data is stored and updated correctly. However, it does check the data for consistency. It will match the length of Node::nn_ids and Node::nn_distances and pop and add both of them together.

Template Parameters
+

A data structure containing all geometric and topological information associated with a node.

+

This is a DUMB DATA STRUCTURE, meaning that it is not responsible for the coherence of the data it contains. For performance reasons, methods associated with Node struct will never check if the Node::curvature is the norm of the Node::curvature_vector or if the Node::nn_ids and Node::nn_distances are in the correct order. It is the responsibility of higher-order structures like Nodes and Triangulation to check that correct data is stored and updated correctly. However, it does check the data for consistency. It will match the length of Node::nn_ids and Node::nn_distances and pop and add both of them together.

Template Parameters
- - + +
Realtype that will be used for all floating point numbers inside this class/struct. Any data type that satisfies the floating_point_number concept is allowed, for example, float.
Indextype that will be used for all integer numbers inside this class/struct. Any data type that satisfies the indexing_number concept is allowed, for example, unsigned int.
Realtype that will be used for all floating point numbers inside this class/struct. Any data type that satisfies the floating_point_number concept is allowed, for example, float.
Indextype that will be used for all integer numbers inside this class/struct. Any data type that satisfies the indexing_number concept is allowed, for example, unsigned int.

Member Function Documentation

- -

◆ pop_nn()

+ +

◆ find_nns_loc_pointer()

-
-template<floating_point_number Real, indexing_number Index>
- + - - +
void fp::Node< Real, Index >::pop_nn auto fp::Node::find_nns_loc_pointer (Index to_pop_nn_id)Index nn_id)
@@ -210,41 +223,43 @@

- -

Find and deletes the element with the id to_pop_nn_id in the nn_id vector.

-
Parameters
+

Given the global id of the next neighbor, this function can be used to locate it in the Node::nn_ids vector.

+

This function is just a convenient wrapper around the std::find function.

std::find(nn_ids.begin(), nn_ids.end(), to_pop_nn_id);
+
std::vector< Index > nn_ids
A vector containing the global ids of the current node's next neighbors.
Definition Nodes.hpp:81
+
Parameters
- +
to_pop_nn_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1. This id is supposed to be removed from the next neighbor id vector.
nn_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1.
-
See also
Node::nn_ids
-
Note
this will lead to resizing of the vector, which can be expensive!
-
Warning
If the provided next neighbor id is not part of the Node::nn_ids, this function will fail silently. It will not delete anything and won't throw any errors or warnings;
+
Returns
if nn_id is contained in Node::nn_ids then the pointer to the position of that id in the nn_ids vector will be returned. Otherwise nn_ids.end().
+
Warning
This function is not responsible for graceful handling of nn_id's that are not found in the Node::nn_ids vector. If the nn_id is not contained in Node::nn_ids then the nn_ids.end() iterator will be returned. It is up to the user to perform the necessary checks to avoid undefined behavior that might result from trying to delete uninitiated memory.
-Here is the call graph for this function:
+Here is the caller graph for this function:
-
+
+ + + + +
- -

◆ find_nns_loc_pointer()

+ +

◆ pop_nn()

-
-template<floating_point_number Real, indexing_number Index>
- + - - +
auto fp::Node< Real, Index >::find_nns_loc_pointer void fp::Node::pop_nn (Index nn_id)Index to_pop_nn_id)
@@ -254,59 +269,53 @@

-

Given the global id of the next neighbor, this function can be used to locate it in the Node::nn_ids vector.

-

This function is just a convenient wrapper around the std::find function.

std::find(nn_ids.begin(), nn_ids.end(), to_pop_nn_id);
-
A helper struct; keeps track of bond flips.
Definition Triangulation.hpp:84
-
std::vector< Index > nn_ids
A vector containing the global ids of the current node's next neighbors.
Definition Nodes.hpp:93
-
Parameters
+ +

Find and deletes the element with the id to_pop_nn_id in the nn_id vector.

+
Parameters
- +
nn_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1.
to_pop_nn_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1. This id is supposed to be removed from the next neighbor id vector.
-
Returns
if nn_id is contained in Node::nn_ids then the pointer to the position of that id in the nn_ids vector will be returned. Otherwise nn_ids.end().
-
Warning
This function is not responsible for graceful handling of nn_id's that are not found in the Node::nn_ids vector. If the nn_id is not contained in Node::nn_ids then the nn_ids.end() iterator will be returned. It is up to the user to perform the necessary checks to avoid undefined behavior that might result from trying to delete uninitiated memory.
+
See also
Node::nn_ids
+
Note
this will lead to resizing of the vector, which can be expensive!
+
Warning
If the provided next neighbor id is not part of the Node::nn_ids, this function will fail silently. It will not delete anything and won't throw any errors or warnings;
-Here is the caller graph for this function:
+Here is the call graph for this function:
-
+
+ + + + +
- -

◆ emplace_nn_id()

+ +

◆ emplace_nn_id()

-
-template<floating_point_number Real, indexing_number Index>
@@ -318,34 +327,31 @@

Parameters

- + - - + - - + - - - - - - - +
void fp::Node< Real, Index >::emplace_nn_id void fp::Node::emplace_nn_id (Index to_emplace_nn_id, Index to_emplace_nn_id,
vec3< Real > constto_emplace_nn_pos, vec3< Real > const & to_emplace_nn_pos,
Index loc_idx 
)Index loc_idx )
- - - + + +
to_emplace_nn_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1. This id is supposed to be added to the Node::nn_ids vector of this node.
to_emplace_nn_posconst reference to the 3 dimensional position vector (type vec3<Real>) containing the position of the new next neighbour. This input is used to calculate the correct distance between this node and the new next neighbor, which will then be added to the Node::nn_distances vector.
loc_idxLocal index in the Node::nn_ids vector, a number between 0 and Node::nn_ids.size() - 1.
to_emplace_nn_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1. This id is supposed to be added to the Node::nn_ids vector of this node.
to_emplace_nn_posconst reference to the 3 dimensional position vector (type vec3<Real>) containing the position of the new next neighbour. This input is used to calculate the correct distance between this node and the new next neighbor, which will then be added to the Node::nn_distances vector.
loc_idxLocal index in the Node::nn_ids vector, a number between 0 and Node::nn_ids.size() - 1.
Note
This function causes the resizing of two vectors, which can be costly.
Warning
Making next neighbors is a symmetric operation. I.e., if node one becomes the next neighbor of node two, node two also has to become the next neighbor of node one. However, this function is not responsible for this relationship. It only adds a new next neighbor to this node, and the higher-order structures, like Triangulation, are responsible for guaranteeing the reciprocal relationship.
-
See also
Triangulation::emplace_before(Index, Index, Index)
+
See also
Triangulation::emplace_before(Index, Index, Index)
- -

◆ get_distance_vector_to()

+ +

◆ get_distance_vector_to()

-
-template<floating_point_number Real, indexing_number Index>
- + - - +
vec3< Real > const & fp::Node< Real, Index >::get_distance_vector_to vec3< Real > const & fp::Node::get_distance_vector_to (Index nn_id)Index nn_id) const
@@ -359,31 +365,28 @@

Parameters
- +
nn_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1..
nn_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1. .
-
Returns
returns the distance currently stored in the Node::nn_distances vector for the requested next neighbor. If the provided nn_id can not be found in the Node::nn_ids vector, then the function writes an error message to standard error output and terminates the program with exit code 12.
+
Returns
returns the distance currently stored in the Node::nn_distances vector for the requested next neighbor. If the provided nn_id can not be found in the Node::nn_ids vector, then the function writes an error message to standard error output and terminates the program with exit code 12.
Note
Calling this function with a wrong argument will cause the termination of the program.
- -

◆ operator==()

+ +

◆ operator==()

-
-template<floating_point_number Real, indexing_number Index>
- + - - +
bool fp::Node< Real, Index >::operator== bool fp::Node::operator== (Node< Real, Index > constother_node)Node const & other_node) const
@@ -406,33 +409,24 @@

Friends And Related Symbol Documentation

- -

◆ operator<<

+ +

◆ operator<<

-
-template<floating_point_number Real, indexing_number Index>
@@ -455,119 +449,82 @@

Member Data Documentation

- -

◆ area

+ +

◆ area

-
-template<floating_point_number Real, indexing_number Index>
- + - - + - - - - - - - +
std::ostream & operator<< std::ostream & operator<< (std::ostream & os, std::ostream & os,
Node< Real, Index > constnode 
)Node const & node )
- +
Real fp::Node< Real, Index >::areaReal fp::Node::area

Voronoi area associated with the node.

-

The Voronoi area is the sum of (mixed) Voronoi areas inside the triangles, incident to the node. Definition follows Gueguen et al. 2017.

+

The Voronoi area is the sum of (mixed) Voronoi areas inside the triangles, incident to the node. Definition follows Gueguen et al. 2017.

\[ A_{i} = \sum_{j} A'_{ij}. \]

-
See also
Triangulation::mixed_area See Figure tr1. C in Triangulation.
+
See also
Triangulation::mixed_area See Figure tr1. C in Triangulation.
-Node::curvature_vec Triangulation::update_bulk_node_geometry(Index)
+Node::curvature_vec Triangulation::update_bulk_node_geometry(Index)
- -

◆ volume

+ +

◆ volume

-
-template<floating_point_number Real, indexing_number Index>
- +
Real fp::Node< Real, Index >::volumeReal fp::Node::volume

If the node is part of a closed surface triangulation, then the volume contains the volume of the tetrahedron connected to each voronoi cell sub-triangle and the center of the lab coordinate system as defined in Gueguen et al. 2017.

-

This means that the volume of an individual node does not have a proper physical interpretation. Only the sum of all node volumes, which is given by the triangulation is interpretable as a physical volume of an object. The definition follows Gueguen et al. 2017.

+

This means that the volume of an individual node does not have a proper physical interpretation. Only the sum of all node volumes, which is given by the triangulation is interpretable as a physical volume of an object. The definition follows Gueguen et al. 2017.

\[ V_{ij} = A_{ij} \vec{x}_{i}\cdot \frac{\vec{n}_{ij,j+1}}{\| \vec{n}_{ij,j+1} \|}. \]

-

See Figure tr1. D in Triangulation.

See also
Node::curvature_vec Triangulation::update_bulk_node_geometry(Index)
- -
-
- -

◆ unit_bending_energy

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - -
Real fp::Node< Real, Index >::unit_bending_energy
-
- -

unit_bending_energy corresponds to the Helfrich bending energy with bending rigidity 1 and gaussian bending stiffness 0.

-

-\[ - \mathrm{unit\_bending\_energy} = \frac{1}{2} A_{\mathrm{node}} (2 H_{node})^2 -\] -

-

where \( H_{node} \) is the mean curvature of the node given by:

-\[ -H_{node}^2 = \frac{\vec{K}_{node}}{2A_{node}} \cdot \frac{\vec{K}_{node}}{2A_{node}} -\] -

-

, with \( \vec{K} \) denoting the Node::curvature_vector.

See also
Node::curvature_vec Triangulation::update_bulk_node_geometry(Index)
+

See Figure tr1. D in Triangulation.

See also
Node::curvature_vec Triangulation::update_bulk_node_geometry(Index)
- -

◆ curvature_vec

+ +

◆ curvature_vec

-
-template<floating_point_number Real, indexing_number Index>
- +
vec3<Real> fp::Node< Real, Index >::curvature_vecvec3<Real> fp::Node::curvature_vec

Curvature vector of the node.

-

The definition of the curvature vector follows Meyer et al. 2003.

+

The definition of the curvature vector follows Meyer et al. 2003.

\[ \vec{K}_i = \frac{1}{2A_i}\sum_{j(i)} \left( \cot\left(\alpha_{ij}^{j+1}\right) + \cot\left(\alpha_{ij}^{j-1}\right) \right)\vec{\ell}_{ij} \]

-

See Figure tr1. B in Triangulation.

See also
Node::curvature_vec Triangulation::update_bulk_node_geometry(Index)
+

See Figure tr1. B in Triangulation.

See also
Node::curvature_vec Triangulation::update_bulk_node_geometry(Index)
- -

◆ nn_ids

+ +

◆ nn_ids

-
-template<floating_point_number Real, indexing_number Index>
- +
std::vector<Index> fp::Node< Real, Index >::nn_idsstd::vector<Index> fp::Node::nn_ids
@@ -586,7 +543,7 @@

    - +

diff --git a/docs/structfp_1_1_node.js b/docs/structfp_1_1_node.js old mode 100644 new mode 100755 index 57124cc..050836c --- a/docs/structfp_1_1_node.js +++ b/docs/structfp_1_1_node.js @@ -1,18 +1,17 @@ var structfp_1_1_node = [ - [ "pop_nn", "structfp_1_1_node.html#acf3d0a7d0c7425beb820fb453c240ed3", null ], - [ "find_nns_loc_pointer", "structfp_1_1_node.html#a5959f64aafa9cd65ff0e5fed21064da3", null ], - [ "emplace_nn_id", "structfp_1_1_node.html#aefc063b2ef6645bfea2e258260a5236a", null ], - [ "get_distance_vector_to", "structfp_1_1_node.html#aa9bf52cc0dc958fca2868f640cdbcb21", null ], - [ "operator==", "structfp_1_1_node.html#a8bc7daf80f3048d114e9adfe442c5069", null ], - [ "operator<<", "structfp_1_1_node.html#ac8b3254d4da11f9069ce0cbc28aa0288", null ], - [ "id", "structfp_1_1_node.html#a4743d523ce7d4e1ea613d685af1da9be", null ], - [ "area", "structfp_1_1_node.html#a740dc7b51916c9ac29674b7c6dae5dbc", null ], - [ "volume", "structfp_1_1_node.html#ae0618b10496535a019b5a99cdc721dca", null ], - [ "unit_bending_energy", "structfp_1_1_node.html#a65a475a50241308f3dd99313c2760f26", null ], - [ "pos", "structfp_1_1_node.html#a10be91bc755ce112845d1f0a0b96c976", null ], - [ "curvature_vec", "structfp_1_1_node.html#a2b801251ab545ad8d931d09583920537", null ], - [ "nn_ids", "structfp_1_1_node.html#ae2e0c5a97ae4f47cff41a692ac6ce79a", null ], - [ "nn_distances", "structfp_1_1_node.html#a7d7b5f362addd1bb5249f573b16d0a90", null ], - [ "verlet_list", "structfp_1_1_node.html#aff4450fcb2eb2524fcb0c9025b69bc6a", null ] + [ "find_nns_loc_pointer", "structfp_1_1_node.html#ac778f9aac2fcab5e74689945bf121553", null ], + [ "pop_nn", "structfp_1_1_node.html#a6d19f21c3303cd9a02b935bf5a0a4f5e", null ], + [ "emplace_nn_id", "structfp_1_1_node.html#a7b1707f5056183bcb0b1cdba0f48449a", null ], + [ "get_distance_vector_to", "structfp_1_1_node.html#a24393815d94af2ca2b7b0ec76299bfb5", null ], + [ "operator==", "structfp_1_1_node.html#ae8fa3d1e0aacf408add48f82dec6b9d5", null ], + [ "operator<<", "structfp_1_1_node.html#ad876a0744710232bd15fa8a1365ed8c8", null ], + [ "id", "structfp_1_1_node.html#a6e66f903bd683fe1b4928a968d0093fe", null ], + [ "area", "structfp_1_1_node.html#a3fd63d6fd0d6750ad4540492c0b47265", null ], + [ "volume", "structfp_1_1_node.html#a0b6933791b51be0c3957c8a356b21732", null ], + [ "pos", "structfp_1_1_node.html#a0b35271880573fd9c47f93f8bfb7f6f2", null ], + [ "curvature_vec", "structfp_1_1_node.html#a55caf759123a0aaa9637e814254f4a0e", null ], + [ "nn_ids", "structfp_1_1_node.html#a983a7a9e7becf335988177147b76b39d", null ], + [ "nn_distances", "structfp_1_1_node.html#a460b4bb176f86cdbc78f68c4c36da4fc", null ], + [ "verlet_list", "structfp_1_1_node.html#a3434eb774e1055993007ce9cf84a12fe", null ] ]; \ No newline at end of file diff --git a/docs/structfp_1_1_node__coll__graph.dot b/docs/structfp_1_1_node__coll__graph.dot deleted file mode 100644 index dbf7fa7..0000000 --- a/docs/structfp_1_1_node__coll__graph.dot +++ /dev/null @@ -1,18 +0,0 @@ -digraph "fp::Node< Real, Index >" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="fp::Node\< Real, Index \>",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="A data structure containing all geometric and topological information associated with a node."]; - Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" id",fontcolor="grey" ]; - Node2 [id="Node000002",label="Index",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; - Node3 -> Node1 [id="edge2_Node000001_Node000003",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" area\nunit_bending_energy\nvolume",fontcolor="grey" ]; - Node3 [id="Node000003",label="Real",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; - Node4 -> Node1 [id="edge3_Node000001_Node000004",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" curvature_vec\npos",fontcolor="grey" ]; - Node4 [id="Node000004",label="vec3\< Real \>",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; - Node5 -> Node1 [id="edge4_Node000001_Node000005",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" nn_ids\nverlet_list",fontcolor="grey" ]; - Node5 [id="Node000005",label="vector\< Index \>",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; - Node6 -> Node1 [id="edge5_Node000001_Node000006",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" nn_distances",fontcolor="grey" ]; - Node6 [id="Node000006",label="vector\< fp::vec3\< Real \> \>",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; -} diff --git a/docs/structfp_1_1_node__coll__graph.map b/docs/structfp_1_1_node__coll__graph.map new file mode 100755 index 0000000..3576b6d --- /dev/null +++ b/docs/structfp_1_1_node__coll__graph.map @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/docs/structfp_1_1_node__coll__graph.md5 b/docs/structfp_1_1_node__coll__graph.md5 new file mode 100755 index 0000000..d6ec572 --- /dev/null +++ b/docs/structfp_1_1_node__coll__graph.md5 @@ -0,0 +1 @@ +1da20e292b8e1fdad1fe2bad6136c10a \ No newline at end of file diff --git a/docs/structfp_1_1_node__coll__graph.png b/docs/structfp_1_1_node__coll__graph.png new file mode 100755 index 0000000..7a2dc77 Binary files /dev/null and b/docs/structfp_1_1_node__coll__graph.png differ diff --git a/docs/structfp_1_1_node_a5959f64aafa9cd65ff0e5fed21064da3_icgraph.dot b/docs/structfp_1_1_node_a5959f64aafa9cd65ff0e5fed21064da3_icgraph.dot deleted file mode 100644 index 18142bd..0000000 --- a/docs/structfp_1_1_node_a5959f64aafa9cd65ff0e5fed21064da3_icgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::Node::find_nns_loc_pointer" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Node::find_nns\l_loc_pointer",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Node::pop_nn",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_node.html#acf3d0a7d0c7425beb820fb453c240ed3",tooltip="Find and deletes the element with the id to_pop_nn_id in the nn_id vector."]; -} diff --git a/docs/structfp_1_1_node_a6d19f21c3303cd9a02b935bf5a0a4f5e_cgraph.map b/docs/structfp_1_1_node_a6d19f21c3303cd9a02b935bf5a0a4f5e_cgraph.map new file mode 100755 index 0000000..5e7c595 --- /dev/null +++ b/docs/structfp_1_1_node_a6d19f21c3303cd9a02b935bf5a0a4f5e_cgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/structfp_1_1_node_a6d19f21c3303cd9a02b935bf5a0a4f5e_cgraph.md5 b/docs/structfp_1_1_node_a6d19f21c3303cd9a02b935bf5a0a4f5e_cgraph.md5 new file mode 100755 index 0000000..5561f7f --- /dev/null +++ b/docs/structfp_1_1_node_a6d19f21c3303cd9a02b935bf5a0a4f5e_cgraph.md5 @@ -0,0 +1 @@ +9729910ef56edde789931ee7323aa756 \ No newline at end of file diff --git a/docs/structfp_1_1_node_a6d19f21c3303cd9a02b935bf5a0a4f5e_cgraph.png b/docs/structfp_1_1_node_a6d19f21c3303cd9a02b935bf5a0a4f5e_cgraph.png new file mode 100755 index 0000000..3b7b221 Binary files /dev/null and b/docs/structfp_1_1_node_a6d19f21c3303cd9a02b935bf5a0a4f5e_cgraph.png differ diff --git a/docs/structfp_1_1_node_ac778f9aac2fcab5e74689945bf121553_icgraph.map b/docs/structfp_1_1_node_ac778f9aac2fcab5e74689945bf121553_icgraph.map new file mode 100755 index 0000000..4c1acbe --- /dev/null +++ b/docs/structfp_1_1_node_ac778f9aac2fcab5e74689945bf121553_icgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/structfp_1_1_node_ac778f9aac2fcab5e74689945bf121553_icgraph.md5 b/docs/structfp_1_1_node_ac778f9aac2fcab5e74689945bf121553_icgraph.md5 new file mode 100755 index 0000000..9d2b271 --- /dev/null +++ b/docs/structfp_1_1_node_ac778f9aac2fcab5e74689945bf121553_icgraph.md5 @@ -0,0 +1 @@ +fd4953d71d48ed060307f80940b1dd7e \ No newline at end of file diff --git a/docs/structfp_1_1_node_ac778f9aac2fcab5e74689945bf121553_icgraph.png b/docs/structfp_1_1_node_ac778f9aac2fcab5e74689945bf121553_icgraph.png new file mode 100755 index 0000000..cd31119 Binary files /dev/null and b/docs/structfp_1_1_node_ac778f9aac2fcab5e74689945bf121553_icgraph.png differ diff --git a/docs/structfp_1_1_node_acf3d0a7d0c7425beb820fb453c240ed3_cgraph.dot b/docs/structfp_1_1_node_acf3d0a7d0c7425beb820fb453c240ed3_cgraph.dot deleted file mode 100644 index c3f5475..0000000 --- a/docs/structfp_1_1_node_acf3d0a7d0c7425beb820fb453c240ed3_cgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::Node::pop_nn" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::Node::pop_nn",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Find and deletes the element with the id to_pop_nn_id in the nn_id vector."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Node::find_nns\l_loc_pointer",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_node.html#a5959f64aafa9cd65ff0e5fed21064da3",tooltip=" "]; -} diff --git a/docs/structfp_1_1_nodes-members.html b/docs/structfp_1_1_nodes-members.html old mode 100644 new mode 100755 index 979ddd6..29e1420 --- a/docs/structfp_1_1_nodes-members.html +++ b/docs/structfp_1_1_nodes-members.html @@ -3,16 +3,18 @@ - + flippy: Member List + - + + @@ -43,19 +45,24 @@
- + + @@ -73,7 +80,7 @@
@@ -99,53 +106,33 @@
-
fp::Nodes< Real, Index > Member List
+
fp::Nodes Member List
-

This is the complete list of members for fp::Nodes< Real, Index >, including all inherited members.

+

This is the complete list of members for fp::Nodes, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + +
area(Index node_id) constfp::Nodes< Real, Index >inline
begin()fp::Nodes< Real, Index >inline
begin() constfp::Nodes< Real, Index >inline
curvature_vec(Index node_id) constfp::Nodes< Real, Index >inline
datafp::Nodes< Real, Index >
displace(Index node_id, vec3< Real >const &displacement)fp::Nodes< Real, Index >inline
displace(Index node_id, vec3< Real > &&displacement)fp::Nodes< Real, Index >inline
emplace_nn_id(Index node_id, Index to_emplace_nn_id, Index loc_nn_index)fp::Nodes< Real, Index >inline
end()fp::Nodes< Real, Index >inline
end() constfp::Nodes< Real, Index >inline
get_nn_distance_vector_between(Index node_id, Index nn_id) constfp::Nodes< Real, Index >inline
make_data() constfp::Nodes< Real, Index >inline
nn_distances(Index node_id) constfp::Nodes< Real, Index >inline
nn_id(Index node_id, Index loc_nn_index) constfp::Nodes< Real, Index >inline
nn_ids(Index node_id) constfp::Nodes< Real, Index >inline
Nodes()=defaultfp::Nodes< Real, Index >
Nodes(std::vector< Node< Real, Index > > data_inp)fp::Nodes< Real, Index >inlineexplicit
Nodes(Json const &node_dict)fp::Nodes< Real, Index >inlineexplicit
operator[](Index node_id)fp::Nodes< Real, Index >inline
operator[](Index node_id) constfp::Nodes< Real, Index >inline
pos(Index node_id) constfp::Nodes< Real, Index >inline
set_area(Index node_id, Real new_area)fp::Nodes< Real, Index >inline
set_curvature_vec(Index node_id, vec3< Real > const &new_cv)fp::Nodes< Real, Index >inline
set_curvature_vec(Index node_id, vec3< Real > &&new_cv)fp::Nodes< Real, Index >inline
set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > &&dist)fp::Nodes< Real, Index >inline
set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > const &dist)fp::Nodes< Real, Index >inline
set_nn_id(Index node_id, Index loc_nn_index, Index nn_id)fp::Nodes< Real, Index >inline
set_nn_ids(Index node_id, std::vector< Index >const &new_nn_ids)fp::Nodes< Real, Index >inline
set_pos(Index node_id, vec3< Real > const &new_pos)fp::Nodes< Real, Index >inline
set_pos(Index node_id, vec3< Real > &&new_pos)fp::Nodes< Real, Index >inline
set_unit_bending_energy(Index node_id, Real new_ube)fp::Nodes< Real, Index >inline
set_volume(Index node_id, Real new_volume)fp::Nodes< Real, Index >inline
size() constfp::Nodes< Real, Index >inline
unit_bending_energy(Index node_id) constfp::Nodes< Real, Index >inline
volume(Index node_id) constfp::Nodes< Real, Index >inline
begin()fp::Nodesinline
begin() constfp::Nodesinline
datafp::Nodes
emplace_nn_id(Index node_id, Index to_emplace_nn_id, Index loc_nn_index)fp::Nodesinline
end()fp::Nodesinline
end() constfp::Nodesinline
make_data() constfp::Nodesinline
Nodes()=defaultfp::Nodes
Nodes(std::vector< Node > data_inp)fp::Nodesinlineexplicit
Nodes(Json const &node_dict)fp::Nodesinlineexplicit
operator[](Index node_id)fp::Nodesinline
operator[](Index node_id) constfp::Nodesinline
set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > &&dist)fp::Nodesinline
set_nn_distance(Index node_id, Index loc_nn_index, vec3< Real > const &dist)fp::Nodesinline
size() constfp::Nodesinline
diff --git a/docs/structfp_1_1_nodes.html b/docs/structfp_1_1_nodes.html old mode 100644 new mode 100755 index 8a296a1..5a1a912 --- a/docs/structfp_1_1_nodes.html +++ b/docs/structfp_1_1_nodes.html @@ -3,16 +3,18 @@ - + -flippy: fp::Nodes< Real, Index > Struct Template Reference +flippy: fp::Nodes Struct Reference + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
-
fp::Nodes< Real, Index > Struct Template Reference
+
fp::Nodes Struct Reference

Data structure containing all nodes of the Triangulation. - More...

+ More...

#include <Nodes.hpp>

-Collaboration diagram for fp::Nodes< Real, Index >:
+Collaboration diagram for fp::Nodes:
-
Collaboration graph
+
Collaboration graph
+ + + + +
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

Nodes ()=default
 Default constructor.
 
 Nodes (std::vector< Node< Real, Index > > data_inp)
 Constructor from a vector.
 
 Nodes (Json const &node_dict)
 Constructor from JSON.
 
std::vector< Node< Real, Index > >::iterator begin ()
 Returns an iterator to the beginning of the underlying data member that contains the collection of the nodes.
 
std::vector< Node< Real, Index > >::const_iterator begin () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
std::vector< Node< Real, Index > >::iterator end ()
 Returns an iterator to the end of the underlying data member that contains the collection of the nodes.
 
std::vector< Node< Real, Index > >::const_iterator end () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const vec3< Real > & pos (Index node_id) const
 Given a node id, return the constant reference to the node position.
 
void set_pos (Index node_id, vec3< Real > const &new_pos)
 Sets the position of the requested node to a given position.
 
void set_pos (Index node_id, vec3< Real > &&new_pos)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void displace (Index node_id, vec3< Real >const &displacement)
 Changes the position of the requested node by a given displacement.
 
void displace (Index node_id, vec3< Real > &&displacement)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const vec3< Real > & curvature_vec (Index node_id) const
 Given a node id, return the constant reference to the node curvature vector.
 
void set_curvature_vec (Index node_id, vec3< Real > const &new_cv)
 Given a node id and a new curvature vector, reset the node's current curvature vector.
 
void set_curvature_vec (Index node_id, vec3< Real > &&new_cv)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Real area (Index node_id) const
 Given a node id, return node associated area.
 
void set_area (Index node_id, Real new_area)
 Given a node id and a new area value, reset the current value of the node area.
 
Real volume (Index node_id) const
 Given a node id, return node associated volume.
 
void set_volume (Index node_id, Real new_volume)
 Given a node id and a new volume value, reset the current value of the node volume.
 
Real unit_bending_energy (Index node_id) const
 Given a node id, return node-associated unit bending energy.
 
void set_unit_bending_energy (Index node_id, Real new_ube)
 
const autonn_ids (Index node_id) const
 Given a node id and a new value for the node-associated unit bending energy, update the current value of Node::unit_bending_energy.
 
void set_nn_ids (Index node_id, std::vector< Index >const &new_nn_ids)
 For a Node specified by node_id, overwrite the entire Node::nn_ids vector.
 
Index nn_id (Index node_id, Index loc_nn_index) const
 Given a node id and the local index in the Node::nn_ids vector, returns the next neighbour id.
 
void set_nn_id (Index node_id, Index loc_nn_index, Index nn_id)
 For a node specified by node_id, resets the value of the requested nn_id.
 
void emplace_nn_id (Index node_id, Index to_emplace_nn_id, Index loc_nn_index)
 Emplace a the id of a new node in the Node::nn_ids vector, in front of the loc_idx position.
 
const autonn_distances (Index node_id) const
 Given a node id, returns the std::vector containing distance vectors to next neighbours.
 
const autoget_nn_distance_vector_between (Index node_id, Index nn_id) const
 Given two global node ids, returns a distance vector (if the nodes are neighbors).
 
void set_nn_distance (Index node_id, Index loc_nn_index, vec3< Real > &&dist)
 Overwrite the next neighbor distance with a new 3d vector.
 
void set_nn_distance (Index node_id, Index loc_nn_index, vec3< Real > const &dist)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Index size () const
 Size of the Nodes data member.
 
Node< Real, Index > & operator[] (Index node_id)
 Square bracket operator overload for convenient indexing of the Nodes struct.
 
const Node< Real, Index > & operator[] (Index node_id) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Json make_data () const
 Serialize the Nodes struct to a JSON object.
 
Nodes ()=default
 Default constructor.
 
 Nodes (std::vector< Node > data_inp)
 Constructor from a vector.
 
 Nodes (Json const &node_dict)
 Constructor from JSON.
 
std::vector< Node >::iterator begin ()
 Returns an iterator to the beginning of the underlying data member that contains the collection of the nodes.
 
std::vector< Node >::const_iterator begin () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
std::vector< Node >::iterator end ()
 Returns an iterator to the end of the underlying data member that contains the collection of the nodes.
 
std::vector< Node >::const_iterator end () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void emplace_nn_id (Index node_id, Index to_emplace_nn_id, Index loc_nn_index)
 Emplace a the id of a new node in the Node::nn_ids vector, in front of the loc_idx position.
 
void set_nn_distance (Index node_id, Index loc_nn_index, vec3< Real > &&dist)
 Overwrite the next neighbor distance with a new 3d vector.
 
void set_nn_distance (Index node_id, Index loc_nn_index, vec3< Real > const &dist)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Index size () const
 Size of the Nodes data member.
 
Nodeoperator[] (Index node_id)
 Square bracket operator overload for convenient indexing of the Nodes struct.
 
const Nodeoperator[] (Index node_id) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Json make_data () const
 Serialize the Nodes struct to a JSON object.
 
- - - + + +

Public Attributes

-std::vector< Node< Real, Index > > data
 Data member that contains the individual nodes.
 
+std::vector< Nodedata
 Data member that contains the individual nodes.
 

Detailed Description

-
template<floating_point_number Real, indexing_number Index>
-struct fp::Nodes< Real, Index >

Data structure containing all nodes of the Triangulation.

-

The Nodes struct is capable of reinitializing nodes from a well-formed JSON object or from a simple std::vector that contains all nodes of a triangulation. The nodes class is basically a wrapper around a vector of nodes, i.e., std::vector<Node<Real, Index>>, and provides additional functionality to manipulate and query this data structure. Nodes class is also meant to be the interface with which the end user is manipulating individual nodes.

Template Parameters
+

Data structure containing all nodes of the Triangulation.

+

The Nodes struct is capable of reinitializing nodes from a well-formed JSON object or from a simple std::vector that contains all nodes of a triangulation. The nodes class is basically a wrapper around a vector of nodes, i.e., std::vector<Node>, and provides additional functionality to manipulate and query this data structure. Nodes class is also meant to be the interface with which the end user is manipulating individual nodes.

Template Parameters
- - + +
Realtype that will be used for all floating point numbers inside this class/struct. Any data type that satisfies the floating_point_number concept is allowed, for example, float.
Indextype that will be used for all integer numbers inside this class/struct. Any data type that satisfies the indexing_number concept is allowed, for example, unsigned int.
Realtype that will be used for all floating point numbers inside this class/struct. Any data type that satisfies the floating_point_number concept is allowed, for example, float.
Indextype that will be used for all integer numbers inside this class/struct. Any data type that satisfies the indexing_number concept is allowed, for example, unsigned int.

Constructor & Destructor Documentation

- -

◆ Nodes() [1/2]

+ +

◆ Nodes() [1/2]

-
-template<floating_point_number Real, indexing_number Index>
- + - - +
fp::Nodes< Real, Index >::Nodes fp::Nodes::Nodes (std::vector< Node< Real, Index > > data_inp)std::vector< Node > data_inp)
@@ -276,22 +225,19 @@

-

◆ Nodes() [2/2]

+ +

◆ Nodes() [2/2]

-
-template<floating_point_number Real, indexing_number Index>
- + - - +
fp::Nodes< Real, Index >::Nodes fp::Nodes::Nodes (Json constnode_dict)Json const & node_dict)
@@ -310,30 +256,23 @@

Warning
If the JSON object is malformed, then the constructor will fail and propagate a runtime error from the JSON parser.
-
-Here is the call graph for this function:
-
-
-

Member Function Documentation

-
-

◆ begin() [1/2]

+ +

◆ begin() [1/2]

-
-template<floating_point_number Real, indexing_number Index>
- + - +
std::vector< Node< Real, Index > >::iterator fp::Nodes< Real, Index >::begin std::vector< Node >::iterator fp::Nodes::begin ())
@@ -346,30 +285,49 @@

Nodes struct to be used in range-based for loops.

Returns
data.begin()
+
+Here is the caller graph for this function:
+
+
+ + + + + + + + + + + + + + + + +
- -

◆ begin() [2/2]

+ +

◆ begin() [2/2]

-
-template<floating_point_number Real, indexing_number Index>
+inlinenodiscard
- + - +
std::vector< Node< Real, Index > >::const_iterator fp::Nodes< Real, Index >::begin std::vector< Node >::const_iterator fp::Nodes::begin ()) const
-inline
@@ -379,21 +337,19 @@

-

◆ end() [1/2]

+ +

◆ end() [1/2]

-
-template<floating_point_number Real, indexing_number Index>
- + - +
std::vector< Node< Real, Index > >::iterator fp::Nodes< Real, Index >::end std::vector< Node >::iterator fp::Nodes::end ())
@@ -406,286 +362,81 @@

Nodes struct to be used in range-based for loops.

Returns
data.end().
- - - - -

◆ end() [2/2]

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - -
std::vector< Node< Real, Index > >::const_iterator fp::Nodes< Real, Index >::end () const
-
-inline
-
- -

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

-

This function allows the Nodes struct to be used in range-based for loops in constant environments.

Returns
a constant iterator data.end().
- -
-
- -

◆ pos()

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - - -
const vec3< Real > & fp::Nodes< Real, Index >::pos (Index node_id) const
-
-inline
-
- -

Given a node id, return the constant reference to the node position.

-
Parameters
- - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
-
-
-
Returns
Constant reference to the 3D vector of the node position, Node::pos.
Here is the caller graph for this function:
-
-
- +
+ + + + + + + + + + + + + + + +
-
- -

◆ set_pos() [1/2]

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - - - - - - - - - - - - -
void fp::Nodes< Real, Index >::set_pos (Index node_id,
vec3< Real > constnew_pos 
)
-
-inline
-
- -

Sets the position of the requested node to a given position.

-
Parameters
- - - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1. This node needs to be moved.
new_posnew position of the node to which the node needs to be moved.
-
-
- -

◆ set_pos() [2/2]

+ +

◆ end() [2/2]

-
-template<floating_point_number Real, indexing_number Index>
+inlinenodiscard
- + - - - - - - - - - - - - - + +
void fp::Nodes< Real, Index >::set_pos std::vector< Node >::const_iterator fp::Nodes::end (Index node_id,
vec3< Real > && new_pos 
)) const
-inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

-
Parameters
- - - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1. This node needs to be moved.
new_posnew position of the node to which the node needs to be moved.
-
-
+

This function allows the Nodes struct to be used in range-based for loops in constant environments.

Returns
a constant iterator data.end().
- -

◆ displace() [1/2]

+ +

◆ emplace_nn_id()

-
-template<floating_point_number Real, indexing_number Index>
- - -
- + - - + - - - - - - - - -
void fp::Nodes< Real, Index >::displace void fp::Nodes::emplace_nn_id (Index node_id, Index node_id,
vec3< Real >constdisplacement 
)
-
-inline
-
- -

Changes the position of the requested node by a given displacement.

-
Parameters
- - - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1. This node needs to be moved.
displacementThe displacement vector that will be added to the position vector of the node.
-
-
- -
-
- -

◆ displace() [2/2]

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - + - - - - - - - - -
void fp::Nodes< Real, Index >::displace (Index node_id, Index to_emplace_nn_id,
vec3< Real > && displacement 
)
-
-inline
-
- -

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

-
Parameters
- - - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1. This node needs to be moved.
displacementThe displacement vector that will be added to the position vector of the node.
-
-
- -
-
- -

◆ curvature_vec()

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - @@ -695,49 +446,60 @@

-

Given a node id, return the constant reference to the node curvature vector.

-
Parameters
+

Emplace a the id of a new node in the Node::nn_ids vector, in front of the loc_idx position.

+

This function is a wrapper around Node::emplace_nn_id(Index , vec3<Real> const& , Index).

Parameters

- - - - - - - +
const vec3< Real > & fp::Nodes< Real, Index >::curvature_vec (Index node_id) constIndex loc_nn_index )
+ +
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
to_emplace_nn_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1.
loc_nn_indexLocal index in the Node::nn_ids vector, a number between 0 and Node::nn_ids.size() - 1.
-
Returns
Constant reference to the 3D vector of the node curvature, Node::curvature_vec.
Here is the caller graph for this function:
-
+
+ + + + + + + + + + + + + +
- -

◆ set_curvature_vec() [1/2]

+ +

◆ set_nn_distance() [1/2]

-
-template<floating_point_number Real, indexing_number Index>
@@ -747,44 +509,41 @@

-

Given a node id and a new curvature vector, reset the node's current curvature vector.

+

Overwrite the next neighbor distance with a new 3d vector.

Parameters

- + - - + - - + + - - +
void fp::Nodes< Real, Index >::set_curvature_vec void fp::Nodes::set_nn_distance (Index node_id, Index node_id,
vec3< Real > constnew_cv Index loc_nn_index,
)vec3< Real > && dist )
- - + + +
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
new_cvConstant lvalue reference to the new 3d curvature vector Node::curvature_vec.
node_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1.
loc_nn_indexLocal index in the Node::nn_ids vector, a number between 0 and Node::nn_ids.size() - 1.
distrvalue reference to a 3D distance vector (that points from node_id to its next neighbour).
- -

◆ set_curvature_vec() [2/2]

+ +

◆ set_nn_distance() [2/2]

-
-template<floating_point_number Real, indexing_number Index>
@@ -797,83 +556,86 @@

Parameters

- + - - + - - + + - - +
void fp::Nodes< Real, Index >::set_curvature_vec void fp::Nodes::set_nn_distance (Index node_id, Index node_id,
vec3< Real > && new_cv Index loc_nn_index,
)vec3< Real > const & dist )
- - + + +
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
new_cvrvalue reference to the new 3d curvature vector Node::curvature_vec.
node_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1.
loc_nn_indexLocal index in the Node::nn_ids vector, a number between 0 and Node::nn_ids.size() - 1.
distlvalue constant reference to a 3D distance vector (that points from node_id to its next neighbour).
- -

◆ area()

+ +

◆ size()

-
-template<floating_point_number Real, indexing_number Index>
+inlinenodiscard
- + - - +
Real fp::Nodes< Real, Index >::area Index fp::Nodes::size (Index node_id)) const
-inline
-

Given a node id, return node associated area.

-
Parameters
- - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
-
-
-
Returns
Area associated with the node, Node::area.
+

Size of the Nodes data member.

+
Returns
Size of the data vector, same as the number of nodes.
Here is the caller graph for this function:
-
+
+ + + + + + + + + + + + + + + + + + + + + + + +
- -

◆ set_area()

+ +

◆ operator[]() [1/2]

-
-template<floating_point_number Real, indexing_number Index>
@@ -883,33 +645,30 @@

-

Given a node id and a new area value, reset the current value of the node area.

-
Parameters
+

Square bracket operator overload for convenient indexing of the Nodes struct.

+

Nodes[node_id] is the same as Nodes.data[node_id].

Parameters

- + - - - - - - - - - - + - -
void fp::Nodes< Real, Index >::set_area Node & fp::Nodes::operator[] (Index node_id,
Real new_area 
Index node_id) )
-
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
new_areaValue for the new node associated area Node::area.
+
Returns
Reference to the Node struct with the id corresponding to node_id.
- -

◆ volume()

+ +

◆ operator[]() [2/2]

-
-template<floating_point_number Real, indexing_number Index>
- + - - +
Real fp::Nodes< Real, Index >::volume const Node & fp::Nodes::operator[] (Index node_id)Index node_id) const
@@ -920,748 +679,52 @@

-

Given a node id, return node associated volume.

-
Parameters
- - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
-
-
-
Returns
Area associated to the node, Node::volume.
-
-Here is the caller graph for this function:
-
-
-
- - - - -

◆ set_volume()

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - - - - - - - - - - - - -
void fp::Nodes< Real, Index >::set_volume (Index node_id,
Real new_volume 
)
-
-inline
-
- -

Given a node id and a new volume value, reset the current value of the node volume.

-
Parameters
+

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

+

Nodes[node_id] in the constant environment is the same as Nodes.data.at(node_id).

Parameters
-
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
new_volumeValue for the new node associated volume Node::volume.
+
Returns
Constant reference to the Node struct with the id corresponding to node_id.
- -

◆ unit_bending_energy()

+ +

◆ make_data()

-
-template<floating_point_number Real, indexing_number Index>
+inlinenodiscard
- + - - +
Real fp::Nodes< Real, Index >::unit_bending_energy Json fp::Nodes::make_data (Index node_id)) const
-inline
-

Given a node id, return node-associated unit bending energy.

-
Parameters
- - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
-
-
-
Returns
Area associated to the node, Node::unit_bending_energy.
+

Serialize the Nodes struct to a JSON object.

+
Returns
JSON object that represents a serialization of the data contained in Nodes. This JSON object can later be used to reconstruct the Nodes object.
Here is the caller graph for this function:
-
-
- +
+ + + + +
-
- -

◆ set_unit_bending_energy()

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - - - - - - - - - - - - -
void fp::Nodes< Real, Index >::set_unit_bending_energy (Index node_id,
Real new_ube 
)
-
-inline
-
-
Parameters
- - - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
new_ubeNew value of the unit bending energy (mathematical definition can be found at Node::unit_bending_energy).
-
-
- -
-
- -

◆ nn_ids()

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - - -
const auto & fp::Nodes< Real, Index >::nn_ids (Index node_id) const
-
-inline
-
- -

Given a node id and a new value for the node-associated unit bending energy, update the current value of Node::unit_bending_energy.

-

Given a node id, return the constant reference to the nn_ids std::vector.

-
Parameters
- - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
-
-
-
Returns
Constant reference to the std::vector containing next neighbour ids of the node, Node::nn_ids.
- -
-
- -

◆ set_nn_ids()

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - - - - - - - - - - - - -
void fp::Nodes< Real, Index >::set_nn_ids (Index node_id,
std::vector< Index >constnew_nn_ids 
)
-
-inline
-
- -

For a Node specified by node_id, overwrite the entire Node::nn_ids vector.

-
Parameters
- - - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
new_nn_idsconst reference to the standard vector containing new values of nn_ids
-
-
-
Warning
This function does not check the provided new_nn_ids vector on correctness. If the content is wrong in any way (order is wrong or contained ids are not actual next neighbors of the node), then the update will cause problems with the proper function of flippy later!
- -
-
- -

◆ nn_id()

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - - - - - - - - - - - - -
Index fp::Nodes< Real, Index >::nn_id (Index node_id,
Index loc_nn_index 
) const
-
-inline
-
- -

Given a node id and the local index in the Node::nn_ids vector, returns the next neighbour id.

-
Parameters
- - - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
loc_nn_indexLocal index in the Node::nn_ids vector, a number between 0 and Node::nn_ids.size() - 1.
-
-
-
Returns
The global id of the next neighbor that was stored at the position loc_nn_index in the Node::nn_ids vector of the node with the id of node_id.
-
-Here is the caller graph for this function:
-
-
-
- -
-
- -

◆ set_nn_id()

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void fp::Nodes< Real, Index >::set_nn_id (Index node_id,
Index loc_nn_index,
Index nn_id 
)
-
-inline
-
- -

For a node specified by node_id, resets the value of the requested nn_id.

-
Parameters
- - - - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
loc_nn_indexLocal index in the Node::nn_ids vector, a number between 0 and Node::nn_ids.size() - 1.
nn_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1.
-
-
-
-Here is the call graph for this function:
-
-
-
- -
-
- -

◆ emplace_nn_id()

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void fp::Nodes< Real, Index >::emplace_nn_id (Index node_id,
Index to_emplace_nn_id,
Index loc_nn_index 
)
-
-inline
-
- -

Emplace a the id of a new node in the Node::nn_ids vector, in front of the loc_idx position.

-

This function is a wrapper around Node::emplace_nn_id(Index , vec3<Real> const& , Index).

Parameters
- - - - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
to_emplace_nn_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1.
loc_nn_indexLocal index in the Node::nn_ids vector, a number between 0 and Node::nn_ids.size() - 1.
-
-
-
-Here is the call graph for this function:
-
-
-
- -
-
- -

◆ nn_distances()

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - - -
const auto & fp::Nodes< Real, Index >::nn_distances (Index node_id) const
-
-inline
-
- -

Given a node id, returns the std::vector containing distance vectors to next neighbours.

-

The order of Node::nn_distances is the same as that of Node::nn_ids, this is guaranteed by Triangulation::update_nn_distance_vectors(Index node_id)

Parameters
- - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
-
-
-
Returns
Associated std::vector containing all vec3 distance vectors from the node to its neighbors, Node::nn_distances.
-
-Here is the caller graph for this function:
-
-
-
- -
-
- -

◆ get_nn_distance_vector_between()

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - - - - - - - - - - - - -
const auto & fp::Nodes< Real, Index >::get_nn_distance_vector_between (Index node_id,
Index nn_id 
) const
-
-inline
-
- -

Given two global node ids, returns a distance vector (if the nodes are neighbors).

-

This function is a wrapper around fp::Node::get_distance_vector_to(Index) const.

Parameters
- - - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
nn_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1.
-
-
-
Returns
Looks in the Node::nn_distances vector of the node (specified by node_id) for the distance to nn_id. A proper distance vector will be returned if the two nodes are neighbors. Otherwise, the program will terminate.
-
Note
Calling this function with a wrong argument will cause the termination of the program.
-
-Here is the call graph for this function:
-
-
-
- -
-
- -

◆ set_nn_distance() [1/2]

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void fp::Nodes< Real, Index >::set_nn_distance (Index node_id,
Index loc_nn_index,
vec3< Real > && dist 
)
-
-inline
-
- -

Overwrite the next neighbor distance with a new 3d vector.

-
Parameters
- - - - -
node_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1.
loc_nn_indexLocal index in the Node::nn_ids vector, a number between 0 and Node::nn_ids.size() - 1.
distrvalue reference to a 3D distance vector (that points from node_id to its next neighbour).
-
-
- -
-
- -

◆ set_nn_distance() [2/2]

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void fp::Nodes< Real, Index >::set_nn_distance (Index node_id,
Index loc_nn_index,
vec3< Real > constdist 
)
-
-inline
-
- -

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

-
Parameters
- - - - -
node_idGlobal id of the next neighbor Node, which is a number between 0 and max_number_of_nodes - 1.
loc_nn_indexLocal index in the Node::nn_ids vector, a number between 0 and Node::nn_ids.size() - 1.
distlvalue constant reference to a 3D distance vector (that points from node_id to its next neighbour).
-
-
- -
-
- -

◆ size()

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - -
Index fp::Nodes< Real, Index >::size () const
-
-inline
-
- -

Size of the Nodes data member.

-
Returns
Size of the data vector, same as the number of nodes.
- -
-
- -

◆ operator[]() [1/2]

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - - -
Node< Real, Index > & fp::Nodes< Real, Index >::operator[] (Index node_id)
-
-inline
-
- -

Square bracket operator overload for convenient indexing of the Nodes struct.

-

Nodes[node_id] is the same as Nodes.data[node_id].

Parameters
- - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
-
-
-
Returns
Reference to the Node struct with the id corresponding to node_id.
- -
-
- -

◆ operator[]() [2/2]

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - - -
const Node< Real, Index > & fp::Nodes< Real, Index >::operator[] (Index node_id) const
-
-inline
-
- -

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

-

Nodes[node_id] in the constant environment is the same as Nodes.data.at(node_id).

Parameters
- - -
node_idGlobal id of the Node, which is a number between 0 and max_number_of_nodes - 1.
-
-
-
Returns
Constant reference to the Node struct with the id corresponding to node_id.
- -
-
- -

◆ make_data()

- -
-
-
-template<floating_point_number Real, indexing_number Index>
- - - - - -
- - - - - - - -
Json fp::Nodes< Real, Index >::make_data () const
-
-inline
-
- -

Serialize the Nodes struct to a JSON object.

-
Returns
JSON object that represents a serialization of the data contained in Nodes. This JSON object can later be used to reconstruct the Nodes object.
@@ -1674,7 +737,7 @@

    - +
diff --git a/docs/structfp_1_1_nodes.js b/docs/structfp_1_1_nodes.js old mode 100644 new mode 100755 index 7538ad8..739573a --- a/docs/structfp_1_1_nodes.js +++ b/docs/structfp_1_1_nodes.js @@ -1,38 +1,18 @@ var structfp_1_1_nodes = [ - [ "Nodes", "structfp_1_1_nodes.html#ab29b1bbd7bae02bdda2a0a94581235bb", null ], - [ "Nodes", "structfp_1_1_nodes.html#afcdc1fecf1c86ee26bd4a04e3126dcc8", null ], - [ "Nodes", "structfp_1_1_nodes.html#aeab72aa27fd66417ac8d5d0c9d000be6", null ], - [ "begin", "structfp_1_1_nodes.html#a9d3d31a706daef6476a29f69903680b2", null ], - [ "begin", "structfp_1_1_nodes.html#afe2daadebb5cbc9a793542609cde6980", null ], - [ "end", "structfp_1_1_nodes.html#ac67b161f99d11ae61df2fe05fa3d46e0", null ], - [ "end", "structfp_1_1_nodes.html#ad90ef5ea66c12a63a491fe15497e4f6e", null ], - [ "pos", "structfp_1_1_nodes.html#a44304df70878d39c9c55ce6cba0cec3d", null ], - [ "set_pos", "structfp_1_1_nodes.html#ad441e229389a483f2184c9f3ef0647f4", null ], - [ "set_pos", "structfp_1_1_nodes.html#ab0d598ecd535f690a99d81dd4e717d1e", null ], - [ "displace", "structfp_1_1_nodes.html#af206c67619617f5e4d99ea67be94a7d6", null ], - [ "displace", "structfp_1_1_nodes.html#a9c703086e73c0a1d2b5ff1d8b482c384", null ], - [ "curvature_vec", "structfp_1_1_nodes.html#aac8eaef6c3fa8679dfafcb4018573233", null ], - [ "set_curvature_vec", "structfp_1_1_nodes.html#a563539f00c190fb8fd9fedd6a27bc769", null ], - [ "set_curvature_vec", "structfp_1_1_nodes.html#a535f08dde803985251f08b7f02fa043a", null ], - [ "area", "structfp_1_1_nodes.html#ab863d48ecbce98b85747961bbaae82a9", null ], - [ "set_area", "structfp_1_1_nodes.html#ac77577ce16f2b8ff1feceb217c6853e1", null ], - [ "volume", "structfp_1_1_nodes.html#a0d791117fddd2490c8223a74de6f9109", null ], - [ "set_volume", "structfp_1_1_nodes.html#a4431ab5e1cf3dbc768558ae5b9132bef", null ], - [ "unit_bending_energy", "structfp_1_1_nodes.html#ab65c2e5dd4f3b43b2445b62c400107e9", null ], - [ "set_unit_bending_energy", "structfp_1_1_nodes.html#ae4dcac75731ab83b336c27ded5df8e8d", null ], - [ "nn_ids", "structfp_1_1_nodes.html#aa149044ed9e33aa0560311362cd2c660", null ], - [ "set_nn_ids", "structfp_1_1_nodes.html#a8aa1bcb4a83a714a2abeaaae500a949a", null ], - [ "nn_id", "structfp_1_1_nodes.html#a65c0fd75105d0110c204b2b9c2af5640", null ], - [ "set_nn_id", "structfp_1_1_nodes.html#a14a196ade9731f70eeed6446b32854ca", null ], - [ "emplace_nn_id", "structfp_1_1_nodes.html#a53ecc9a931522c8f339dadb2232a528a", null ], - [ "nn_distances", "structfp_1_1_nodes.html#aeaac33789677da84759647308c5f25da", null ], - [ "get_nn_distance_vector_between", "structfp_1_1_nodes.html#a8efb079f96664cee5698ccdf9e6bc080", null ], - [ "set_nn_distance", "structfp_1_1_nodes.html#a0019211410eea70cd8a4eecad4498992", null ], - [ "set_nn_distance", "structfp_1_1_nodes.html#a7152c3eab97faef371f717aa1f144a5b", null ], - [ "size", "structfp_1_1_nodes.html#a00b3ff9ae4af9a804478d246a0c8c7a1", null ], - [ "operator[]", "structfp_1_1_nodes.html#a093e30bf91fecce01cb2a963cdad6415", null ], - [ "operator[]", "structfp_1_1_nodes.html#abfaa815fd0dacc7d85fd75a011fbebdc", null ], - [ "make_data", "structfp_1_1_nodes.html#aa9d0a78ec3fc2f687a3731662619ab44", null ], - [ "data", "structfp_1_1_nodes.html#af791310b96e308cbf01b4b76143de337", null ] + [ "Nodes", "structfp_1_1_nodes.html#ad937cf2a8083d6ae76a3c87df5039acd", null ], + [ "Nodes", "structfp_1_1_nodes.html#ad4b4a1489e67c8b8a771747ac06ca737", null ], + [ "Nodes", "structfp_1_1_nodes.html#ae323a7bf83801c87bf2f025da5298fb2", null ], + [ "begin", "structfp_1_1_nodes.html#a9244b582d9d23771c04ef519a4014edf", null ], + [ "begin", "structfp_1_1_nodes.html#ad2a7c65781572c572990b17c858a1a19", null ], + [ "end", "structfp_1_1_nodes.html#adfa27f36d1528e84e9b56f4f94f534dd", null ], + [ "end", "structfp_1_1_nodes.html#a164cd75d798ffa77755f85646df1c1b7", null ], + [ "emplace_nn_id", "structfp_1_1_nodes.html#a30ea8ac2096ede34251f77fbea6be2d2", null ], + [ "set_nn_distance", "structfp_1_1_nodes.html#a173a6dd148343b6c4ebfa33349c8429d", null ], + [ "set_nn_distance", "structfp_1_1_nodes.html#aa01e86f1e81e916acbcc63b4248f74a8", null ], + [ "size", "structfp_1_1_nodes.html#a6eca1b76638e0a84bbd2bf4a031da3ab", null ], + [ "operator[]", "structfp_1_1_nodes.html#a0edc1acce52483313a3356e5d42c4f5c", null ], + [ "operator[]", "structfp_1_1_nodes.html#ae967626cf335321bd0a370d2064b79fd", null ], + [ "make_data", "structfp_1_1_nodes.html#a098083d4c3f7ad848fb70837b7ece0f5", null ], + [ "data", "structfp_1_1_nodes.html#a9567e304f667f8863de0b8a18a04cc90", null ] ]; \ No newline at end of file diff --git a/docs/structfp_1_1_nodes__coll__graph.dot b/docs/structfp_1_1_nodes__coll__graph.dot deleted file mode 100644 index d0009a1..0000000 --- a/docs/structfp_1_1_nodes__coll__graph.dot +++ /dev/null @@ -1,10 +0,0 @@ -digraph "fp::Nodes< Real, Index >" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="fp::Nodes\< Real, Index \>",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Data structure containing all nodes of the Triangulation."]; - Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" data",fontcolor="grey" ]; - Node2 [id="Node000002",label="vector\< fp::Node\< Real,\l Index \> \>",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; -} diff --git a/docs/structfp_1_1_nodes__coll__graph.map b/docs/structfp_1_1_nodes__coll__graph.map new file mode 100755 index 0000000..b04b49d --- /dev/null +++ b/docs/structfp_1_1_nodes__coll__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/structfp_1_1_nodes__coll__graph.md5 b/docs/structfp_1_1_nodes__coll__graph.md5 new file mode 100755 index 0000000..3c5b179 --- /dev/null +++ b/docs/structfp_1_1_nodes__coll__graph.md5 @@ -0,0 +1 @@ +b1b868cf1d85495897d373d1cfd6fb9e \ No newline at end of file diff --git a/docs/structfp_1_1_nodes__coll__graph.png b/docs/structfp_1_1_nodes__coll__graph.png new file mode 100755 index 0000000..483739a Binary files /dev/null and b/docs/structfp_1_1_nodes__coll__graph.png differ diff --git a/docs/structfp_1_1_nodes_a098083d4c3f7ad848fb70837b7ece0f5_icgraph.map b/docs/structfp_1_1_nodes_a098083d4c3f7ad848fb70837b7ece0f5_icgraph.map new file mode 100755 index 0000000..38b7578 --- /dev/null +++ b/docs/structfp_1_1_nodes_a098083d4c3f7ad848fb70837b7ece0f5_icgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/structfp_1_1_nodes_a098083d4c3f7ad848fb70837b7ece0f5_icgraph.md5 b/docs/structfp_1_1_nodes_a098083d4c3f7ad848fb70837b7ece0f5_icgraph.md5 new file mode 100755 index 0000000..d9f4ecd --- /dev/null +++ b/docs/structfp_1_1_nodes_a098083d4c3f7ad848fb70837b7ece0f5_icgraph.md5 @@ -0,0 +1 @@ +d2e1d56b69889dcb46292b6601f1715d \ No newline at end of file diff --git a/docs/structfp_1_1_nodes_a098083d4c3f7ad848fb70837b7ece0f5_icgraph.png b/docs/structfp_1_1_nodes_a098083d4c3f7ad848fb70837b7ece0f5_icgraph.png new file mode 100755 index 0000000..cbd06aa Binary files /dev/null and b/docs/structfp_1_1_nodes_a098083d4c3f7ad848fb70837b7ece0f5_icgraph.png differ diff --git a/docs/structfp_1_1_nodes_a0d791117fddd2490c8223a74de6f9109_icgraph.dot b/docs/structfp_1_1_nodes_a0d791117fddd2490c8223a74de6f9109_icgraph.dot deleted file mode 100644 index fe77bcf..0000000 --- a/docs/structfp_1_1_nodes_a0d791117fddd2490c8223a74de6f9109_icgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::Nodes::volume" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Nodes::volume",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Given a node id, return node associated volume."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Nodes::Nodes",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#aeab72aa27fd66417ac8d5d0c9d000be6",tooltip="Constructor from JSON."]; -} diff --git a/docs/structfp_1_1_nodes_a14a196ade9731f70eeed6446b32854ca_cgraph.dot b/docs/structfp_1_1_nodes_a14a196ade9731f70eeed6446b32854ca_cgraph.dot deleted file mode 100644 index 40465fe..0000000 --- a/docs/structfp_1_1_nodes_a14a196ade9731f70eeed6446b32854ca_cgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::Nodes::set_nn_id" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::Nodes::set_nn_id",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="For a node specified by node_id, resets the value of the requested nn_id."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Nodes::nn_id",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#a65c0fd75105d0110c204b2b9c2af5640",tooltip="Given a node id and the local index in the Node::nn_ids vector, returns the next neighbour id."]; -} diff --git a/docs/structfp_1_1_nodes_a30ea8ac2096ede34251f77fbea6be2d2_icgraph.map b/docs/structfp_1_1_nodes_a30ea8ac2096ede34251f77fbea6be2d2_icgraph.map new file mode 100755 index 0000000..c1bc796 --- /dev/null +++ b/docs/structfp_1_1_nodes_a30ea8ac2096ede34251f77fbea6be2d2_icgraph.map @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/docs/structfp_1_1_nodes_a30ea8ac2096ede34251f77fbea6be2d2_icgraph.md5 b/docs/structfp_1_1_nodes_a30ea8ac2096ede34251f77fbea6be2d2_icgraph.md5 new file mode 100755 index 0000000..e11d902 --- /dev/null +++ b/docs/structfp_1_1_nodes_a30ea8ac2096ede34251f77fbea6be2d2_icgraph.md5 @@ -0,0 +1 @@ +248d60a37bdfd2c045ef2cfe6b49d27a \ No newline at end of file diff --git a/docs/structfp_1_1_nodes_a30ea8ac2096ede34251f77fbea6be2d2_icgraph.png b/docs/structfp_1_1_nodes_a30ea8ac2096ede34251f77fbea6be2d2_icgraph.png new file mode 100755 index 0000000..9ed2850 Binary files /dev/null and b/docs/structfp_1_1_nodes_a30ea8ac2096ede34251f77fbea6be2d2_icgraph.png differ diff --git a/docs/structfp_1_1_nodes_a44304df70878d39c9c55ce6cba0cec3d_icgraph.dot b/docs/structfp_1_1_nodes_a44304df70878d39c9c55ce6cba0cec3d_icgraph.dot deleted file mode 100644 index 71ceb44..0000000 --- a/docs/structfp_1_1_nodes_a44304df70878d39c9c55ce6cba0cec3d_icgraph.dot +++ /dev/null @@ -1,13 +0,0 @@ -digraph "fp::Nodes::pos" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Nodes::pos",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Given a node id, return the constant reference to the node position."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Nodes::emplace\l_nn_id",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#a53ecc9a931522c8f339dadb2232a528a",tooltip="Emplace a the id of a new node in the Node::nn_ids vector, in front of the loc_idx position."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Nodes::Nodes",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#aeab72aa27fd66417ac8d5d0c9d000be6",tooltip="Constructor from JSON."]; -} diff --git a/docs/structfp_1_1_nodes_a53ecc9a931522c8f339dadb2232a528a_cgraph.dot b/docs/structfp_1_1_nodes_a53ecc9a931522c8f339dadb2232a528a_cgraph.dot deleted file mode 100644 index 8cb0cf2..0000000 --- a/docs/structfp_1_1_nodes_a53ecc9a931522c8f339dadb2232a528a_cgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::Nodes::emplace_nn_id" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::Nodes::emplace\l_nn_id",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Emplace a the id of a new node in the Node::nn_ids vector, in front of the loc_idx position."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Nodes::pos",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#a44304df70878d39c9c55ce6cba0cec3d",tooltip="Given a node id, return the constant reference to the node position."]; -} diff --git a/docs/structfp_1_1_nodes_a65c0fd75105d0110c204b2b9c2af5640_icgraph.dot b/docs/structfp_1_1_nodes_a65c0fd75105d0110c204b2b9c2af5640_icgraph.dot deleted file mode 100644 index afb8b7c..0000000 --- a/docs/structfp_1_1_nodes_a65c0fd75105d0110c204b2b9c2af5640_icgraph.dot +++ /dev/null @@ -1,13 +0,0 @@ -digraph "fp::Nodes::nn_id" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Nodes::nn_id",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Given a node id and the local index in the Node::nn_ids vector, returns the next neighbour id."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Nodes::get_nn_distance\l_vector_between",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#a8efb079f96664cee5698ccdf9e6bc080",tooltip="Given two global node ids, returns a distance vector (if the nodes are neighbors)."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Nodes::set_nn_id",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#a14a196ade9731f70eeed6446b32854ca",tooltip="For a node specified by node_id, resets the value of the requested nn_id."]; -} diff --git a/docs/structfp_1_1_nodes_a6eca1b76638e0a84bbd2bf4a031da3ab_icgraph.map b/docs/structfp_1_1_nodes_a6eca1b76638e0a84bbd2bf4a031da3ab_icgraph.map new file mode 100755 index 0000000..c278f87 --- /dev/null +++ b/docs/structfp_1_1_nodes_a6eca1b76638e0a84bbd2bf4a031da3ab_icgraph.map @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/structfp_1_1_nodes_a6eca1b76638e0a84bbd2bf4a031da3ab_icgraph.md5 b/docs/structfp_1_1_nodes_a6eca1b76638e0a84bbd2bf4a031da3ab_icgraph.md5 new file mode 100755 index 0000000..381837a --- /dev/null +++ b/docs/structfp_1_1_nodes_a6eca1b76638e0a84bbd2bf4a031da3ab_icgraph.md5 @@ -0,0 +1 @@ +97007ee462ce4112898af3f182080c0d \ No newline at end of file diff --git a/docs/structfp_1_1_nodes_a6eca1b76638e0a84bbd2bf4a031da3ab_icgraph.png b/docs/structfp_1_1_nodes_a6eca1b76638e0a84bbd2bf4a031da3ab_icgraph.png new file mode 100755 index 0000000..f1685f5 Binary files /dev/null and b/docs/structfp_1_1_nodes_a6eca1b76638e0a84bbd2bf4a031da3ab_icgraph.png differ diff --git a/docs/structfp_1_1_nodes_a8efb079f96664cee5698ccdf9e6bc080_cgraph.dot b/docs/structfp_1_1_nodes_a8efb079f96664cee5698ccdf9e6bc080_cgraph.dot deleted file mode 100644 index 9dfdcac..0000000 --- a/docs/structfp_1_1_nodes_a8efb079f96664cee5698ccdf9e6bc080_cgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::Nodes::get_nn_distance_vector_between" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::Nodes::get_nn_distance\l_vector_between",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Given two global node ids, returns a distance vector (if the nodes are neighbors)."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Nodes::nn_id",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#a65c0fd75105d0110c204b2b9c2af5640",tooltip="Given a node id and the local index in the Node::nn_ids vector, returns the next neighbour id."]; -} diff --git a/docs/structfp_1_1_nodes_a9244b582d9d23771c04ef519a4014edf_icgraph.map b/docs/structfp_1_1_nodes_a9244b582d9d23771c04ef519a4014edf_icgraph.map new file mode 100755 index 0000000..564a587 --- /dev/null +++ b/docs/structfp_1_1_nodes_a9244b582d9d23771c04ef519a4014edf_icgraph.map @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/docs/structfp_1_1_nodes_a9244b582d9d23771c04ef519a4014edf_icgraph.md5 b/docs/structfp_1_1_nodes_a9244b582d9d23771c04ef519a4014edf_icgraph.md5 new file mode 100755 index 0000000..5c5c808 --- /dev/null +++ b/docs/structfp_1_1_nodes_a9244b582d9d23771c04ef519a4014edf_icgraph.md5 @@ -0,0 +1 @@ +b8aa8034c3c913c7aecfd4bef0095e79 \ No newline at end of file diff --git a/docs/structfp_1_1_nodes_a9244b582d9d23771c04ef519a4014edf_icgraph.png b/docs/structfp_1_1_nodes_a9244b582d9d23771c04ef519a4014edf_icgraph.png new file mode 100755 index 0000000..12d9107 Binary files /dev/null and b/docs/structfp_1_1_nodes_a9244b582d9d23771c04ef519a4014edf_icgraph.png differ diff --git a/docs/structfp_1_1_nodes_aac8eaef6c3fa8679dfafcb4018573233_icgraph.dot b/docs/structfp_1_1_nodes_aac8eaef6c3fa8679dfafcb4018573233_icgraph.dot deleted file mode 100644 index b7e59c2..0000000 --- a/docs/structfp_1_1_nodes_aac8eaef6c3fa8679dfafcb4018573233_icgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::Nodes::curvature_vec" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Nodes::curvature_vec",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Given a node id, return the constant reference to the node curvature vector."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Nodes::Nodes",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#aeab72aa27fd66417ac8d5d0c9d000be6",tooltip="Constructor from JSON."]; -} diff --git a/docs/structfp_1_1_nodes_ab65c2e5dd4f3b43b2445b62c400107e9_icgraph.dot b/docs/structfp_1_1_nodes_ab65c2e5dd4f3b43b2445b62c400107e9_icgraph.dot deleted file mode 100644 index 10f70ea..0000000 --- a/docs/structfp_1_1_nodes_ab65c2e5dd4f3b43b2445b62c400107e9_icgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::Nodes::unit_bending_energy" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Nodes::unit_bending\l_energy",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Given a node id, return node-associated unit bending energy."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Nodes::Nodes",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#aeab72aa27fd66417ac8d5d0c9d000be6",tooltip="Constructor from JSON."]; -} diff --git a/docs/structfp_1_1_nodes_ab863d48ecbce98b85747961bbaae82a9_icgraph.dot b/docs/structfp_1_1_nodes_ab863d48ecbce98b85747961bbaae82a9_icgraph.dot deleted file mode 100644 index cf425e8..0000000 --- a/docs/structfp_1_1_nodes_ab863d48ecbce98b85747961bbaae82a9_icgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::Nodes::area" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Nodes::area",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Given a node id, return node associated area."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Nodes::Nodes",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#aeab72aa27fd66417ac8d5d0c9d000be6",tooltip="Constructor from JSON."]; -} diff --git a/docs/structfp_1_1_nodes_adfa27f36d1528e84e9b56f4f94f534dd_icgraph.map b/docs/structfp_1_1_nodes_adfa27f36d1528e84e9b56f4f94f534dd_icgraph.map new file mode 100755 index 0000000..d40ff4b --- /dev/null +++ b/docs/structfp_1_1_nodes_adfa27f36d1528e84e9b56f4f94f534dd_icgraph.map @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/docs/structfp_1_1_nodes_adfa27f36d1528e84e9b56f4f94f534dd_icgraph.md5 b/docs/structfp_1_1_nodes_adfa27f36d1528e84e9b56f4f94f534dd_icgraph.md5 new file mode 100755 index 0000000..8591c50 --- /dev/null +++ b/docs/structfp_1_1_nodes_adfa27f36d1528e84e9b56f4f94f534dd_icgraph.md5 @@ -0,0 +1 @@ +533fbe16171b4d0c21e8e3281936c63d \ No newline at end of file diff --git a/docs/structfp_1_1_nodes_adfa27f36d1528e84e9b56f4f94f534dd_icgraph.png b/docs/structfp_1_1_nodes_adfa27f36d1528e84e9b56f4f94f534dd_icgraph.png new file mode 100755 index 0000000..7db72bc Binary files /dev/null and b/docs/structfp_1_1_nodes_adfa27f36d1528e84e9b56f4f94f534dd_icgraph.png differ diff --git a/docs/structfp_1_1_nodes_aeaac33789677da84759647308c5f25da_icgraph.dot b/docs/structfp_1_1_nodes_aeaac33789677da84759647308c5f25da_icgraph.dot deleted file mode 100644 index d4d45cc..0000000 --- a/docs/structfp_1_1_nodes_aeaac33789677da84759647308c5f25da_icgraph.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "fp::Nodes::nn_distances" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="RL"; - Node1 [id="Node000001",label="fp::Nodes::nn_distances",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Given a node id, returns the std::vector containing distance vectors to next neighbours."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Nodes::Nodes",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#aeab72aa27fd66417ac8d5d0c9d000be6",tooltip="Constructor from JSON."]; -} diff --git a/docs/structfp_1_1_nodes_aeab72aa27fd66417ac8d5d0c9d000be6_cgraph.dot b/docs/structfp_1_1_nodes_aeab72aa27fd66417ac8d5d0c9d000be6_cgraph.dot deleted file mode 100644 index 539d079..0000000 --- a/docs/structfp_1_1_nodes_aeab72aa27fd66417ac8d5d0c9d000be6_cgraph.dot +++ /dev/null @@ -1,21 +0,0 @@ -digraph "fp::Nodes::Nodes" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - rankdir="LR"; - Node1 [id="Node000001",label="fp::Nodes::Nodes",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Constructor from JSON."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="fp::Nodes::area",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#ab863d48ecbce98b85747961bbaae82a9",tooltip="Given a node id, return node associated area."]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fp::Nodes::curvature_vec",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#aac8eaef6c3fa8679dfafcb4018573233",tooltip="Given a node id, return the constant reference to the node curvature vector."]; - Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="fp::Nodes::nn_distances",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#aeaac33789677da84759647308c5f25da",tooltip="Given a node id, returns the std::vector containing distance vectors to next neighbours."]; - Node1 -> Node5 [id="edge4_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="fp::Nodes::pos",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#a44304df70878d39c9c55ce6cba0cec3d",tooltip="Given a node id, return the constant reference to the node position."]; - Node1 -> Node6 [id="edge5_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="fp::Nodes::unit_bending\l_energy",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#ab65c2e5dd4f3b43b2445b62c400107e9",tooltip="Given a node id, return node-associated unit bending energy."]; - Node1 -> Node7 [id="edge6_Node000001_Node000007",color="steelblue1",style="solid",tooltip=" "]; - Node7 [id="Node000007",label="fp::Nodes::volume",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$structfp_1_1_nodes.html#a0d791117fddd2490c8223a74de6f9109",tooltip="Given a node id, return node associated volume."]; -} diff --git a/docs/structfp_1_1experimental_1_1xyz_property-members.html b/docs/structfp_1_1experimental_1_1xyz_property-members.html new file mode 100755 index 0000000..e378819 --- /dev/null +++ b/docs/structfp_1_1experimental_1_1xyz_property-members.html @@ -0,0 +1,127 @@ + + + + + + + +flippy: Member List + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
fp::experimental::xyzProperty Member List
+
+
+ +

This is the complete list of members for fp::experimental::xyzProperty, including all inherited members.

+ + + + +
column_count (defined in fp::experimental::xyzProperty)fp::experimental::xyzProperty
name (defined in fp::experimental::xyzProperty)fp::experimental::xyzProperty
xyz_type (defined in fp::experimental::xyzProperty)fp::experimental::xyzProperty
+
+ + + + diff --git a/docs/structfp_1_1experimental_1_1xyz_property.html b/docs/structfp_1_1experimental_1_1xyz_property.html new file mode 100755 index 0000000..95c4835 --- /dev/null +++ b/docs/structfp_1_1experimental_1_1xyz_property.html @@ -0,0 +1,155 @@ + + + + + + + +flippy: fp::experimental::xyzProperty Struct Reference + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
flippy +
+
a c++20 package for dynamically triangulated membrane simulations.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
fp::experimental::xyzProperty Struct Reference
+
+
+
+Collaboration diagram for fp::experimental::xyzProperty:
+
+
Collaboration graph
+ + + + + + + + + +
[legend]
+ + + + + + + + +

+Public Attributes

+std::string name
 
+XYZ_TYPE xyz_type
 
+short column_count
 
+
The documentation for this struct was generated from the following file: +
+
+ + + + diff --git a/docs/structfp_1_1experimental_1_1xyz_property__coll__graph.map b/docs/structfp_1_1experimental_1_1xyz_property__coll__graph.map new file mode 100755 index 0000000..36aa950 --- /dev/null +++ b/docs/structfp_1_1experimental_1_1xyz_property__coll__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/structfp_1_1experimental_1_1xyz_property__coll__graph.md5 b/docs/structfp_1_1experimental_1_1xyz_property__coll__graph.md5 new file mode 100755 index 0000000..87d637a --- /dev/null +++ b/docs/structfp_1_1experimental_1_1xyz_property__coll__graph.md5 @@ -0,0 +1 @@ +95471db86f7b4b7974cf95ec687de060 \ No newline at end of file diff --git a/docs/structfp_1_1experimental_1_1xyz_property__coll__graph.png b/docs/structfp_1_1experimental_1_1xyz_property__coll__graph.png new file mode 100755 index 0000000..3c248ab Binary files /dev/null and b/docs/structfp_1_1experimental_1_1xyz_property__coll__graph.png differ diff --git a/docs/structfp_1_1implementation_1_1raw_s_t_l_solid-members.html b/docs/structfp_1_1implementation_1_1raw_s_t_l_solid-members.html old mode 100644 new mode 100755 index ecf70cd..24aa079 --- a/docs/structfp_1_1implementation_1_1raw_s_t_l_solid-members.html +++ b/docs/structfp_1_1implementation_1_1raw_s_t_l_solid-members.html @@ -3,16 +3,18 @@ - + flippy: Member List + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -113,7 +120,7 @@ diff --git a/docs/structfp_1_1implementation_1_1raw_s_t_l_solid.html b/docs/structfp_1_1implementation_1_1raw_s_t_l_solid.html old mode 100644 new mode 100755 index 4924a4a..dc95798 --- a/docs/structfp_1_1implementation_1_1raw_s_t_l_solid.html +++ b/docs/structfp_1_1implementation_1_1raw_s_t_l_solid.html @@ -3,16 +3,18 @@ - + flippy: fp::implementation::rawSTLSolid Struct Reference + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -109,6 +116,15 @@ Collaboration diagram for fp::implementation::rawSTLSolid:
Collaboration graph
+ + + + + + + + +
[legend]

@@ -132,7 +148,7 @@ diff --git a/docs/structfp_1_1implementation_1_1raw_s_t_l_solid__coll__graph.dot b/docs/structfp_1_1implementation_1_1raw_s_t_l_solid__coll__graph.dot deleted file mode 100644 index 971ed00..0000000 --- a/docs/structfp_1_1implementation_1_1raw_s_t_l_solid__coll__graph.dot +++ /dev/null @@ -1,14 +0,0 @@ -digraph "fp::implementation::rawSTLSolid" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="fp::implementation\l::rawSTLSolid",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; - Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" header",fontcolor="grey" ]; - Node2 [id="Node000002",label="char",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; - Node3 -> Node1 [id="edge2_Node000001_Node000003",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" num_triangles",fontcolor="grey" ]; - Node3 [id="Node000003",label="uint32_t",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; - Node4 -> Node1 [id="edge3_Node000001_Node000004",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" stl_triangles",fontcolor="grey" ]; - Node4 [id="Node000004",label="vector\< fp::implementation\l::rawSTLTriangle \>",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; -} diff --git a/docs/structfp_1_1implementation_1_1raw_s_t_l_solid__coll__graph.map b/docs/structfp_1_1implementation_1_1raw_s_t_l_solid__coll__graph.map new file mode 100755 index 0000000..b8b52c6 --- /dev/null +++ b/docs/structfp_1_1implementation_1_1raw_s_t_l_solid__coll__graph.map @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/structfp_1_1implementation_1_1raw_s_t_l_solid__coll__graph.md5 b/docs/structfp_1_1implementation_1_1raw_s_t_l_solid__coll__graph.md5 new file mode 100755 index 0000000..9e5a8c4 --- /dev/null +++ b/docs/structfp_1_1implementation_1_1raw_s_t_l_solid__coll__graph.md5 @@ -0,0 +1 @@ +abb8a6a79eeb81a935312a02f4c1fe6e \ No newline at end of file diff --git a/docs/structfp_1_1implementation_1_1raw_s_t_l_solid__coll__graph.png b/docs/structfp_1_1implementation_1_1raw_s_t_l_solid__coll__graph.png new file mode 100755 index 0000000..164bb75 Binary files /dev/null and b/docs/structfp_1_1implementation_1_1raw_s_t_l_solid__coll__graph.png differ diff --git a/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle-members.html b/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle-members.html old mode 100644 new mode 100755 index 069c241..321d75e --- a/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle-members.html +++ b/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle-members.html @@ -3,16 +3,18 @@ - + flippy: Member List + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -115,7 +122,7 @@ diff --git a/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle.html b/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle.html old mode 100644 new mode 100755 index 380fda8..3864e69 --- a/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle.html +++ b/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle.html @@ -3,16 +3,18 @@ - + flippy: fp::implementation::rawSTLTriangle Struct Reference + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -109,6 +116,13 @@ Collaboration diagram for fp::implementation::rawSTLTriangle:
Collaboration graph
+ + + + + + +
[legend]

@@ -138,7 +152,7 @@ diff --git a/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle__coll__graph.dot b/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle__coll__graph.dot deleted file mode 100644 index 20b8c0c..0000000 --- a/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle__coll__graph.dot +++ /dev/null @@ -1,12 +0,0 @@ -digraph "fp::implementation::rawSTLTriangle" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="fp::implementation\l::rawSTLTriangle",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; - Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" normal\nv1\nv2\nv3",fontcolor="grey" ]; - Node2 [id="Node000002",label="float",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; - Node3 -> Node1 [id="edge2_Node000001_Node000003",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" attr_byte_count",fontcolor="grey" ]; - Node3 [id="Node000003",label="uint16_t",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; -} diff --git a/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle__coll__graph.map b/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle__coll__graph.map new file mode 100755 index 0000000..3be54ef --- /dev/null +++ b/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle__coll__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle__coll__graph.md5 b/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle__coll__graph.md5 new file mode 100755 index 0000000..18fc5f0 --- /dev/null +++ b/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle__coll__graph.md5 @@ -0,0 +1 @@ +0d023712f50bb5dd1435009787b86407 \ No newline at end of file diff --git a/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle__coll__graph.png b/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle__coll__graph.png new file mode 100755 index 0000000..fcc77a9 Binary files /dev/null and b/docs/structfp_1_1implementation_1_1raw_s_t_l_triangle__coll__graph.png differ diff --git a/docs/structfp_1_1implementation_1_1stl_node-members.html b/docs/structfp_1_1implementation_1_1stl_node-members.html old mode 100644 new mode 100755 index 7bf3b2a..f1b53db --- a/docs/structfp_1_1implementation_1_1stl_node-members.html +++ b/docs/structfp_1_1implementation_1_1stl_node-members.html @@ -3,16 +3,18 @@ - + flippy: Member List + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -113,7 +120,7 @@ diff --git a/docs/structfp_1_1implementation_1_1stl_node.html b/docs/structfp_1_1implementation_1_1stl_node.html old mode 100644 new mode 100755 index 6a39f5a..f153305 --- a/docs/structfp_1_1implementation_1_1stl_node.html +++ b/docs/structfp_1_1implementation_1_1stl_node.html @@ -3,16 +3,18 @@ - + flippy: fp::implementation::stlNode< Real, Index > Struct Template Reference + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -110,12 +117,19 @@ Collaboration diagram for fp::implementation::stlNode< Real, Index >:
Collaboration graph
+ + + + + + +
[legend]
+bool 

Public Member Functions

-bool operator== (stlNode const &other) const
operator== (stlNode const &other) const
 

@@ -136,7 +150,7 @@ diff --git a/docs/structfp_1_1implementation_1_1stl_node__coll__graph.dot b/docs/structfp_1_1implementation_1_1stl_node__coll__graph.dot deleted file mode 100644 index 3418223..0000000 --- a/docs/structfp_1_1implementation_1_1stl_node__coll__graph.dot +++ /dev/null @@ -1,12 +0,0 @@ -digraph "fp::implementation::stlNode< Real, Index >" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="fp::implementation\l::stlNode\< Real, Index \>",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "]; - Node2 -> Node1 [id="edge1_Node000001_Node000002",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" id",fontcolor="grey" ]; - Node2 [id="Node000002",label="Index",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; - Node3 -> Node1 [id="edge2_Node000001_Node000003",dir="back",color="darkorchid3",style="dashed",tooltip=" ",label=" pos",fontcolor="grey" ]; - Node3 [id="Node000003",label="vec3\< Real \>",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "]; -} diff --git a/docs/structfp_1_1implementation_1_1stl_node__coll__graph.map b/docs/structfp_1_1implementation_1_1stl_node__coll__graph.map new file mode 100755 index 0000000..820fa84 --- /dev/null +++ b/docs/structfp_1_1implementation_1_1stl_node__coll__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/structfp_1_1implementation_1_1stl_node__coll__graph.md5 b/docs/structfp_1_1implementation_1_1stl_node__coll__graph.md5 new file mode 100755 index 0000000..a2eb548 --- /dev/null +++ b/docs/structfp_1_1implementation_1_1stl_node__coll__graph.md5 @@ -0,0 +1 @@ +7da27eb78f2aefbb37fc6b4a331411f5 \ No newline at end of file diff --git a/docs/structfp_1_1implementation_1_1stl_node__coll__graph.png b/docs/structfp_1_1implementation_1_1stl_node__coll__graph.png new file mode 100755 index 0000000..dd1e9aa Binary files /dev/null and b/docs/structfp_1_1implementation_1_1stl_node__coll__graph.png differ diff --git a/docs/structure_of_flippy.png b/docs/structure_of_flippy.png old mode 100644 new mode 100755 diff --git a/docs/sync_off.png b/docs/sync_off.png old mode 100644 new mode 100755 diff --git a/docs/sync_on.png b/docs/sync_on.png old mode 100644 new mode 100755 diff --git a/docs/tab_a.png b/docs/tab_a.png old mode 100644 new mode 100755 diff --git a/docs/tab_ad.png b/docs/tab_ad.png old mode 100644 new mode 100755 diff --git a/docs/tab_b.png b/docs/tab_b.png old mode 100644 new mode 100755 diff --git a/docs/tab_bd.png b/docs/tab_bd.png old mode 100644 new mode 100755 diff --git a/docs/tab_h.png b/docs/tab_h.png old mode 100644 new mode 100755 diff --git a/docs/tab_hd.png b/docs/tab_hd.png old mode 100644 new mode 100755 diff --git a/docs/tab_s.png b/docs/tab_s.png old mode 100644 new mode 100755 diff --git a/docs/tab_sd.png b/docs/tab_sd.png old mode 100644 new mode 100755 diff --git a/docs/tabs.css b/docs/tabs.css old mode 100644 new mode 100755 index 71c8a47..fe4854a --- a/docs/tabs.css +++ b/docs/tabs.css @@ -1 +1 @@ -.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:var(--nav-menu-button-color);-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-image:var(--nav-gradient-image)}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:var(--font-family-nav);font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:var(--nav-text-normal-shadow);color:var(--nav-text-normal-color);outline:0}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:var(--nav-menu-toggle-color);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:var(--nav-menu-background-color)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:var(--nav-menu-background-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:var(--nav-gradient-image);line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:var(--nav-text-normal-color) transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:var(--nav-separator-image);background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a:hover span.sub-arrow{border-color:var(--nav-text-hover-color) transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent var(--nav-menu-background-color) transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:var(--nav-menu-background-color);-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent var(--nav-menu-foreground-color);border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:var(--nav-menu-foreground-color);background-image:none;border:0 !important;color:var(--nav-menu-foreground-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent var(--nav-text-hover-color)}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:var(--nav-menu-background-color);height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent var(--nav-menu-foreground-color) transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:var(--nav-menu-foreground-color) transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:var(--nav-gradient-image)}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:var(--nav-menu-background-color)}} \ No newline at end of file +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:var(--nav-menu-button-color);-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-image:var(--nav-gradient-image)}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:var(--font-family-nav);font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:var(--nav-text-normal-shadow);color:var(--nav-text-normal-color);outline:0}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:var(--nav-menu-toggle-color);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:var(--nav-menu-background-color)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:var(--nav-menu-background-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:var(--nav-gradient-image);line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:var(--nav-text-normal-color) transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:var(--nav-separator-image);background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a:hover span.sub-arrow{border-color:var(--nav-text-hover-color) transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent var(--nav-menu-background-color) transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:var(--nav-menu-background-color);-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent var(--nav-menu-foreground-color);border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:var(--nav-menu-foreground-color);background-image:none;border:0 !important}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent var(--nav-text-hover-color)}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:var(--nav-menu-background-color);height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent var(--nav-menu-foreground-color) transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:var(--nav-menu-foreground-color) transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:var(--nav-gradient-image)}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:var(--nav-menu-background-color)}} \ No newline at end of file diff --git a/docs/topics.html b/docs/topics.html old mode 100644 new mode 100755 index ee1becd..c33b632 --- a/docs/topics.html +++ b/docs/topics.html @@ -3,16 +3,18 @@ - + flippy: Topics + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -113,7 +120,7 @@ diff --git a/docs/topics.js b/docs/topics.js old mode 100644 new mode 100755 diff --git a/docs/triangulation.png b/docs/triangulation.png old mode 100644 new mode 100755 diff --git a/docs/utils_8hpp.html b/docs/utils_8hpp.html old mode 100644 new mode 100755 index 2c3fe2f..a1a320f --- a/docs/utils_8hpp.html +++ b/docs/utils_8hpp.html @@ -3,16 +3,18 @@ - + flippy: flippy/utilities/utils.hpp File Reference + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -117,30 +124,57 @@ Include dependency graph for utils.hpp:
+ + + + + + + + + + + + +
This graph shows which files directly or indirectly include this file:
+ + + + + + + + + + + + + +

Go to the source code of this file.

- +

Namespaces

namespace  fp
namespace  fp
 
- + - + - - + +

Functions

static void fp::json_dump (std::string const &file_name, const Json &data)
static void fp::json_dump (std::string const &file_name, const Json &data)
 Simple wrapper function around Json objects built in dump() method.
 
static Json fp::json_read (std::string file_name)
static Json fp::json_read (std::string file_name)
 Simple wrapper function that reads the content of a text file into a json object.
 
template<typename T >
static bool fp::is_member (std::vector< T > const &v, T const &el)
template<typename T >
static bool fp::is_member (std::vector< T > const &v, T const &el)
 Convenient wrapper around std::find, which only works for std::vectors.
 
@@ -152,7 +186,7 @@ diff --git a/docs/utils_8hpp.js b/docs/utils_8hpp.js old mode 100644 new mode 100755 diff --git a/docs/utils_8hpp__dep__incl.dot b/docs/utils_8hpp__dep__incl.dot deleted file mode 100644 index 1476ed3..0000000 --- a/docs/utils_8hpp__dep__incl.dot +++ /dev/null @@ -1,15 +0,0 @@ -digraph "flippy/utilities/utils.hpp" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="flippy/utilities/utils.hpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="This file contains helper functions that are used throughout flippy, but are not specific to any give..."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="flippy/Triangulation.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_triangulation_8hpp.html",tooltip="This file contains the fp::Triangulation class and several related helper classes...."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="flippy/MonteCarloUpdater.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_monte_carlo_updater_8hpp.html",tooltip="This file contains the MonteCarloUpdater class template. Together with Triangulation...."]; - Node2 -> Node4 [id="edge3_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="flippy/flippy.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$flippy_8hpp.html",tooltip="This header file exists for convenience. Including this header will automatically include all parts o..."]; - Node1 -> Node4 [id="edge4_Node000001_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; -} diff --git a/docs/utils_8hpp__dep__incl.map b/docs/utils_8hpp__dep__incl.map new file mode 100755 index 0000000..9ae35d6 --- /dev/null +++ b/docs/utils_8hpp__dep__incl.map @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/docs/utils_8hpp__dep__incl.md5 b/docs/utils_8hpp__dep__incl.md5 new file mode 100755 index 0000000..bbdba23 --- /dev/null +++ b/docs/utils_8hpp__dep__incl.md5 @@ -0,0 +1 @@ +c8a61c60898aecfbfdb63d8347a5ffcf \ No newline at end of file diff --git a/docs/utils_8hpp__dep__incl.png b/docs/utils_8hpp__dep__incl.png new file mode 100755 index 0000000..d24c73a Binary files /dev/null and b/docs/utils_8hpp__dep__incl.png differ diff --git a/docs/utils_8hpp__incl.dot b/docs/utils_8hpp__incl.dot deleted file mode 100644 index 5b04e88..0000000 --- a/docs/utils_8hpp__incl.dot +++ /dev/null @@ -1,18 +0,0 @@ -digraph "flippy/utilities/utils.hpp" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="flippy/utilities/utils.hpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="This file contains helper functions that are used throughout flippy, but are not specific to any give..."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="iostream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="fstream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="utility",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node5 [id="edge4_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="filesystem",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node6 [id="edge5_Node000001_Node000006",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="type_traits",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; -} diff --git a/docs/utils_8hpp__incl.map b/docs/utils_8hpp__incl.map new file mode 100755 index 0000000..98ae1b4 --- /dev/null +++ b/docs/utils_8hpp__incl.map @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/docs/utils_8hpp__incl.md5 b/docs/utils_8hpp__incl.md5 new file mode 100755 index 0000000..4665d39 --- /dev/null +++ b/docs/utils_8hpp__incl.md5 @@ -0,0 +1 @@ +35488e42dcb72a8411d08ceecdb13f95 \ No newline at end of file diff --git a/docs/utils_8hpp__incl.png b/docs/utils_8hpp__incl.png new file mode 100755 index 0000000..19a026c Binary files /dev/null and b/docs/utils_8hpp__incl.png differ diff --git a/docs/utils_8hpp_source.html b/docs/utils_8hpp_source.html old mode 100644 new mode 100755 index eb6646a..c6dec07 --- a/docs/utils_8hpp_source.html +++ b/docs/utils_8hpp_source.html @@ -3,16 +3,18 @@ - + flippy: flippy/utilities/utils.hpp Source File + - + + @@ -43,28 +45,28 @@

- + + -
@@ -116,52 +118,51 @@
11#include <type_traits>
12
13namespace fp {
-
19using Json = nlohmann::json;
+
19using Json = nlohmann::json;
20
-
26static inline void json_dump(std::string const& file_name, const Json& data)
+
26static inline void json_dump(std::string const& file_name, const Json& data)
27{
-
28 std::ofstream o(file_name + ".json");
-
29 o << data.dump();
-
30 o.close();
+
28 std::ofstream o(file_name + ".json");
+
29 o << data.dump();
+
30 o.close();
31}
32
-
43static Json inline json_read(std::string file_name)
+
43static Json inline json_read(std::string file_name)
44{
-
45 auto pos_json = file_name.find_last_of(".json");
-
46 auto not_json = (file_name.size() - 1!=pos_json);
-
47 if (not_json) { file_name = file_name + ".json"; }
-
48 std::ifstream o(file_name);
-
49 Json data;
-
50 o >> data;
-
51 o.close();
+
45 auto pos_json = file_name.find_last_of(".json");
+
46 auto not_json = (file_name.size() - 1!=pos_json);
+
47 if (not_json) { file_name = file_name + ".json"; }
+
48 std::ifstream o(file_name);
+
49 Json data;
+
50 o >> data;
+
51 o.close();
52 return data;
53}
54
63template<typename T>
-
64[[maybe_unused]] static bool is_member(std::vector<T> const& v, T const& el){
-
65 return (std::find(v.begin(),v.end(), el) != v.end());
+
64[[maybe_unused]] static bool is_member(std::vector<T> const& v, T const& el){
+
65 return (std::find(v.begin(),v.end(), el) != v.end());
66}
68}
69#endif
-
nlohmann::json Json
shortening of the nlohmann::json namespace, which is an external open source library bundled by flipp...
Definition Nodes.hpp:16
static void json_dump(std::string const &file_name, const Json &data)
Simple wrapper function around Json objects built in dump() method.
Definition utils.hpp:26
static bool is_member(std::vector< T > const &v, T const &el)
Convenient wrapper around std::find, which only works for std::vectors.
Definition utils.hpp:64
+
nlohmann::json Json
shortening of the nlohmann::json namespace, which is an external open source library bundled by flipp...
Definition Nodes.hpp:17
static Json json_read(std::string file_name)
Simple wrapper function that reads the content of a text file into a json object.
Definition utils.hpp:43
Definition custom_concepts.hpp:8
-
A helper struct; keeps track of bond flips.
Definition Triangulation.hpp:84
diff --git a/docs/vec3_8hpp.html b/docs/vec3_8hpp.html old mode 100644 new mode 100755 index 4503253..82d4e09 --- a/docs/vec3_8hpp.html +++ b/docs/vec3_8hpp.html @@ -3,16 +3,18 @@ - + flippy: flippy/vec3.hpp File Reference + - + + @@ -43,19 +45,24 @@

- + + @@ -73,7 +80,7 @@
@@ -116,11 +123,54 @@ Include dependency graph for vec3.hpp:
+ + + + + + + + + + + + +
This graph shows which files directly or indirectly include this file:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Go to the source code of this file.

@@ -133,7 +183,7 @@ - +

Namespaces

namespace  fp
namespace  fp
 

Detailed Description

@@ -144,7 +194,7 @@ diff --git a/docs/vec3_8hpp.js b/docs/vec3_8hpp.js old mode 100644 new mode 100755 diff --git a/docs/vec3_8hpp__dep__incl.dot b/docs/vec3_8hpp__dep__incl.dot deleted file mode 100644 index e95bd35..0000000 --- a/docs/vec3_8hpp__dep__incl.dot +++ /dev/null @@ -1,26 +0,0 @@ -digraph "flippy/vec3.hpp" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="flippy/vec3.hpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Header file containing the definition and implementation a 3 dimensional vector class,..."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="flippy/Nodes.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_nodes_8hpp.html",tooltip="This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node o..."]; - Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="flippy/MonteCarloUpdater.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_monte_carlo_updater_8hpp.html",tooltip="This file contains the MonteCarloUpdater class template. Together with Triangulation...."]; - Node2 -> Node4 [id="edge3_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="flippy/Triangulation.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_triangulation_8hpp.html",tooltip="This file contains the fp::Triangulation class and several related helper classes...."]; - Node4 -> Node3 [id="edge4_Node000004_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node4 -> Node5 [id="edge5_Node000004_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="flippy/flippy.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$flippy_8hpp.html",tooltip="This header file exists for convenience. Including this header will automatically include all parts o..."]; - Node2 -> Node5 [id="edge6_Node000002_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node1 -> Node4 [id="edge7_Node000001_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node1 -> Node6 [id="edge8_Node000001_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="flippy/Triangulator.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$_triangulator_8hpp.html",tooltip="This file contains internal implementation details and is not part of the stable public api...."]; - Node6 -> Node4 [id="edge9_Node000006_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node1 -> Node5 [id="edge10_Node000001_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node1 -> Node7 [id="edge11_Node000001_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; - Node7 [id="Node000007",label="flippy/stlSerializer.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$stl_serializer_8hpp_source.html",tooltip=" "]; - Node7 -> Node4 [id="edge12_Node000007_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; -} diff --git a/docs/vec3_8hpp__dep__incl.map b/docs/vec3_8hpp__dep__incl.map new file mode 100755 index 0000000..81821cb --- /dev/null +++ b/docs/vec3_8hpp__dep__incl.map @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/vec3_8hpp__dep__incl.md5 b/docs/vec3_8hpp__dep__incl.md5 new file mode 100755 index 0000000..e25df2f --- /dev/null +++ b/docs/vec3_8hpp__dep__incl.md5 @@ -0,0 +1 @@ +0e9d30574d3e8a67bbfef4dfc1af25ad \ No newline at end of file diff --git a/docs/vec3_8hpp__dep__incl.png b/docs/vec3_8hpp__dep__incl.png new file mode 100755 index 0000000..fdbb888 Binary files /dev/null and b/docs/vec3_8hpp__dep__incl.png differ diff --git a/docs/vec3_8hpp__incl.dot b/docs/vec3_8hpp__incl.dot deleted file mode 100644 index d5a2e34..0000000 --- a/docs/vec3_8hpp__incl.dot +++ /dev/null @@ -1,18 +0,0 @@ -digraph "flippy/vec3.hpp" -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10]; - node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4]; - Node1 [id="Node000001",label="flippy/vec3.hpp",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Header file containing the definition and implementation a 3 dimensional vector class,..."]; - Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; - Node2 [id="Node000002",label="ostream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node3 [id="edge2_Node000001_Node000003",color="steelblue1",style="solid",tooltip=" "]; - Node3 [id="Node000003",label="iostream",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node4 [id="edge3_Node000001_Node000004",color="steelblue1",style="solid",tooltip=" "]; - Node4 [id="Node000004",label="cmath",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; - Node1 -> Node5 [id="edge4_Node000001_Node000005",color="steelblue1",style="solid",tooltip=" "]; - Node5 [id="Node000005",label="custom_concepts.hpp",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$custom__concepts_8hpp.html",tooltip="This file contains the concepts that are costomly defined for the flippy class templates."]; - Node5 -> Node6 [id="edge5_Node000005_Node000006",color="steelblue1",style="solid",tooltip=" "]; - Node6 [id="Node000006",label="concepts",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; -} diff --git a/docs/vec3_8hpp__incl.map b/docs/vec3_8hpp__incl.map new file mode 100755 index 0000000..87dcf25 --- /dev/null +++ b/docs/vec3_8hpp__incl.map @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/docs/vec3_8hpp__incl.md5 b/docs/vec3_8hpp__incl.md5 new file mode 100755 index 0000000..ddf0159 --- /dev/null +++ b/docs/vec3_8hpp__incl.md5 @@ -0,0 +1 @@ +ba4e848c0dca8f41278425162f2b1c8b \ No newline at end of file diff --git a/docs/vec3_8hpp__incl.png b/docs/vec3_8hpp__incl.png new file mode 100755 index 0000000..603f9e9 Binary files /dev/null and b/docs/vec3_8hpp__incl.png differ diff --git a/docs/vec3_8hpp_source.html b/docs/vec3_8hpp_source.html old mode 100644 new mode 100755 index 2306b63..57a6474 --- a/docs/vec3_8hpp_source.html +++ b/docs/vec3_8hpp_source.html @@ -3,16 +3,18 @@ - + flippy: flippy/vec3.hpp Source File + - + + @@ -43,28 +45,28 @@ - + + -
@@ -129,59 +131,59 @@
49
51
-
60 void add(vec3<Real> const& v)
+
60 void add(vec3<Real> const& v)
61 {
-
62 x += v.x;
-
63 y += v.y;
-
64 z += v.z;
+
62 x += v.x;
+
63 y += v.y;
+
64 z += v.z;
65 }
66
68
-
77 void subtract(vec3<Real> const& v)
+
77 void subtract(vec3<Real> const& v)
78 {
-
79 x -= v.x;
-
80 y -= v.y;
-
81 z -= v.z;
+
79 x -= v.x;
+
80 y -= v.y;
+
81 z -= v.z;
82 }
84
-
88 void scale(Real s)
+
88 void scale(Real s)
89 {
-
90 x = s*x;
-
91 y = s*y;
-
92 z = s*z;
+
90 x = s*x;
+
91 y = s*y;
+
92 z = s*z;
93 }
94
96
-
106 Real dot(vec3<Real> const& v) const
+
106 Real dot(vec3<Real> const& v) const
107 {
-
108 Real res = x*v.x + y*v.y + z*v.z;
-
109 return res;
+
108 Real res = x*v.x + y*v.y + z*v.z;
+
109 return res;
110 }
111
113
-
118 [[nodiscard]] constexpr std::size_t size() const { return 3; }
+
118 [[nodiscard]] constexpr std::size_t size() const { return 3; }
119
121
-
133 static inline vec3<Real> cross(vec3<Real> const& a, vec3<Real> const& b)
+
133 static inline vec3<Real> cross(vec3<Real> const& a, vec3<Real> const& b)
134 {
- -
136 res.x = a.y*b.z - a.z*b.y;
-
137 res.y = a.z*b.x - a.x*b.z;
-
138 res.z = a.x*b.y - a.y*b.x;
-
139 return res;
+
135 vec3<Real> res;
+
136 res.x = a.y*b.z - a.z*b.y;
+
137 res.y = a.z*b.x - a.x*b.z;
+
138 res.z = a.x*b.y - a.y*b.x;
+
139 return res;
140 }
141
143
-
153 vec3<Real> cross(vec3<Real> const& other) const { return cross(*this, other); }
+
153 vec3<Real> cross(vec3<Real> const& other) const { return cross(*this, other); }
154
156
164 Real norm() const { return std::sqrt(this->dot(*this)); }
@@ -191,89 +193,89 @@
176
178
- +
185 *this= *this/this->norm();
186 return *this;
187 }
188
-
190 friend std::ostream& operator<<(std::ostream& os, const vec3<Real>& obj)
+
190 friend std::ostream& operator<<(std::ostream& os, const vec3<Real>& obj)
191 {
-
192 os << "{" << obj.x << ',' << obj.y << ',' << obj.z << '}';
-
193 return os;
+
192 os << "{" << obj.x << ',' << obj.y << ',' << obj.z << '}';
+
193 return os;
194 }
195
197
-
201 bool operator==(vec3<Real> const& other) const =default;
+
201 bool operator==(vec3<Real> const& other) const =default;
202
203
205
- +
212 {
-
213 lhs+=rhs;
-
214 return lhs;
+
213 lhs+=rhs;
+
214 return lhs;
215 }
216
218
-
223 friend void operator+=(vec3<Real>& lhs, vec3<Real> const& rhs)
+
223 friend void operator+=(vec3<Real>& lhs, vec3<Real> const& rhs)
224 {
-
225 lhs.add(rhs);
+
225 lhs.add(rhs);
226 }
227
229
- +
236 {
-
237 lhs-=rhs;
-
238 return lhs;
+
237 lhs-=rhs;
+
238 return lhs;
239 }
240
242
-
247 friend void operator-=(vec3<Real>& lhs, vec3<Real> const& rhs)
+
247 friend void operator-=(vec3<Real>& lhs, vec3<Real> const& rhs)
248 {
-
249 lhs.subtract(rhs);
+
249 lhs.subtract(rhs);
250 }
251
253
-
259 friend vec3<Real> operator*(Real const& lhs, vec3<Real> rhs)
+
259 friend vec3<Real> operator*(Real const& lhs, vec3<Real> rhs)
260 {
-
261 rhs.scale(lhs);
-
262 return rhs;
+
261 rhs.scale(lhs);
+
262 return rhs;
263 }
264
266
-
272 friend vec3<Real> operator*(vec3<Real> lhs, Real const& rhs)
+
272 friend vec3<Real> operator*(vec3<Real> lhs, Real const& rhs)
273 {
-
274 lhs.scale(rhs);
-
275 return lhs;
+
274 lhs.scale(rhs);
+
275 return lhs;
276 }
277
279
-
285 friend void operator/=(vec3<Real>& lhs, Real const& rhs){
-
286 lhs.scale((Real)1/rhs);
+
285 friend void operator/=(vec3<Real>& lhs, Real const& rhs){
+
286 lhs.scale(static_cast<Real>(1.)/rhs);
287 }
288
290
-
297 friend vec3<Real> operator/(vec3<Real> lhs, Real const& rhs)
+
297 friend vec3<Real> operator/(vec3<Real> lhs, Real const& rhs)
298 {
-
299 lhs/=rhs;
-
300 return lhs;
+
299 lhs/=rhs;
+
300 return lhs;
301 }
302
@@ -281,14 +283,14 @@
311 template<typename Index>
312 requires std::is_integral_v<Index>
-
313 Real& operator[](Index idx)
+
313 Real& operator[](Index idx)
314 {
-
315 switch (idx) {
+
315 switch (idx) {
316 case 0:return x;
317 case 1:return y;
318 case 2:return z;
-
319 default:std::cerr << idx << "is out of range for as vec3 index";
-
320 exit(12);
+
319 default:std::cerr << idx << "is out of range for as vec3 index";
+
320 exit(12);
321 }
322 }
@@ -297,45 +299,34 @@
332 template<typename Index>
333 requires std::is_integral_v<Index>
-
334 const Real& operator[](Index idx) const
+
334 const Real& operator[](Index idx) const
335 {
-
336 switch (idx) {
+
336 switch (idx) {
337 case 0:return x;
338 case 1:return y;
339 case 2:return z;
-
340 default:std::cerr << idx << "is out of range for as vec3 index";
-
341 exit(12);
+
340 default:std::cerr << idx << "is out of range for as vec3 index";
+
341 exit(12);
342 }
343 }
344
346
- +
352 {
-
353 v.x = -v.x;
-
354 v.y = -v.y;
-
355 v.z = -v.z;
-
356 return v;
+
353 v.x = -v.x;
+
354 v.y = -v.y;
+
355 v.z = -v.z;
+
356 return v;
357 }
358
-
360
-
- -
366 {
-
367 v.x = -v.x;
-
368 v.y = -v.y;
-
369 v.z = -v.z;
-
370 return v;
-
371 }
-
-
372
-
373};
+
359};
-
374}
-
375
-
376#endif //FLIPPY_VEC3_HPP
+
360}
+
361
+
362#endif //FLIPPY_VEC3_HPP
Internal implementation of a 3D vector.
Definition vec3.hpp:43
constexpr std::size_t size() const
Always returns 3.
Definition vec3.hpp:118
vec3< Real > cross(vec3< Real > const &other) const
Calculate cross product with another vector.
Definition vec3.hpp:153
@@ -359,21 +350,19 @@
friend vec3< Real > operator-(vec3< Real > v)
Unary minus operator.
Definition vec3.hpp:351
friend std::ostream & operator<<(std::ostream &os, const vec3< Real > &obj)
Streaming operator for easy printing of the vector.
Definition vec3.hpp:190
friend vec3< Real > operator+(vec3< Real > lhs, vec3< Real > const &rhs)
Overloaded operator defined in terms of vec2::add.
Definition vec3.hpp:211
-
friend vec3< Real > operator-(vec3< Real > &&v)
Unary minus operator for rvalues.
Definition vec3.hpp:365
Real & operator[](Index idx)
element access operator.
Definition vec3.hpp:313
Real x
The x component of the vector.
Definition vec3.hpp:46
static vec3< Real > cross(vec3< Real > const &a, vec3< Real > const &b)
Calculate cross product between two vectors.
Definition vec3.hpp:133
friend void operator-=(vec3< Real > &lhs, vec3< Real > const &rhs)
Overloaded operator defined in terms of vec3::subtract.
Definition vec3.hpp:247
This file contains the concepts that are costomly defined for the flippy class templates.
Definition custom_concepts.hpp:8
-
A helper struct; keeps track of bond flips.
Definition Triangulation.hpp:84
diff --git a/fix_docs.sh b/fix_docs.sh new file mode 100755 index 0000000..266be4a --- /dev/null +++ b/fix_docs.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +npx embedme ./README.md || exit 1 +bash make_doxygen_html.sh + + diff --git a/flippy/MonteCarloUpdater.hpp b/flippy/MonteCarloUpdater.hpp index 85d43ea..f791a42 100755 --- a/flippy/MonteCarloUpdater.hpp +++ b/flippy/MonteCarloUpdater.hpp @@ -2,14 +2,15 @@ #define FLIPPY_MONTECARLOUPDATER_HPP /** * @file - * @brief This file contains the MonteCarloUpdater class template. Together with Triangulation.hpp, this file contains flippy's most important high-level interfaces. + * @brief This file contains the MonteCarloUpdater class template. Together with Triangulation.hpp, this file contains + * flippy's most important high-level interfaces. */ - -#include "custom_concepts.hpp" -#include #include "Nodes.hpp" #include "Triangulation.hpp" +#include "custom_concepts.hpp" +#include +#include namespace fp { @@ -21,67 +22,69 @@ namespace fp { * * @tparam Real @RealStub * @tparam Index @IndexStub - * @tparam EnergyFunctionParameters A user-defined struct type. An instance of this struct will be part of the input of the energy function. - * Energy function provided during instantiation must have a third argument of type EnergyFunctionParameters const&. - * @tparam RandomNumberEngine type of the random number engine that will be provided during the instantiation of the class. - * For example [std::mt19937_64](https://en.cppreference.com/w/cpp/numeric/random/mersenne_twister_engine). + * @tparam EnergyFunctionParameters A user-defined struct type. An instance of this struct will be part of the input of + * the energy function. Energy function provided during instantiation must have a third argument of type + * EnergyFunctionParameters const&. + * @tparam RandomNumberEngine type of the random number engine that will be provided during the instantiation of the + * class. For example [std::mt19937_64](https://en.cppreference.com/w/cpp/numeric/random/mersenne_twister_engine). * @tparam triangulation_type One of the types specified by the TriangulationType enum. * This must match the type of triangulation provided during the class instantiation. */ -template -class MonteCarloUpdater -{ -private: - static constexpr Real max_float = 3.40282347e+38; - Real e_old{}, e_new{}, e_diff{}; - fp::Triangulation& triangulation; - EnergyFunctionParameters const& prms; - std::function const&, fp::Triangulation const&, EnergyFunctionParameters const&)> energy_function; - RandomNumberEngine& rng; +template class MonteCarloUpdater { + private: + static constexpr Real max_float = 3.40282347e+38f; + fp::Triangulation &triangulation; + const EnergyFunctionParameters &prms; + using EnergyFunctionType = std::function &)>; + EnergyFunctionType energy_function; + RandomNumberEngine &rng; std::uniform_real_distribution unif_distr_on_01; - Real kBT_{1}; - Real min_bond_length_square{0.}, max_bond_length_square{max_float}; - unsigned long move_attempt{0}, bond_length_move_rejection{0},move_back{0}; - unsigned long flip_attempt{0}, bond_length_flip_rejection{0}, flip_back{0}; - -public: + Real kBT_{1}; + Real min_bond_length_square{0.}, max_bond_length_square{max_float}; + unsigned long move_attempt{0}, bond_length_move_rejection{0}, move_back{0}; + unsigned long flip_attempt{0}, bond_length_flip_rejection{0}, flip_back{0}; + public: /** * @param triangulation_inp Reference to the triangulation that will be updated. * @param prms_inp The instance of the struct that contains the parameters of the system energy. - * @param energy_function_inp A c++ function that represents the system energy. It can be evaluated for a given node for a Monte Carlo step. + * @param energy_function_inp A c++ function that represents the system energy. It can be evaluated for a given node + * for a Monte Carlo step. * @param rng_inp Random number engine - * @param min_bond_length Minimal bond length between two triangulation nodes. More generally, a minimal distance two nodes of the triangulation are allowed to have. - * If set to zero, the stability of the updater will suffer, and nonphysical shapes with self-intersecting triangulation will be common. + * @param min_bond_length Minimal bond length between two triangulation nodes. More generally, a minimal distance + * two nodes of the triangulation are allowed to have. If set to zero, the stability of the updater will suffer, and + * nonphysical shapes with self-intersecting triangulation will be common. * @param max_bond_length Maximal allowed length of a bond between two nodes of a triangulation. - * If set too high, the stability of the updater will suffer, and nonphysical shapes with self-intersecting triangulation will be common. - * Conversely, setting this variable too low will significantly reduce the chance of a successful bond flip. + * If set too high, the stability of the updater will suffer, and nonphysical shapes with self-intersecting + * triangulation will be common. Conversely, setting this variable too low will significantly reduce the chance of a + * successful bond flip. */ - MonteCarloUpdater(fp::Triangulation& triangulation_inp, - EnergyFunctionParameters const& prms_inp, - std::function const&, fp::Triangulation const&, EnergyFunctionParameters const&)> energy_function_inp, - RandomNumberEngine& rng_inp, Real min_bond_length, Real max_bond_length) - :triangulation(triangulation_inp), prms(prms_inp), energy_function(energy_function_inp), rng(rng_inp), - unif_distr_on_01(std::uniform_real_distribution(0, 1)), - min_bond_length_square(min_bond_length*min_bond_length), max_bond_length_square(max_bond_length*max_bond_length) - { - - } + MonteCarloUpdater(fp::Triangulation &triangulation_inp, + const EnergyFunctionParameters &prms_inp, + EnergyFunctionType energy_function_inp, + RandomNumberEngine &rng_inp, + Real min_bond_length, + Real max_bond_length) + : triangulation(triangulation_inp), prms(prms_inp), energy_function(energy_function_inp), rng(rng_inp), + unif_distr_on_01(std::uniform_real_distribution(0, 1)), + min_bond_length_square(min_bond_length * min_bond_length), + max_bond_length_square(max_bond_length * max_bond_length) {} //! Implementation of the Metropolis algorithm. /** * This function implements the [Metropolis algorithm](https://en.wikipedia.org/wiki/Metropolis-Hastings_algorithm) * to evaluate whether the performed move should be rejected and undone. - * @return `true` if the energy difference between the old and the new states is negative (i.e., the move costs energy) - * and the random number is smaller than the Boltzmann Probability of accepting the move. `false` otherwise. + * @return `true` if the energy difference between the old and the new states is negative (i.e., the move costs + * energy) and the random number is smaller than the Boltzmann Probability of accepting the move. `false` otherwise. */ - bool move_needs_undoing() - { - e_diff = e_old - e_new; - if(kBT_>0){ //temperature can safely be put to 0, this will make the algorithm greedy - return (e_diff<0) && (unif_distr_on_01(rng)>std::exp(e_diff/kBT_)); - }else{ - return (e_diff<0); + bool move_needs_undoing(Real e_diff) { + if (kBT_ > 0) { // temperature can safely be put to 0, this will make the algorithm greedy + return (e_diff < 0) && (unif_distr_on_01(rng) > std::exp(e_diff / kBT_)); + } else { + return (e_diff < 0); } } @@ -92,18 +95,17 @@ class MonteCarloUpdater * @param node @mcuNodeStub * @param displacement @mcuDisplacementStub * @return `true` if - * new_next_neighbour_distances_are_between_min_and_max_length(fp::Node const&, fp::vec3 const&) + * new_next_neighbour_distances_are_between_min_and_max_length(fp::Node const&, fp::vec3 const&) * and - * new_verlet_neighbour_distances_are_between_min_and_max_length(fp::Node const&, fp::vec3 const&) + * new_verlet_neighbour_distances_are_between_min_and_max_length(fp::Node const&, fp::vec3 const&) * conditions are both satisfied, `false` otherwise. */ - bool new_neighbour_distances_are_between_min_and_max_length(fp::Node const& node, - fp::vec3 const& displacement) + bool new_neighbour_distances_are_between_min_and_max_length(const fp::Node &node, + const fp::vec3 &displacement) { - return (new_next_neighbour_distances_are_between_min_and_max_length(node, displacement)&& - new_verlet_neighbour_distances_are_between_min_and_max_length(node, displacement)); - + return (new_next_neighbour_distances_are_between_min_and_max_length(node, displacement) && + new_verlet_neighbour_distances_are_between_min_and_max_length(node, displacement)); } //! Pre-update check to test that the update step will not result in an unphysical configuration. @@ -117,47 +119,53 @@ class MonteCarloUpdater * @return `true` if all next neighbor distances are between minimal and maximal allowed values, * provided during the instantiation of the MonteCarloUpdater class, `false` otherwise. */ - bool new_next_neighbour_distances_are_between_min_and_max_length(fp::Node const& node, - fp::vec3 const& displacement) + bool new_next_neighbour_distances_are_between_min_and_max_length(const fp::Node &node, + const fp::vec3 &displacement) { Real distance_square_new, distance_square_old; - for (auto const& nn_dist: node.nn_distances){ - distance_square_new=(nn_dist - displacement).norm_square(); - distance_square_old=nn_dist.norm_square(); - if ((distance_square_new>max_bond_length_square) && (distance_square_old < max_bond_length_square)) { + for (const auto &nn_dist : node.nn_distances) { + distance_square_new = (nn_dist - displacement).norm_square(); + distance_square_old = nn_dist.norm_square(); + if ((distance_square_new > max_bond_length_square) && (distance_square_old < max_bond_length_square)) { return false; } - if ((distance_square_old>min_bond_length_square) && (distance_square_newmin_bond_length_square) && + // (distance_square_new const& node, - fp::vec3 const& displacement) + bool new_verlet_neighbour_distances_are_between_min_and_max_length(const fp::Node &node, + const fp::vec3 &displacement) { Real distance_square_new, distance_square_old; - for (auto const& verlet_neighbour_id: node.verlet_list) - { - distance_square_new=(triangulation[verlet_neighbour_id].pos - node.pos - displacement).norm_square(); - distance_square_old=(triangulation[verlet_neighbour_id].pos - node.pos).norm_square(); - if ((distance_square_newmin_bond_length_square)) { return false; } + for (const auto &verlet_neighbour_id : node.verlet_list) { + distance_square_new = (triangulation[verlet_neighbour_id].pos - node.pos - displacement).norm_square(); + distance_square_old = (triangulation[verlet_neighbour_id].pos - node.pos).norm_square(); + if ((distance_square_new < min_bond_length_square) && (distance_square_new < distance_square_old)) { + return false; + } } return true; } @@ -165,154 +173,181 @@ class MonteCarloUpdater //! Attempt a move Monte Carlo Step. /** * A move step is attempted on the specified node. - * [Metropolis algorithm](https://en.wikipedia.org/wiki/Metropolis-Hastings_algorithm) is used to evaluate whether the move should be accepted. + * [Metropolis algorithm](https://en.wikipedia.org/wiki/Metropolis-Hastings_algorithm) is used to evaluate whether + * the move should be accepted. * @param node @mcuNodeStub * @param displacement @mcuDisplacementStub + * @return This function returns the calculated energy difference. If not energy difference was calculated due to + * bond_length constraint rejection, then an empty optional is returned. * */ - void move_MC_updater(fp::Node const& node, fp::vec3 const& displacement) - { + std::optional move_MC_updater(const fp::Node &node, const fp::vec3 &displacement) { ++move_attempt; if (new_neighbour_distances_are_between_min_and_max_length(node, displacement)) { - e_old = energy_function(node, triangulation, prms); + Real e_old = energy_function(node, triangulation, prms, node.nn_ids); triangulation.move_node(node.id, displacement); - e_new = energy_function(node, triangulation, prms); - if (move_needs_undoing()) {triangulation.move_node(node.id, -displacement); ++move_back;} - }else{++bond_length_move_rejection;} + Real e_new = energy_function(node, triangulation, prms, node.nn_ids); + Real e_diff = e_old - e_new; + if (move_needs_undoing(e_diff)) { + triangulation.move_node(node.id, -displacement); + ++move_back; + } + return e_diff; + } else { + ++bond_length_move_rejection; + return {}; + } } //! Attempt a flip Monte Carlo Step. /** * A flip step is attempted between a specified node and one of its randomly chosen next neighbors. - * [Metropolis algorithm](https://en.wikipedia.org/wiki/Metropolis-Hastings_algorithm) is used to evaluate whether the flip should be accepted. + * [Metropolis algorithm](https://en.wikipedia.org/wiki/Metropolis-Hastings_algorithm) is used to evaluate whether + * the flip should be accepted. * @param node @mcuNodeStub * otherwise, the flippy will fail silently. * @note This function randomly chooses the next neighbor of the `node` and flips the edge between them. * If more precise control is required, i.e., if it is necessary to control exactly which edge needs to be flipped, - * then the flip_MC_updater(fp::Node const& node, Index id_in_nn_ids) method can be used. + * then the flip_MC_updater(fp::Node const& node, Index id_in_nn_ids) method can be used. */ - void flip_MC_updater(fp::Node const& node) - { - ++flip_attempt; - e_old = energy_function(node, triangulation, prms); - Index number_nn_ids = node.nn_ids.size(); - Index nn_id = node.nn_ids[std::uniform_int_distribution(0, number_nn_ids-1)(rng)]; - auto bfd = triangulation.flip_bond(node.id, nn_id, min_bond_length_square, max_bond_length_square); - if (bfd.flipped) { - e_new = energy_function(node, triangulation, prms); - if (move_needs_undoing()) { triangulation.unflip_bond(node.id, nn_id, bfd); ++flip_back;} - }else{++bond_length_flip_rejection;} + void flip_MC_updater(const fp::Node &node) { + Index number_nn_ids = static_cast(node.nn_ids.size()); + Index nn_id = node.nn_ids[std::uniform_int_distribution(0, number_nn_ids - 1)(rng)]; + flip_MC_updater(node, nn_id); } //! Attempt a flip Monte Carlo Step. /** * A flip step is attempted between a specified node and its specified next neighbor. - * [Metropolis algorithm](https://en.wikipedia.org/wiki/Metropolis-Hastings_algorithm) is used to evaluate whether the flip should be accepted. + * [Metropolis algorithm](https://en.wikipedia.org/wiki/Metropolis-Hastings_algorithm) is used to evaluate whether + * the flip should be accepted. * @param node @mcuNodeStub * @param id_in_nn_ids This id must be part of the Node::nn_ids vector of the node provided in the first argument , * otherwise, the flippy will fail silently. - * @warning For performance reasons, this function does not check if `id_in_nn_ids` is really a `nn_id` of the `node` provided in the first argument. - * The user is required to guarantee this fact. Otherwise, flippy will fail unpredictably. - * flip_MC_updater(fp::Node const&) is the safer method if the user does not care exactly which bond is flipped. + * @warning For performance reasons, this function does not check if `id_in_nn_ids` is really a `nn_id` of the + * `node` provided in the first argument. The user is required to guarantee this fact. Otherwise, flippy will fail + * unpredictably. flip_MC_updater(fp::Node const&) is the safer method if the user does not care exactly which bond + * is flipped. */ - void flip_MC_updater(fp::Node const& node, Index id_in_nn_ids) - { + void flip_MC_updater(const fp::Node &node, Index id_in_nn_ids) { ++flip_attempt; - e_old = energy_function(node, triangulation, prms); - Index number_nn_ids = node.nn_ids.size(); -// Index nn_id = index_in_nn_ids;//node.nn_ids[std::uniform_int_distribution(0, number_nn_ids-1)(rng)]; - auto bfd = triangulation.flip_bond(node.id, id_in_nn_ids, min_bond_length_square, max_bond_length_square); + Neighbors cns = triangulation.previous_and_next_neighbour_global_ids(node.id, id_in_nn_ids); + // This one line leads to an allocation each MC step for each node, which can easily number in billions + // for even small simulations. This can not be deploied to production! For even single flip per move, this + // leads to a 10% regression in banchmarks. + const auto changed_neighborhood = std::vector{id_in_nn_ids, cns.j_m_1, cns.j_p_1}; + Real e_old = energy_function(node, triangulation, prms, changed_neighborhood); + BondFlipData bfd = + triangulation.flip_bond(node.id, id_in_nn_ids, min_bond_length_square, max_bond_length_square); if (bfd.flipped) { - e_new = energy_function(node, triangulation, prms); - if (move_needs_undoing()) { triangulation.unflip_bond(node.id, id_in_nn_ids, bfd); ++flip_back;} - }else{++bond_length_flip_rejection;} + Real e_new = energy_function(node, triangulation, prms, changed_neighborhood); + Real e_diff = e_old - e_new; + if (move_needs_undoing(e_diff)) { + triangulation.unflip_bond(node.id, id_in_nn_ids, bfd); + ++flip_back; + } + } else { + ++bond_length_flip_rejection; + } } //! Reset the temperature of the Monte Carlo updater, at which the Boltzmann weights are evaluated. - void reset_kBT(Real kBT){ + void reset_kBT(Real kBT) { /** * @param kBT input value of new temperature. * The internal private data member `kBT_` that contains the current value of temperature will be overwritten * with this input. */ - kBT_=kBT; + kBT_ = kBT; } //! @getterFunctionStub - [[nodiscard]] Real kBT(){ - /** - * Monte Carlo Updater requires a kBT value in the calculation of the rejection probability of a random move. - * @return the state of the kBT value of the updater. - * @see move_needs_undoing() - */ + [[nodiscard]] Real kBT() { + /** + * Monte Carlo Updater requires a kBT value in the calculation of the rejection probability of a random move. + * @return the state of the kBT value of the updater. + * @see move_needs_undoing() + */ return kBT_; } //! @getterFunctionStub [[nodiscard]] unsigned long move_attempt_count() const { - /** - * Every time a move is attempted, a private internal state variable `move_attempt` is incremented by move_MC_updater(). - * This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater. - * @return current state of `move_attempt`. - * @see move_needs_undoing() - */ + /** + * Every time a move is attempted, a private internal state variable `move_attempt` is incremented by + * move_MC_updater(). This variable can be used for diagnostics or statistical tracking, but its state does not + * impact the function of the updater. + * @return current state of `move_attempt`. + * @see move_needs_undoing() + */ return move_attempt; } //! @getterFunctionStub [[nodiscard]] unsigned long bond_length_move_rejection_count() const { - /** - * Moves that cause nodes to overlap with their Verlet list neighbors or move them too far away from any of their next neighbors are rejected. Every time such rejection happens, a private internal state variable `bond_length_move_rejection` is incremented by move_MC_updater(). - * The specifics of this rejection criteria are calculated in the function new_neighbour_distances_are_between_min_and_max_length(fp::Node const& node, fp::vec3 const& displacement) - * Every time a node move would lead that node to have a bond with one of its next neighbors, which is longer than a specified maximal length (max_bond_length()), the move will be rejected. - * This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater. - * @return current state of `bond_length_move_rejection`. - * @see move_needs_undoing() - */ + /** + * Moves that cause nodes to overlap with their Verlet list neighbors or move them too far away from any of + * their next neighbors are rejected. Every time such rejection happens, a private internal state variable + * `bond_length_move_rejection` is incremented by move_MC_updater(). The specifics of this rejection criteria + * are calculated in the function new_neighbour_distances_are_between_min_and_max_length(fp::Node const& node, + * fp::vec3 const& displacement) Every time a node move would lead that node to have a bond with one of + * its next neighbors, which is longer than a specified maximal length (max_bond_length()), the move will be + * rejected. This variable can be used for diagnostics or statistical tracking, but its state does not impact + * the function of the updater. + * @return current state of `bond_length_move_rejection`. + * @see move_needs_undoing() + */ return bond_length_move_rejection; } //! @getterFunctionStub [[nodiscard]] unsigned long move_back_count() const { - /** - * Every time a move is rejected because the energy requirement was not satisfied, a private internal state variable `move_back` is incremented by move_MC_updater(). - * This variable does not track the rejections resulting from bond length restriction violations. - * This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater. - * @return current state of `move_back`. - * @see move_needs_undoing() bond_length_move_rejection_count() - */ + /** + * Every time a move is rejected because the energy requirement was not satisfied, a private internal state + * variable `move_back` is incremented by move_MC_updater(). This variable does not track the rejections + * resulting from bond length restriction violations. This variable can be used for diagnostics or statistical + * tracking, but its state does not impact the function of the updater. + * @return current state of `move_back`. + * @see move_needs_undoing() bond_length_move_rejection_count() + */ return move_back; } //!@getterFunctionStub [[nodiscard]] unsigned long flip_attempt_count() const { - /** - * Every time a flip is attempted, a private internal state variable `flip_attempt` is incremented by flip_MC_updater() and flip_MC_updater(fp::Node const& node, Index index_in_nn_ids). - * This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater. - * @return current state of `flip_attempt`. - */ + /** + * Every time a flip is attempted, a private internal state variable `flip_attempt` is incremented by + * flip_MC_updater() and flip_MC_updater(fp::Node const& node, Index index_in_nn_ids). This variable can be used + * for diagnostics or statistical tracking, but its state does not impact the function of the updater. + * @return current state of `flip_attempt`. + */ return flip_attempt; } //! @getterFunctionStub [[nodiscard]] unsigned long bond_length_flip_rejection_count() const { - /** - * If a flip would turn a valid bond into a bond that is too long, the flip is rejected, a private internal state variable `bond_length_flip_rejection` is incremented by flip_MC_updater() and flip_MC_updater(fp::Node const& node, Index index_in_nn_ids). - * The rejection of flips is handled by the Triangulation class itself and reported through the BondFlipData to the flip functions of the updater. - * This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater. - * @return current state of `bond_length_flip_rejection`. - * @see Triangulation::flip_bond(Index, Index, Real, Real) Triangulation::unflip_bond(Index, Index, BondFlipData const&) - */ + /** + * If a flip would turn a valid bond into a bond that is too long, the flip is rejected, a private internal + * state variable `bond_length_flip_rejection` is incremented by flip_MC_updater() and flip_MC_updater(fp::Node + * const& node, Index index_in_nn_ids). The rejection of flips is handled by the Triangulation class itself and + * reported through the BondFlipData to the flip functions of the updater. This variable can be used for + * diagnostics or statistical tracking, but its state does not impact the function of the updater. + * @return current state of `bond_length_flip_rejection`. + * @see Triangulation::flip_bond(Index, Index, Real, Real) Triangulation::unflip_bond(Index, Index, BondFlipData + * const&) + */ return bond_length_flip_rejection; } //! @getterFunctionStub [[nodiscard]] unsigned long flip_back_count() const { - /** - * Every time a flip is rejected because the energy requirement was not satisfied, a private internal state variable `flip_back` is incremented by flip_MC_updater() and flip_MC_updater(fp::Node const& node, Index index_in_nn_ids). - * The rejection of flips is handled by the Triangulation class itself and reported through the BondFlipData to the flip functions of the updater. - * This variable does not track the rejections resulting from bond length restriction violations. - * This variable can be used for diagnostics or statistical tracking, but its state does not impact the function of the updater. - * @return current state of `flip_back`. - * @see Triangulation:: unflip_bond(Index node_id, Index nn_id, BondFlipData const& common_nns) bond_length_flip_rejection_count() - */ + /** + * Every time a flip is rejected because the energy requirement was not satisfied, a private internal state + * variable `flip_back` is incremented by flip_MC_updater() and flip_MC_updater(fp::Node const& node, Index + * index_in_nn_ids). The rejection of flips is handled by the Triangulation class itself and reported through + * the BondFlipData to the flip functions of the updater. This variable does not track the rejections resulting + * from bond length restriction violations. This variable can be used for diagnostics or statistical tracking, + * but its state does not impact the function of the updater. + * @return current state of `flip_back`. + * @see Triangulation:: unflip_bond(Index node_id, Index nn_id, BondFlipData const& common_nns) + * bond_length_flip_rejection_count() + */ return flip_back; } - }; -} -#endif //FLIPPY_MONTECARLOUPDATER_HPP +} // namespace fp +#endif // FLIPPY_MONTECARLOUPDATER_HPP diff --git a/flippy/Nodes.hpp b/flippy/Nodes.hpp index 41fca73..7d9bea7 100755 --- a/flippy/Nodes.hpp +++ b/flippy/Nodes.hpp @@ -2,560 +2,374 @@ #define FLIPPY_NODES_HPP /** * @file - * @brief This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node of the triangulation - * and the collection of all nodes of the triangulation, respectively. + * @brief This file contains the fp::Node and fp::Nodes classes, data structures that represent a single node of the + * triangulation and the collection of all nodes of the triangulation, respectively. */ -#include -#include - #include "external/json.hpp" - #include "vec3.hpp" +#include +#include +#include + namespace fp { using Json = nlohmann::json; //! A data structure containing all geometric and topological information associated with a node. /** * This is a DUMB DATA STRUCTURE, meaning that it is not responsible for the coherence of the data it contains. - * For performance reasons, methods associated with Node struct will never check if the Node::curvature is the norm of the - * Node::curvature_vector or if the Node::nn_ids and Node::nn_distances are in the correct order. - * It is the responsibility of higher-order structures like Nodes and Triangulation to check that correct data is stored and updated correctly. - * However, it does check the data for consistency. - * It will match the length of Node::nn_ids and Node::nn_distances and pop and add both of them together. + * For performance reasons, methods associated with Node struct will never check if the Node::curvature is the norm of + * the Node::curvature_vector or if the Node::nn_ids and Node::nn_distances are in the correct order. It is the + * responsibility of higher-order structures like Nodes and Triangulation to check that correct data is stored and + * updated correctly. However, it does check the data for consistency. It will match the length of Node::nn_ids and + * Node::nn_distances and pop and add both of them together. * @tparam Real @RealStub * @tparam Index @IndexStub */ -template -struct Node -{ - //! @NodeIDStub - Index id; - //! Voronoi area associated with the node. - /** - * The Voronoi area is the sum of (mixed) Voronoi areas inside the triangles, incident to the node. - * Definition follows [Gueguen et al. 2017](https://doi.org/10.1039/C7SM01272A). - * \f[ - * A_{i} = \sum_{j} A'_{ij}. - * \f] - * - * @see Triangulation::mixed_area - * See Figure tr1. C in Triangulation. - * @see Node::curvature_vec Triangulation::update_bulk_node_geometry(Index) - */ - Real area; - //! If the node is part of a closed surface triangulation, then the `volume` contains the volume of the tetrahedron connected to each voronoi cell sub-triangle and the center of the lab coordinate system as defined in [Gueguen et al. 2017](https://doi.org/10.1039/C7SM01272A). - /** - * This means that the volume of an individual node does not have a proper physical interpretation. - * Only the sum of all node volumes, which is given by the triangulation - * is interpretable as a physical volume of an object. - * The definition follows [Gueguen et al. 2017](https://doi.org/10.1039/C7SM01272A). - * \f[ - * V_{ij} = A_{ij} \vec{x}_{i}\cdot \frac{\vec{n}_{ij,j+1}}{\| \vec{n}_{ij,j+1} \|}. - * \f] - * See Figure tr1. D in Triangulation. - * @see Node::curvature_vec Triangulation::update_bulk_node_geometry(Index) - */ - Real volume; - //! `unit_bending_energy` corresponds to the [Helfrich bending energy](https://en.wikipedia.org/wiki/Elasticity_of_cell_membranes) with bending rigidity 1 and gaussian bending stiffness 0. - /** - * \f[ - * \mathrm{unit\_bending\_energy} = \frac{1}{2} A_{\mathrm{node}} (2 H_{node})^2 - * \f] - * where \f$ H_{node} \f$ is the mean curvature of the node given by: - * \f[ - * H_{node}^2 = \frac{\vec{K}_{node}}{2A_{node}} \cdot \frac{\vec{K}_{node}}{2A_{node}} - * \f], - * with \f$ \vec{K} \f$ denoting the Node::curvature_vector. - * @see Node::curvature_vec Triangulation::update_bulk_node_geometry(Index) - */ - Real unit_bending_energy; - //! Position of the node in the lab frame. - vec3 pos; - //! Curvature vector of the node. - /** - * The definition of the curvature vector follows [Meyer et al. 2003](https://doi.org/10.1007/978-3-662-05105-4_2). - * \f[ - * \vec{K}_i = \frac{1}{2A_i}\sum_{j(i)} \left( \cot\left(\alpha_{ij}^{j+1}\right) + \cot\left(\alpha_{ij}^{j-1}\right) \right)\vec{\ell}_{ij} - * \f] - * See Figure tr1. B in Triangulation. - * @see Node::curvature_vec Triangulation::update_bulk_node_geometry(Index) - */ - vec3 curvature_vec; - //! A vector containing the global ids of the current node's next neighbors. - /** - * `nn_ids` contains the ids of nodes that are connected to this node in the triangulation. - * The next neighbors that are also mutual neighbors in the triangulation are stored sequentially in the vector. - * The last and the first elements are also neighbors, i.e., the nn_ids vector wraps around. - * During the calculation, this is facilitated through the use of @ref fp::Neighbors. - * @note The order of the next neighbors matters for the proper function of fp::Triangulation but is not guaranteed by this data structure. - * See Figure tr1. A, in Triangulation. - */ - std::vector nn_ids; - //! Distance vectors pointing from the node to its next neighbors. - std::vector> nn_distances; - //! The Verlet list contains the ids of nodes that are close to this node. - std::vector verlet_list; +struct Node { + //! @NodeIDStub + Index id; + //! Voronoi area associated with the node. + /** + * The Voronoi area is the sum of (mixed) Voronoi areas inside the triangles, incident to the node. + * Definition follows [Gueguen et al. 2017](https://doi.org/10.1039/C7SM01272A). + * \f[ + * A_{i} = \sum_{j} A'_{ij}. + * \f] + * + * @see Triangulation::mixed_area + * See Figure tr1. C in Triangulation. + * @see Node::curvature_vec Triangulation::update_bulk_node_geometry(Index) + */ + Real area; + //! If the node is part of a closed surface triangulation, then the `volume` contains the volume of the tetrahedron + //! connected to each voronoi cell sub-triangle and the center of the lab coordinate system as defined in [Gueguen + //! et al. 2017](https://doi.org/10.1039/C7SM01272A). + /** + * This means that the volume of an individual node does not have a proper physical interpretation. + * Only the sum of all node volumes, which is given by the triangulation + * is interpretable as a physical volume of an object. + * The definition follows [Gueguen et al. 2017](https://doi.org/10.1039/C7SM01272A). + * \f[ + * V_{ij} = A_{ij} \vec{x}_{i}\cdot \frac{\vec{n}_{ij,j+1}}{\| \vec{n}_{ij,j+1} \|}. + * \f] + * See Figure tr1. D in Triangulation. + * @see Node::curvature_vec Triangulation::update_bulk_node_geometry(Index) + */ + Real volume; - // unit-tested - //! Find and deletes the element with the id `to_pop_nn_id` in the `nn_id` vector. - void pop_nn(Index to_pop_nn_id) - { - /** - * @param to_pop_nn_id @NNIDStub This id is supposed to be removed from the next neighbor id vector. - * @see Node::nn_ids - * @note this will lead to resizing of the vector, which can be expensive! - * @warning If the provided next neighbor id is not part of the Node::nn_ids, this function will fail silently. - * It will not delete anything and won't throw any errors or warnings; - */ - auto pop_pos = find_nns_loc_pointer(to_pop_nn_id); - auto dist = pop_pos - nn_ids.begin(); + //! Position of the node in the lab frame. + vec3 pos; + //! Curvature vector of the node. + /** + * The definition of the curvature vector follows [Meyer et al. 2003](https://doi.org/10.1007/978-3-662-05105-4_2). + * \f[ + * \vec{K}_i = \frac{1}{2A_i}\sum_{j(i)} \left( \cot\left(\alpha_{ij}^{j+1}\right) + + * \cot\left(\alpha_{ij}^{j-1}\right) \right)\vec{\ell}_{ij} + * \f] + * See Figure tr1. B in Triangulation. + * @see Node::curvature_vec Triangulation::update_bulk_node_geometry(Index) + */ + vec3 curvature_vec; + //! A vector containing the global ids of the current node's next neighbors. + /** + * `nn_ids` contains the ids of nodes that are connected to this node in the triangulation. + * The next neighbors that are also mutual neighbors in the triangulation are stored sequentially in the vector. + * The last and the first elements are also neighbors, i.e., the nn_ids vector wraps around. + * During the calculation, this is facilitated through the use of @ref fp::Neighbors. + * @note The order of the next neighbors matters for the proper function of fp::Triangulation but is not guaranteed + * by this data structure. See Figure tr1. A, in Triangulation. + */ + std::vector nn_ids; + //! Distance vectors pointing from the node to its next neighbors. + std::vector> nn_distances; + //! The Verlet list contains the ids of nodes that are close to this node. + std::vector verlet_list; - if (pop_pos!=nn_ids.end()) { - // I checked that this would work on example code on cppreference https://godbolt.org/z/6qf8c9nTz - nn_ids.erase(pop_pos); - nn_distances.erase(nn_distances.begin() + dist); - } - } + auto find_nns_loc_pointer(Index nn_id) { + /** + * @brief Given the global id of the next neighbor, this function can be used to locate it in the Node::nn_ids + * vector. + * + * This function is just a convenient wrapper around the + * [std::find](https://en.cppreference.com/w/cpp/algorithm/find) function. + * ``` + * std::find(nn_ids.begin(), nn_ids.end(), to_pop_nn_id); + * ``` + * @param nn_id @NNIDStub + * @return if `nn_id` is contained in Node::nn_ids then the pointer to the position of that id in the `nn_ids` + * vector will be returned. Otherwise `nn_ids.end()`. + * @warning This function is not responsible for graceful handling of `nn_id`'s that are not found in the + * Node::nn_ids vector. If the `nn_id` is not contained in Node::nn_ids then the `nn_ids.end()` iterator will be + * returned. It is up to the user to perform the necessary checks to avoid undefined behavior that might result + * from trying to delete uninitiated memory. + */ + return std::find(nn_ids.begin(), nn_ids.end(), nn_id); + } - auto find_nns_loc_pointer(Index nn_id){ - /** - * @brief Given the global id of the next neighbor, this function can be used to locate it in the Node::nn_ids vector. - * - * This function is just a convenient wrapper around the [std::find](https://en.cppreference.com/w/cpp/algorithm/find) function. - * ``` - * std::find(nn_ids.begin(), nn_ids.end(), to_pop_nn_id); - * ``` - * @param nn_id @NNIDStub - * @return if `nn_id` is contained in Node::nn_ids then the pointer to the position of that id in the `nn_ids` vector will be returned. - * Otherwise `nn_ids.end()`. - * @warning This function is not responsible for graceful handling of `nn_id`'s that are not found in the Node::nn_ids vector. - * If the `nn_id` is not contained in Node::nn_ids then the `nn_ids.end()` iterator will be returned. - * It is up to the user to perform the necessary checks to avoid undefined behavior that might result from trying to delete uninitiated memory. - */ - return std::find(nn_ids.begin(), nn_ids.end(), nn_id); - } + // unit-tested + //! Find and deletes the element with the id `to_pop_nn_id` in the `nn_id` vector. + void pop_nn(Index to_pop_nn_id) { + /** + * @param to_pop_nn_id @NNIDStub This id is supposed to be removed from the next neighbor id vector. + * @see Node::nn_ids + * @note this will lead to resizing of the vector, which can be expensive! + * @warning If the provided next neighbor id is not part of the Node::nn_ids, this function will fail silently. + * It will not delete anything and won't throw any errors or warnings; + */ + auto pop_pos = find_nns_loc_pointer(to_pop_nn_id); + auto dist = pop_pos - nn_ids.begin(); - // unit-tested - void emplace_nn_id(Index to_emplace_nn_id, vec3 const& to_emplace_nn_pos, Index loc_idx) - { - /** - * @brief This function can be used to add new next neighbors to this node. - * - * This function constructs `to_emplace_nn_id` right before `to_emplace_pos`, - * i.e. if to_emplace_nn_id is 3, to_emplace_nn_id will be constructed right before the - * 3rd element and will become the new 3rd element. - * @param to_emplace_nn_id @NNIDStub This id is supposed to be added to the Node::nn_ids vector of this node. - * @param to_emplace_nn_pos const reference to the 3 dimensional position vector (type vec3) containing the position of the new next neighbour. - * This input is used to calculate the correct distance between this node and the new next neighbor, which will then be added to the Node::nn_distances vector. - * @param loc_idx @LocNNIndexStub - * @note This function causes the resizing of two vectors, which can be costly. - * @warning Making next neighbors is a symmetric operation. I.e., if node one becomes the next neighbor of node two, node two also has to become the next neighbor of node one. - * However, this function is not responsible for this relationship. It only adds a new next neighbor to this node, and the higher-order structures, like Triangulation, are responsible for guaranteeing the reciprocal relationship. - * @see Triangulation::emplace_before(Index, Index, Index) - */ - if (loc_idx(loc_idx); - nn_ids.emplace(nn_ids.begin() + signed_loc_idx, to_emplace_nn_id); - nn_distances.emplace(nn_distances.begin() + signed_loc_idx, to_emplace_nn_pos - pos); - } - } + if (pop_pos != nn_ids.end()) { + // I checked that this would work on example code on cppreference https://godbolt.org/z/6qf8c9nTz + nn_ids.erase(pop_pos); + nn_distances.erase(nn_distances.begin() + dist); + } + } - //unit-tested - //! This function can provide the stored distance vector to the next neighbor. - vec3 const& get_distance_vector_to(Index nn_id) const - { - /** - * @param nn_id @NNIDStub. - * @return returns the distance currently stored in the Node::nn_distances vector for the requested next neighbor. - * If the provided `nn_id` can not be found in the Node::nn_ids vector, then the function writes an error message - * to standard error output and terminates the program with exit code 12. - * @note @TerminationNoteStub - */ - auto id_pos = std::find(nn_ids.begin(), nn_ids.end(), nn_id); - if (id_pos!=nn_ids.end()) { - return nn_distances[static_cast(id_pos - nn_ids.begin())]; - } - else { - std::cerr << "nn_id:" << nn_id << " provided to `get_distance_vector_to` is not a next neighbour of the node " - << id; - exit(12); - } - } + // unit-tested + void emplace_nn_id(Index to_emplace_nn_id, const vec3 &to_emplace_nn_pos, Index loc_idx) { + /** + * @brief This function can be used to add new next neighbors to this node. + * + * This function constructs `to_emplace_nn_id` right before `to_emplace_pos`, + * i.e. if to_emplace_nn_id is 3, to_emplace_nn_id will be constructed right before the + * 3rd element and will become the new 3rd element. + * @param to_emplace_nn_id @NNIDStub This id is supposed to be added to the Node::nn_ids vector of this node. + * @param to_emplace_nn_pos const reference to the 3 dimensional position vector (type vec3) containing + * the position of the new next neighbour. This input is used to calculate the correct distance between this + * node and the new next neighbor, which will then be added to the Node::nn_distances vector. + * @param loc_idx @LocNNIndexStub + * @note This function causes the resizing of two vectors, which can be costly. + * @warning Making next neighbors is a symmetric operation. I.e., if node one becomes the next neighbor of node + * two, node two also has to become the next neighbor of node one. However, this function is not responsible for + * this relationship. It only adds a new next neighbor to this node, and the higher-order structures, like + * Triangulation, are responsible for guaranteeing the reciprocal relationship. + * @see Triangulation::emplace_before(Index, Index, Index) + */ + if (loc_idx < nn_ids.size()) { + auto signed_loc_idx = static_cast(loc_idx); + nn_ids.emplace(nn_ids.begin() + signed_loc_idx, to_emplace_nn_id); + nn_distances.emplace(nn_distances.begin() + signed_loc_idx, to_emplace_nn_pos - pos); + } + } - //defaulted operators are not explicitly unit-tested - /** - * @brief Default equality operator. - * - * @param other_node constant reference to the other Node. - * @return True if both nodes are equal. - */ - bool operator==(Node const& other_node) const = default; + // unit-tested + //! This function can provide the stored distance vector to the next neighbor. + const vec3 &get_distance_vector_to(Index nn_id) const { + /** + * @param nn_id @NNIDStub. + * @return returns the distance currently stored in the Node::nn_distances vector for the requested next + * neighbor. If the provided `nn_id` can not be found in the Node::nn_ids vector, then the function writes an + * error message to standard error output and terminates the program with exit code 12. + * @note @TerminationNoteStub + */ + auto id_pos = std::find(nn_ids.begin(), nn_ids.end(), nn_id); + if (id_pos != nn_ids.end()) { + return nn_distances[static_cast(id_pos - nn_ids.begin())]; + } else { + std::cerr << "nn_id:" << nn_id + << " provided to `get_distance_vector_to` is not a next neighbour of the node " << id; + exit(12); + } + } - /** - * @brief Streaming operator that can print formatted output to standard out with all Node data fields. - * - * @param os This is intended to be std::cout or any other std::ofstream reference. - * @param node The streamed node. - * @return Updated stream. - */ - friend std::ostream& operator<<(std::ostream& os, Node const& node) - { + // defaulted operators are not explicitly unit-tested + /** + * @brief Default equality operator. + * + * @param other_node constant reference to the other Node. + * @return True if both nodes are equal. + */ + bool operator==(const Node &other_node) const = default; - os << "node: " << node.id << '\n' - << "area: " << node.area << '\n' - << "volume: " << node.volume << '\n' - << "unit_bending_energy: " << node.unit_bending_energy << '\n' - << "curvature_vec: " << node.curvature_vec << '\n' - << "pos: " << node.pos << '\n' - << "nn_ids: "; - for (auto const& nn_id: node.nn_ids) { - os << nn_id << ' '; - } - os << '\n' - << "nn_distances: "; - for (auto const& nn_dist: node.nn_distances) { - os << nn_dist << '\n'; - } - os << '\n'; + /** + * @brief Streaming operator that can print formatted output to standard out with all Node data fields. + * + * @param os This is intended to be std::cout or any other std::ofstream reference. + * @param node The streamed node. + * @return Updated stream. + */ + friend std::ostream &operator<<(std::ostream &os, const Node &node) { - return os; - } + os << "node: " << node.id << '\n' + << "area: " << node.area << '\n' + << "volume: " << node.volume << '\n' + << "curvature_vec: " << node.curvature_vec << '\n' + << "pos: " << node.pos << '\n' + << "nn_ids: "; + for (const auto &nn_id : node.nn_ids) { + os << nn_id << ' '; + } + os << '\n' << "nn_distances: "; + for (const auto &nn_dist : node.nn_distances) { + os << nn_dist << '\n'; + } + os << '\n'; + return os; + } }; /** * @brief Data structure containing all nodes of the Triangulation. * - * The Nodes struct is capable of reinitializing nodes from a well-formed JSON object or from a simple [std::vector](https://en.cppreference.com/w/cpp/container/vector) that contains all nodes of a triangulation. - * The nodes class is basically a wrapper around a vector of nodes, i.e., `std::vector>`, and provides additional functionality to manipulate and query this data structure. - * Nodes class is also meant to be the interface with which the end user is manipulating individual nodes. + * The Nodes struct is capable of reinitializing nodes from a well-formed JSON object or from a simple + * [std::vector](https://en.cppreference.com/w/cpp/container/vector) that contains all nodes of a triangulation. The + * nodes class is basically a wrapper around a vector of nodes, i.e., `std::vector`, and provides additional + * functionality to manipulate and query this data structure. Nodes class is also meant to be the interface with which + * the end user is manipulating individual nodes. * @tparam Real @RealStub * @tparam Index @IndexStub */ -template -struct Nodes -{ - std::vector> data; //!< Data member that contains the individual nodes. +struct Nodes { + std::vector data; //!< Data member that contains the individual nodes. - Nodes() = default; //!< Default constructor. - explicit Nodes(std::vector > data_inp):data(data_inp) - { - /** - * Copies the data from a vector of nodes and creates a new Nodes struct. - * @param data_inp A standard vector containing all the nodes that are supposed to create a new Nodes class. - */ - } //!< Constructor from a vector. - explicit Nodes(Json const& node_dict) - { - /** - * Initiating nodes from a JSON object of a node collection. - * The nodes in the JSON file must be sequentially numbered from 0 to Number_of_nodes - 1. - * @param node_dict JSON object that contains a collection of nodes. - * @warning If the JSON object is malformed, then the constructor will fail and propagate a runtime error from the JSON parser. - */ + Nodes() = default; //!< Default constructor. + explicit Nodes(std::vector data_inp) : data(data_inp) { + /** + * Copies the data from a vector of nodes and creates a new Nodes struct. + * @param data_inp A standard vector containing all the nodes that are supposed to create a new Nodes class. + */ + } //!< Constructor from a vector. + explicit Nodes(const Json &node_dict) { + /** + * Initiating nodes from a JSON object of a node collection. + * The nodes in the JSON file must be sequentially numbered from 0 to Number_of_nodes - 1. + * @param node_dict JSON object that contains a collection of nodes. + * @warning If the JSON object is malformed, then the constructor will fail and propagate a runtime error from + * the JSON parser. + */ std::vector nn_ids_temp, verlet_list_temp; data.resize((node_dict.size())); - for (auto const& node: node_dict.items()) { - auto const& node_id = node.key(); + for (const auto &node : node_dict.items()) { + const auto &node_id = node.key(); fp::indexing_number auto node_index = static_cast(std::stol(node_id)); - auto const& raw_pos = node.value()["pos"]; - vec3 pos{(Real) raw_pos[0], (Real) raw_pos[1], (Real) raw_pos[2]}; + const auto &raw_pos = node.value()["pos"]; + vec3 pos{(Real)raw_pos[0], (Real)raw_pos[1], (Real)raw_pos[2]}; - auto const& raw_curv = node.value()["curvature_vec"]; - vec3 curvature_vec{(Real) raw_curv[0], (Real) raw_curv[1], (Real) raw_curv[2]}; - Real unit_bending_energy = node.value()["unit_bending_energy"]; - Real area = node.value()["area"]; - Real volume = node.value()["volume"]; + const auto &raw_curv = node.value()["curvature_vec"]; + vec3 curvature_vec{(Real)raw_curv[0], (Real)raw_curv[1], (Real)raw_curv[2]}; + Real area = node.value()["area"]; + Real volume = node.value()["volume"]; - nn_ids_temp = node_dict[node_id]["nn_ids"].get>(); + nn_ids_temp = node_dict[node_id]["nn_ids"].get>(); verlet_list_temp = node_dict[node_id]["verlet_list"].get>(); std::vector> nn_distances; - data[static_cast(node_index)] = Node{ - .id{node_index}, - .area{area}, - .volume{volume}, - .unit_bending_energy{unit_bending_energy}, - .pos{pos}, - .curvature_vec{curvature_vec}, - .nn_ids{nn_ids_temp}, - .nn_distances{nn_distances}, - .verlet_list{verlet_list_temp} - }; + data[static_cast(node_index)] = Node{.id = node_index, + .area = area, + .volume = volume, + .pos{pos}, + .curvature_vec{curvature_vec}, + .nn_ids{nn_ids_temp}, + .nn_distances{nn_distances}, + .verlet_list{verlet_list_temp}}; } - } //!< Constructor from JSON. + } //!< Constructor from JSON. - typename std::vector>::iterator begin() - { - /** - * This function allows the Nodes struct to be used in range-based `for` loops. - * @return `data.begin()` - */ - return data.begin();} //!< Returns an iterator to the beginning of the underlying data member that contains the collection of the nodes. - typename std::vector>::const_iterator begin() const - { - /** - * This function allows the Nodes struct to be used in range-based `for` loops in constant environments. - * @return a constant iterator `data.begin()`. - */ + typename std::vector::iterator begin() { + /** + * This function allows the Nodes struct to be used in range-based `for` loops. + * @return `data.begin()` + */ + return data.begin(); + } //!< Returns an iterator to the beginning of the underlying data member that contains the collection of the + //!< nodes. + [[nodiscard]] typename std::vector::const_iterator begin() const { + /** + * This function allows the Nodes struct to be used in range-based `for` loops in constant environments. + * @return a constant iterator `data.begin()`. + */ return data.begin(); - } //!< \overload + } //!< \overload - typename std::vector>::iterator end() - { + typename std::vector::iterator end() { /** - * This function allows the Nodes struct to be used in range-based `for` loops. - * @return `data.end()`. - */ + * This function allows the Nodes struct to be used in range-based `for` loops. + * @return `data.end()`. + */ return data.end(); - } //!< Returns an iterator to the end of the underlying data member that contains the collection of the nodes. - typename std::vector>::const_iterator end() const - { - /** - * This function allows the Nodes struct to be used in range-based `for` loops in constant environments. - * @return a constant iterator `data.end()`. - */ - return data.end();} //!< \overload - - // getters and setters - - // Position block - //unit-tested - [[nodiscard]] const vec3& pos(Index node_id) const - { + } //!< Returns an iterator to the end of the underlying data member that contains the collection of the nodes. + [[nodiscard]] typename std::vector::const_iterator end() const { /** - * @param node_id @NodeIDStub - * @return Constant reference to the 3D vector of the node position, Node::pos. - */ - return data[node_id].pos; - } //!< Given a node id, return the constant reference to the node position. - //unit-tested - void set_pos(Index node_id, vec3 const& new_pos){ - /** - * @param node_id @NodeIDStub This node needs to be moved. - * @param new_pos new position of the node to which the node needs to be moved. - */ - data[node_id].pos=new_pos; - } //!< Sets the position of the requested node to a given position. - void set_pos(Index node_id, vec3 && new_pos){ - /** - * @param node_id @NodeIDStub This node needs to be moved. - * @param new_pos new position of the node to which the node needs to be moved. - */ - data[node_id].pos=new_pos; - } //!< \overload - void displace(Index node_id, vec3const& displacement){ - /** - * @param node_id @NodeIDStub This node needs to be moved. - * @param displacement The displacement vector that will be added to the position vector of the node. - */ - data[node_id].pos+=displacement; - } //!< Changes the position of the requested node by a given displacement. - void displace(Index node_id, vec3&& displacement) - { - /** - * @param node_id @NodeIDStub This node needs to be moved. - * @param displacement The displacement vector that will be added to the position vector of the node. - */ - data[node_id].pos+=displacement; - } //!< \overload - - // Curvature vector block - [[nodiscard]] const vec3& curvature_vec(Index node_id) const { - /** - * @param node_id @NodeIDStub - * @return Constant reference to the 3D vector of the node curvature, Node::curvature_vec. - */ - return data[node_id].curvature_vec; - } //!< Given a node id, return the constant reference to the node curvature vector. - void set_curvature_vec(Index node_id, vec3 const& new_cv) { - /** - * @param node_id @NodeIDStub - * @param new_cv Constant lvalue reference to the new 3d curvature vector Node::curvature_vec. - */ - data[node_id].curvature_vec=new_cv; - } //!< Given a node id and a new curvature vector, reset the node's current curvature vector. - void set_curvature_vec(Index node_id, vec3 && new_cv) { - /** - * @param node_id @NodeIDStub - * @param new_cv rvalue reference to the new 3d curvature vector Node::curvature_vec. - */ - data[node_id].curvature_vec=new_cv; - } //!< @overload - - // Area block - [[nodiscard]] Real area(Index node_id)const{ - /** - * @param node_id @NodeIDStub - * @return Area associated with the node, Node::area. - */ - return data[node_id].area; - } //!< Given a node id, return node associated area. - void set_area(Index node_id, Real new_area){ - /** - * @param node_id @NodeIDStub - * @param new_area Value for the new node associated area Node::area. - * - */ - data[node_id].area = new_area; - } //!< Given a node id and a new area value, reset the current value of the node area. + * This function allows the Nodes struct to be used in range-based `for` loops in constant environments. + * @return a constant iterator `data.end()`. + */ + return data.end(); + } //!< \overload - // Volume block - [[nodiscard]] Real volume(Index node_id)const{ - /** - * @param node_id @NodeIDStub - * @return Area associated to the node, Node::volume. - */ - return data[node_id].volume; - } //!< Given a node id, return node associated volume. - void set_volume(Index node_id, Real new_volume){ - /** - * @param node_id @NodeIDStub - * @param new_volume Value for the new node associated volume Node::volume. - * - */ - data[node_id].volume = new_volume; - } //!< Given a node id and a new volume value, reset the current value of the node volume. + // getters and setters - // Unit bending rigidity block - [[nodiscard]] Real unit_bending_energy(Index node_id)const{ - /** - * - * @param node_id @NodeIDStub - * @return Area associated to the node, Node::unit_bending_energy. - */ - return data[node_id].unit_bending_energy; - } //!< Given a node id, return node-associated unit bending energy. - void set_unit_bending_energy(Index node_id, Real new_ube){ - /** - * - * @param node_id @NodeIDStub - * @param new_ube New value of the unit bending energy (mathematical definition can be found at Node::unit_bending_energy). - */ - data[node_id].unit_bending_energy=new_ube; - } //! Given a node id and a new value for the node-associated unit bending energy, update the current value of Node::unit_bending_energy. + // unit-tested - // nn_id[s] block - //unit-tested - [[nodiscard]] const auto& nn_ids(Index node_id)const{ - /** - * @param node_id @NodeIDStub - * @return Constant reference to the std::vector containing next neighbour ids of the node, Node::nn_ids. - */ - return data[node_id].nn_ids; - } //!< Given a node id, return the constant reference to the nn_ids std::vector. - //unit-tested - void set_nn_ids(Index node_id, std::vectorconst& new_nn_ids){ - /** - * @param node_id @NodeIDStub - * @param new_nn_ids const reference to the standard vector containing new values of nn_ids - * @warning This function does not check the provided `new_nn_ids` vector on correctness. - * If the content is wrong in any way (order is wrong or contained ids are not actual next neighbors of the node), - * then the update will cause problems with the proper function of flippy later! - */ - data[node_id].nn_ids = new_nn_ids; - } //!< For a Node specified by `node_id`, overwrite the entire Node::nn_ids vector. - //unit-tested - [[nodiscard]] Index nn_id(Index node_id, Index loc_nn_index)const{ - /** - * @param node_id @NodeIDStub - * @param loc_nn_index @LocNNIndexStub - * @return The global id of the next neighbor that was stored at the position `loc_nn_index` in the Node::nn_ids vector of the node with the id of `node_id`. - */ - return data[node_id].nn_ids[loc_nn_index]; - } //!< Given a node id and the local index in the Node::nn_ids vector, returns the next neighbour id. - //unit-tested - void set_nn_id(Index node_id, Index loc_nn_index, Index nn_id){ - /** - * @param node_id @NodeIDStub - * @param loc_nn_index @LocNNIndexStub - * @param nn_id @NNIDStub - */ - data[node_id].nn_ids[loc_nn_index]=nn_id; - } //!< For a node specified by `node_id`, resets the value of the requested `nn_id`. - void emplace_nn_id(Index node_id, Index to_emplace_nn_id, Index loc_nn_index){ - /** - * This function is a wrapper around Node::emplace_nn_id(Index , vec3 const& , Index). - * @param node_id @NodeIDStub - * @param to_emplace_nn_id @NNIDStub - * @param loc_nn_index @LocNNIndexStub - */ - data[node_id].emplace_nn_id(to_emplace_nn_id, pos(to_emplace_nn_id), loc_nn_index); + void emplace_nn_id(Index node_id, Index to_emplace_nn_id, Index loc_nn_index) { + /** + * This function is a wrapper around Node::emplace_nn_id(Index , vec3 const& , Index). + * @param node_id @NodeIDStub + * @param to_emplace_nn_id @NNIDStub + * @param loc_nn_index @LocNNIndexStub + */ + data[node_id].emplace_nn_id(to_emplace_nn_id, data[to_emplace_nn_id].pos, loc_nn_index); } //!< Emplace a the id of a new node in the Node::nn_ids vector, in front of the loc_idx position. - [[nodiscard]] const auto& nn_distances(Index node_id)const{ - /** - * The order of Node::nn_distances is the same as that of Node::nn_ids, this is guaranteed by Triangulation::update_nn_distance_vectors(Index node_id) - * @param node_id @NodeIDStub - * @return Associated std::vector containing all vec3 distance vectors from the node to its neighbors, Node::nn_distances. - */ - return data[node_id].nn_distances; - } //!< Given a node id, returns the std::vector containing distance vectors to next neighbours. - [[nodiscard]] const auto& get_nn_distance_vector_between(Index node_id, Index nn_id) const{ - /** - * This function is a wrapper around fp::Node::get_distance_vector_to(Index) const. - * @param node_id @NodeIDStub - * @param nn_id @NNIDStub - * @return Looks in the Node::nn_distances vector of the node (specified by node_id) for the distance to nn_id. A proper distance vector will be returned if the two nodes are neighbors. Otherwise, the program will terminate. - * @note @TerminationNoteStub - */ - return data[node_id].get_distance_vector_to(nn_id); - } //!< Given two global node ids, returns a distance vector (if the nodes are neighbors). - void set_nn_distance(Index node_id, Index loc_nn_index, vec3&& dist){ - /** - * @param node_id @NNIDStub - * @param loc_nn_index @LocNNIndexStub - * @param dist rvalue reference to a 3D distance vector (that points from node_id to its next neighbour). - */ - data[node_id].nn_distances[loc_nn_index]=dist; - } //!< Overwrite the next neighbor distance with a new 3d vector. - void set_nn_distance(Index node_id, Index loc_nn_index, vec3 const& dist){ - /** - * @param node_id @NNIDStub - * @param loc_nn_index @LocNNIndexStub - * @param dist lvalue constant reference to a 3D distance vector (that points from node_id to its next neighbour). - */ - data[node_id].nn_distances[loc_nn_index]=dist; + void set_nn_distance(Index node_id, Index loc_nn_index, vec3 &&dist) { + /** + * @param node_id @NNIDStub + * @param loc_nn_index @LocNNIndexStub + * @param dist rvalue reference to a 3D distance vector (that points from node_id to its next neighbour). + */ + data[node_id].nn_distances[loc_nn_index] = dist; + } //!< Overwrite the next neighbor distance with a new 3d vector. + + void set_nn_distance(Index node_id, Index loc_nn_index, const vec3 &dist) { + /** + * @param node_id @NNIDStub + * @param loc_nn_index @LocNNIndexStub + * @param dist lvalue constant reference to a 3D distance vector (that points from node_id to its next + * neighbour). + */ + data[node_id].nn_distances[loc_nn_index] = dist; } //!< \overload - [[nodiscard]] Index size() const { return static_cast(data.size()); } //!< Size of the Nodes data member. @return Size of the data vector, same as the number of nodes. + [[nodiscard]] Index size() const { + return static_cast(data.size()); + } //!< Size of the Nodes data member. @return Size of the data vector, same as the number of nodes. - Node& operator[](Index node_id) { - /** - * Nodes[node_id] is the same as Nodes.data[node_id]. - * @param node_id @NodeIDStub - * @return Reference to the Node struct with the id corresponding to node_id. - */ + Node &operator[](Index node_id) { + /** + * Nodes[node_id] is the same as Nodes.data[node_id]. + * @param node_id @NodeIDStub + * @return Reference to the Node struct with the id corresponding to node_id. + */ return data[node_id]; - } //!< Square bracket operator overload for convenient indexing of the Nodes struct. - const Node& operator[](Index node_id) const { - /** - * Nodes[node_id] in the constant environment is the same as Nodes.data.at(node_id). - * @param node_id @NodeIDStub - * @return Constant reference to the Node struct with the id corresponding to node_id. - */ + } //!< Square bracket operator overload for convenient indexing of the Nodes struct. + const Node &operator[](Index node_id) const { + /** + * Nodes[node_id] in the constant environment is the same as Nodes.data.at(node_id). + * @param node_id @NodeIDStub + * @return Constant reference to the Node struct with the id corresponding to node_id. + */ return data.at(node_id); } //!< @overload - [[nodiscard]] Json make_data() const{ - /** - * @return JSON object that represents a serialization of the data contained in Nodes. - * This JSON object can later be used to reconstruct the Nodes object. - */ + [[nodiscard]] Json make_data() const { + /** + * @return JSON object that represents a serialization of the data contained in Nodes. + * This JSON object can later be used to reconstruct the Nodes object. + */ Json json_data; - for (auto& node : data) { + for (auto &node : data) { json_data[std::to_string(node.id)] = { - {"area", node.area}, - {"volume", node.volume}, - {"unit_bending_energy", node.unit_bending_energy}, - {"pos", {node.pos[0], node.pos[1], node.pos[2]}}, - {"curvature_vec", {node.curvature_vec[0], node.curvature_vec[1], node.curvature_vec[2]}}, - {"nn_ids", node.nn_ids}, - {"verlet_list", node.verlet_list}, + {"area", node.area}, + {"volume", node.volume}, + {"pos", {node.pos[0], node.pos[1], node.pos[2]}}, + {"curvature_vec", {node.curvature_vec[0], node.curvature_vec[1], node.curvature_vec[2]}}, + {"nn_ids", node.nn_ids}, + {"verlet_list", node.verlet_list}, }; } return json_data; } //!< Serialize the Nodes struct to a JSON object. }; -} -#endif //FLIPPY_NODES_HPP +} // namespace fp +#endif // FLIPPY_NODES_HPP diff --git a/flippy/Triangulation.hpp b/flippy/Triangulation.hpp old mode 100644 new mode 100755 index bca668a..fe86d22 --- a/flippy/Triangulation.hpp +++ b/flippy/Triangulation.hpp @@ -2,63 +2,52 @@ #define FLIPPY_TRIANGULATION_HPP /** * @file - * @brief This file contains the fp::Triangulation class and several related helper classes. This is the core of flippy. + * @brief This file contains the fp::Triangulation class and several related + * helper classes. This is the core of flippy. */ -#include -#include #include "Nodes.hpp" -#include "vec3.hpp" -#include "utilities/utils.hpp" #include "Triangulator.hpp" +#include "custom_concepts.hpp" #include "stlSerializer.hpp" - -/** - * @GlobalsStub - * @{ - */ -//! Redefinition of the `LONG_LONG_MAX` macro in case a specific compiler does not implement it. The largest number that fits in the `long long` type. -#ifndef LONG_LONG_MAX -#define LONG_LONG_MAX 9223372036854775807LL -#endif - -/** - * @brief Literal for a very large integral number. - * - * This number will be used for the default instantiation of variables/ data members that hold indices. - * This is done to avoid instantiation with 0, which could also be a valid index. - * This way, one can differentiate between unintentionally default instantiated value and a proper value of an index. - * This will also mean that the use of such improperly instantiated indexer variables will cause an easier-to-identify error during runtime. - * @see fp::BondFlipData - * fp::Neighbors - * fp::Triangulation::two_common_neighbours(Index, Index) const - * fp::Triangulation::two_common_neighbour_positions(Index, Index) const - */ -#define VERY_LARGE_NUMBER_ LONG_LONG_MAX -/**@}*/ +#include "utilities/sim_utils.hpp" +#include "utilities/utils.hpp" +#include "vec3.hpp" +#include +#include +#include +#include /** * flippy's namespace. */ namespace fp { + /** * @GlobalsStub * @{ */ -//! a node needs to have more than the cutoff number of bonds to be allowed to donate one +//! a node needs to have more than the cutoff number of bonds to be allowed to +//! donate one static constexpr int BOND_DONATION_CUTOFF = 4; /**@}*/ //! A helper struct; keeps track of bond flips. /** - * A bond flip can be unsuccessful, e.g., if the requested two nodes that are donating an edge already have too few edges - * (more details on bond flips and how they can fail are provided in the Triangulation.flip_bond(Index, Index, Real, Real) function). - * If the flip does happen, then #flipped will be changed to true by the Triangulation.flip_bond(Index, Index, Real, Real) function and - * #common_nn_0 and #common_nn_1 will record the ids of nodes that receive new common bond. - * If the flip does not happen then the #common_nn_0 and #common_nn_1 data members will hold a #VERY_LARGE_NUMBER_ with which they were initiated. + * A bond flip can be unsuccessful, e.g., if the requested two nodes that are + * donating an edge already have too few edges (more details on bond flips and + * how they can fail are provided in the Triangulation.flip_bond(Index, Index, + * Real, Real) function). If the flip does happen, then #flipped will be changed + * to true by the Triangulation.flip_bond(Index, Index, Real, Real) function and + * #common_nn_0 and #common_nn_1 will record the ids of nodes that receive new + * common bond. If the flip does not happen then the #common_nn_0 and + * #common_nn_1 data members will hold a the largest fitting integer with which they + * were initiated. * - * The initiation with #VERY_LARGE_NUMBER_ is done to avoid #common_nn_0 and #common_nn_1 being zero initiated. - * This mechanism will lead to wrong behavior that is easier to identify during debugging in situations of un-careful usage. - * Example of such un-careful usage is if the end-user does not check that the bonds were not flipped and tries to un-flip bonds. + * The initiation with the largest integer is done to avoid #common_nn_0 and + * #common_nn_1 being zero initiated. This mechanism will lead to wrong behavior + * that is easier to identify during debugging in situations of un-careful + * usage. Example of such un-careful usage is if the end-user does not check + * that the bonds were not flipped and tries to un-flip bonds. * *```txt * @@ -79,108 +68,115 @@ static constexpr int BOND_DONATION_CUTOFF = 4; * @see Triangulation.unflip_bond(Index, Index, BondFlipData const&) * @see Triangulation.flip_bond_unchecked(Index, Index, Index, Index) */ -template -struct BondFlipData -{ - bool flipped = false; //!< track if the bond was flipped. - Index common_nn_0 = static_cast(VERY_LARGE_NUMBER_); //!< Global id of a node that is supposed to receive a bond after a flip. - Index common_nn_1 = static_cast(VERY_LARGE_NUMBER_); //!< Global id of a node that is supposed to receive a bond after a flip. +struct BondFlipData { + bool flipped = false; //!< track if the bond was flipped. + Index common_nn_0 = + std::numeric_limits::max(); //!< Global id of a node that is supposed to receive a bond after a flip. + Index common_nn_1 = + std::numeric_limits::max(); //!< Global id of a node that is supposed to receive a bond after a flip. }; /** * A helper struct; makes addition and subtraction on a ring easier. * Each fp::Node stores its next neighbors in a vector Node.nn_ids, * where the adjacent members in a vector are also next neighbors of each other. - * This struct provides a safe way to always access the next or previous member of the nn_ids vector, even if a wraparound is necessary. + * This struct provides a safe way to always access the next or previous member + * of the nn_ids vector, even if a wraparound is necessary. * @see fp::Node. * @tparam Index @IndexStub */ -template -struct Neighbors -{ - //! neighbor j+1 - Index j_m_1{VERY_LARGE_NUMBER_}; - //! neighbor j-1 - Index j_p_1{VERY_LARGE_NUMBER_}; - - /** - * - * @param j index of the j-th next neighbor - * @param ring_size corresponds to the number of elements of Node.nn_ids - * @return `j+1` if `j < ring_size - 1` and `0` otherwise. I.e., if `j` is the index of Node.nn_ids, its next neighbor will be stored in `j+1` element, unless `j` is the last element, then its next neighbor will be stored in the 0th element. - */ - static Index plus_one(Index j, Index ring_size) { return ((j 0` and `ring_size - 1` otherwise. I.e., if `j` is the index of Node.nn_ids, its previous next neighbor will be stored in `j-1` element, unless `j` is the 0th element, then its previous next neighbor will be stored in the last element. - */ - static Index minus_one(Index j, Index ring_size) { return ((j==((Index) 0)) ? ring_size - 1 : j - 1); } +struct Neighbors { + //! neighbor j+1 + Index j_m_1{std::numeric_limits::max()}; + //! neighbor j-1 + Index j_p_1{std::numeric_limits::max()}; + + /** + * + * @param j index of the j-th next neighbor + * @param ring_size corresponds to the number of elements of Node.nn_ids + * @return `j+1` if `j < ring_size - 1` and `0` otherwise. I.e., if `j` is the + * index of Node.nn_ids, its next neighbor will be stored in `j+1` element, + * unless `j` is the last element, then its next neighbor will be stored in + * the 0th element. + */ + static Index plus_one(Index j, Index ring_size) { return ((j < ring_size - 1) ? j + 1 : static_cast(0)); } + /** + * + * @param j index of the j-th next neighbor + * @param ring_size corresponds to the number of elements of Node.nn_ids + * @return `j-1` if `j > 0` and `ring_size - 1` otherwise. I.e., if `j` is the + * index of Node.nn_ids, its previous next neighbor will be stored in `j-1` + * element, unless `j` is the 0th element, then its previous next neighbor + * will be stored in the last element. + */ + static Index minus_one(Index j, Index ring_size) { return (j == static_cast(0)) ? ring_size - 1 : j - 1; } }; -//! A helper struct. Used by the triangulation class to pass data around in one convenient package. +//! A helper struct. Used by the triangulation class to pass data around in one +//! convenient package. /** - * Geometry is a struct that contains the usually needed geometric data in a triangulation. - * This struct can hold such data for a single node, a collection of nodes, or the entire triangulation. - * In the abstract, the fp::Geometry struct contains geometric data associated with some surface patch. - * This is useful since we often need to aggregate information for a node and its neighboring nodes. + * Geometry is a struct that contains the usually needed geometric data in a + * triangulation. This struct can hold such data for a single node, a collection + * of nodes, or the entire triangulation. In the abstract, the fp::Geometry + * struct contains geometric data associated with some surface patch. This is + * useful since we often need to aggregate information for a node and its + * neighboring nodes. * * The Data members of this struct are public, and thus, * it does not guarantee the correctness or consistency of the data it holds, * since it can be changed externally. * The geometry struct also provides overloaded arithmetic operators, - * that are usually useful when aggregating geometric data from single nodes over a larger patch of the surface. + * that are usually useful when aggregating geometric data from single nodes + * over a larger patch of the surface. * @tparam Real @RealStub * @tparam Index @IndexStub */ -template -struct Geometry -{ - Real area; //!< Area of the patch. Sum over the associated areas of individual nodes that comprise the patch. (Compare to Node::area). - Real volume; //!< Volume of the patch. Sum over the associated volumes of individual nodes that comprise the patch. (Compare to Node::volume). - Real unit_bending_energy; //!< Volume of the patch. Sum over the associated unit bending energies of individual nodes that comprise the patch. (Compare to Node::unit_bending_energy). - //! Default constructor, that zero initiates all the data members. - Geometry() :area(0.), volume(0.), unit_bending_energy(0.) { } - //! Construct from a node. - explicit Geometry(Node const& node) - :area(node.area), volume(node.volume), unit_bending_energy(node.unit_bending_energy) { - /** - * @param node Initiates data members of the struct with the geometric values of this single node. - */ - } - //! Direct Constructor. - Geometry(Real area_inp, Real volume_inp, Real unit_bending_energy_inp) - :area(area_inp), volume(volume_inp), unit_bending_energy(unit_bending_energy_inp) { - /** - * Initiates data members from directly provided numeric values. - * @param area_inp Input area. - * @param volume_inp Input volume. - * @param unit_bending_energy_inp Input unit bending energy. - */ - } - - //! Overloaded addition operator. - /** - * Implements addition between two Geometries. - * Each data member of *lhs* and *rhs* Geometries is added pairwise and - * stored in the corresponding data member of the returned struct. - * ```c++ - * //Example - * Geometry res = lhs + rhs; - * - * res.area == lhs.area + rhs.area; // true - * res.volume == lhs.volume + rhs.volume; // true - * res.unit_bending_energy == lhs.unit_bending_energy + rhs.unit_bending_energy; // true - * ``` - * @param lhs - * @param rhs - * @return lhs+rhs - */ - friend Geometry operator+(Geometry const& lhs, Geometry const& rhs) - { - - return Geometry(lhs.area + rhs.area, lhs.volume + rhs.volume, lhs.unit_bending_energy + rhs.unit_bending_energy); - } +struct Geometry { + Real area; //!< Area of the patch. Sum over the associated areas of individual + //!< nodes that comprise the patch. (Compare to Node::area). + Real volume; //!< Volume of the patch. Sum over the associated volumes of + //!< individual nodes that comprise the patch. (Compare to + //!< Node::volume). + //! Default constructor, that zero initiates all the data members. + Geometry() : area(0.), volume(0.) {} + //! Construct from a node. + explicit Geometry(const Node &node) : area(node.area), volume(node.volume) { + /** + * @param node Initiates data members of the struct with the geometric + * values of this single node. + */ + } + //! Direct Constructor. + Geometry(Real area_inp, Real volume_inp) : area(area_inp), volume(volume_inp) { + /** + * Initiates data members from directly provided numeric values. + * @param area_inp Input area. + * @param volume_inp Input volume. + * @param unit_bending_energy_inp Input unit bending energy. + */ + } + + //! Overloaded addition operator. + /** + * Implements addition between two Geometries. + * Each data member of *lhs* and *rhs* Geometries is added pairwise and + * stored in the corresponding data member of the returned struct. + * ```c++ + * //Example + * Geometry res = lhs + rhs; + * + * res.area == lhs.area + rhs.area; // true + * res.volume == lhs.volume + rhs.volume; // true + * res.unit_bending_energy == lhs.unit_bending_energy + + * rhs.unit_bending_energy; // true + * ``` + * @param lhs + * @param rhs + * @return lhs+rhs + */ + friend Geometry operator+(const Geometry &lhs, const Geometry &rhs) { + return {lhs.area + rhs.area, lhs.volume + rhs.volume}; + } //! Overloaded subtraction operator. /** * Implements subtraction between two Geometries. @@ -192,16 +188,16 @@ struct Geometry * * res.area == lhs.area - rhs.area; // true * res.volume == lhs.volume - rhs.volume; // true - * res.unit_bending_energy == lhs.unit_bending_energy - rhs.unit_bending_energy; // true + * res.unit_bending_energy == lhs.unit_bending_energy - + * rhs.unit_bending_energy; // true * ``` * @param lhs * @param rhs * @return lhs-rhs */ - friend Geometry operator-(Geometry const& lhs, Geometry const& rhs) - { - return Geometry(lhs.area - rhs.area, lhs.volume - rhs.volume, lhs.unit_bending_energy - rhs.unit_bending_energy); - } + friend Geometry operator-(const Geometry &lhs, const Geometry &rhs) { + return {lhs.area - rhs.area, lhs.volume - rhs.volume}; + } //! Overloaded addition and assignment operator. /** @@ -210,12 +206,9 @@ struct Geometry * * @param lhs * @param rhs - * @see Geometry operator+(Geometry const& lhs, Geometry const& rhs) + * @see Geometry operator+(Geometry const& lhs, Geometry const& rhs) */ - friend void operator+=(Geometry& lhs, Geometry const& rhs) - { - lhs = lhs + rhs; - } + friend void operator+=(Geometry &lhs, const Geometry &rhs) { lhs = lhs + rhs; } //! Overloaded subtraction and assignment operator. /** @@ -224,101 +217,93 @@ struct Geometry * * @param lhs * @param rhs - * @see Geometry operator-(Geometry const& lhs, Geometry const& rhs) + * @see Geometry operator-(Geometry const& lhs, Geometry const& rhs) */ - friend void operator-=(Geometry& lhs, Geometry const& rhs){ - lhs = lhs - rhs; - } + friend void operator-=(Geometry &lhs, const Geometry &rhs) { lhs = lhs - rhs; } //! Overloaded addition and assignment operator. /** * Can accumulate a node onto a Geometry struct. - * @param node Geometric data from this node is added to the corresponding data members of the Geometry struct. + * @param node Geometric data from this node is added to the corresponding + * data members of the Geometry struct. */ - void operator+=(Node const& node){ - area += node.area; - volume += node.volume; - unit_bending_energy += node.unit_bending_energy; + void operator+=(const Node &node) { + area += node.area; + volume += node.volume; } - -}; - -/** - * @GlobalsStub - * @{ - */ - -//! This enum defines named types of triangulations that are implemented in flippy. -/** - * A triangulation type needs to be provided as a template parameter to the Triangulation class during instantiation. - * This will tell the class to create an appropriate topology of the triangulated Nodes. - * The named types tell the triangulation class to... - */ -enum TriangulationType{ - - //! Create a spherical triangulation which is a sub-triangulation of a regular icosahedron - SPHERICAL_TRIANGULATION, - //! Create a triangulation which is a sub-triangulation of a plane square. - EXPERIMENTAL_PLANAR_TRIANGULATION }; -/**@}*/ +///** +// * @GlobalsStub +// * @{ +// */ +// +////! This enum defines named types of triangulations that are implemented in +/// flippy. +///** +// * A triangulation type needs to be provided as a template parameter to the +// Triangulation class during instantiation. +// * This will tell the class to create an appropriate topology of the +// triangulated Nodes. +// * The named types tell the triangulation class to... +// */ +// enum TriangulationType{ +// +// //! Create a spherical triangulation which is a sub-triangulation of a +// regular icosahedron SPHERICAL_TRIANGULATION, +// //! Create a triangulation which is a sub-triangulation of a plane square. +// EXPERIMENTAL_PLANAR_TRIANGULATION +//}; +///**@}*/ /** * \brief Implementation of Triangulation of two-dimensional surfaces in 3D. - * \image html assets/triangulation.png "Figure tr 1. Visualization of the triangulation." width=500px - * Visualization of the triangulation. A: Triangulated sphere with \f$N_{\mathrm{nodes}}=2252\f$. Black edges highlight the local neighborhood of a node. - * Circular arrows show the counterclockwise orientation of the nodes. - * This choice guarantees that all normal vectors point to the outside of the sphere. - * B: An arbitrary node \f$i\f$, with its curvature vector \f$\vec{K}_{i}\f$ and a highlighted angle \f$\alpha^j_{i,j+1}\f$ - * at neighbour \f$j\f$ opposite to the edge \f$i, j+1\f$. Superscript \f$j\f$ denotes the neighboring node to which the angle + * \image html assets/triangulation.png "Figure tr 1. Visualization of the + * triangulation." width=500px Visualization of the triangulation. + * A: Triangulated sphere with \f$N_{\mathrm{nodes}}=2252\f$. Black edges + * highlight the local neighborhood of a node. Circular arrows show the + * counterclockwise orientation of the nodes. This choice guarantees that all + * normal vectors point to the outside of the sphere. B: An arbitrary node + * \f$i\f$, with its curvature vector \f$\vec{K}_{i}\f$ and a highlighted angle + * \f$\alpha^j_{i,j+1}\f$ at neighbour \f$j\f$ opposite to the edge \f$i, + * j+1\f$. Superscript \f$j\f$ denotes the neighboring node to which the angle * belongs and subscript \f$i,j+1\f$ denotes the edge opposite of the angle. - * C: Node \f$i\f$ with its associated Voronoi area \f$A_i\f$ highlighted in red. - * The node has an associated area inside each triangle it is part of. - * We also highlight the triangle \f$i,j,j+1\f$ (light red with stripes) with the - * face normal \f$\vec{n}_{i,j,j+1}\f$ and the area \f$A_{i,j,j+1}\f$. - * The part of this triangle that is associated with node \f$i\f$ is highlighted in dark red and has the area \f$A_{ij}\f$. - * The convention is to use the central and rightmost nodes in the subscript. - * Since the nodes are ordered counterclockwise, this convention is unambiguous. - * D: Volume associated with node \f$i\f$ is made up of tetrahedrons - * that have as their base the triangles that make up the Voronoi cell of the node. - * The head of the tetrahedron points to some lab frame origin \f$\cal{O}\f$. \f$V_{ij}\f$ is the part of the volume - * associated to node \f$i\f$ that has its base in the triangle \f$i,j,j+1\f$. - * + * C: Node \f$i\f$ with its associated Voronoi area \f$A_i\f$ highlighted + * in red. The node has an associated area inside each triangle it is part of. + * We also highlight the triangle \f$i,j,j+1\f$ (light red with stripes) with + * the face normal \f$\vec{n}_{i,j,j+1}\f$ and the area \f$A_{i,j,j+1}\f$. The + * part of this triangle that is associated with node \f$i\f$ is highlighted in + * dark red and has the area \f$A_{ij}\f$. The convention is to use the central + * and rightmost nodes in the subscript. Since the nodes are ordered + * counterclockwise, this convention is unambiguous. D: Volume associated + * with node \f$i\f$ is made up of tetrahedrons that have as their base the + * triangles that make up the Voronoi cell of the node. The head of the + * tetrahedron points to some lab frame origin \f$\cal{O}\f$. \f$V_{ij}\f$ is + * the part of the volume associated to node \f$i\f$ that has its base in the + * triangle \f$i,j,j+1\f$. * - * @tparam Real @RealStub - * @tparam Index @IndexStub - * @tparam triangulation_type Template parameter that specifies the type of triangulation to be created. - * This parameter must be chosen from the fp::TriangulationType `enum`. - * Defaulted to fp::SPHERICAL_TRIANGULATION. */ -template -class Triangulation -{ -private: - explicit Triangulation(Real verlet_radius_inp) - :global_geometry_(), verlet_radius(verlet_radius_inp){} -public: + +class Triangulation { + private: + explicit Triangulation(Real verlet_radius_inp) : global_geometry_(), verlet_radius(verlet_radius_inp) {} Triangulation() = default; - //unit tested + + public: + // unit tested //! Constructor that can re-initiate a triangulation from the stored data. /** * - * @param nodes_input json object that contains data generated by make_egg_data() function, or similarly structured data. - * @param verlet_radius_inp Value for [Verlet radius](https://en.wikipedia.org/wiki/Verlet_list). + * @param nodes_input json object that contains data generated by + * make_egg_data() function, or similarly structured data. + * @param verlet_radius_inp Value for [Verlet + * radius](https://en.wikipedia.org/wiki/Verlet_list). */ -// [[deprecated("This constructor is deprecated and will be removed in the future. Use Triangulation::load_sphere_from_json() instead.")]] - Triangulation(Json const& nodes_input, Real verlet_radius_inp):Triangulation(verlet_radius_inp) - { - if constexpr(triangulation_type==SPHERICAL_TRIANGULATION) { - nodes_ = Nodes(nodes_input); - all_nodes_are_bulk(); - initiate_advanced_geometry(); - } - else{ - static_assert(triangulation_type==SPHERICAL_TRIANGULATION, "currently json initialization is only implemented for spherical triangulations!"); - } - + // [[deprecated("This constructor is deprecated and will be removed in the + // future. Use Triangulation::load_sphere_from_json() instead.")]] + Triangulation(const Json &nodes_input, Real verlet_radius_inp) : Triangulation(verlet_radius_inp) { + nodes_ = Nodes(nodes_input); + initiate_advanced_geometry(); } //! Constructor that can initiate a spherical triangulation from scratch. @@ -326,283 +311,294 @@ class Triangulation * * @param n_nodes_iter Number of sub-triangulations. * @param R_initial_input Initial radius of the spherical triangulation. - * @param verlet_radius_inp Value for [Verlet radius](https://en.wikipedia.org/wiki/Verlet_list). + * @param verlet_radius_inp Value for [Verlet + * radius](https://en.wikipedia.org/wiki/Verlet_list). */ - Triangulation(Index n_nodes_iter, Real R_initial_input, Real verlet_radius_inp):Triangulation(verlet_radius_inp) - { - static_assert(triangulation_type==SPHERICAL_TRIANGULATION, "This initialization is intended for spherical triangulations"); + Triangulation(Index n_nodes_iter, Real R_initial_input, Real verlet_radius_inp) : Triangulation(verlet_radius_inp) { R_initial = R_initial_input; - nodes_ = triangulate_sphere_nodes(n_nodes_iter); - all_nodes_are_bulk(); + nodes_ = triangulate_sphere_nodes(n_nodes_iter); scale_all_nodes_to_R_init(); orient_surface_of_a_sphere(); initiate_advanced_geometry(); } - //! Constructor that can initiate a planar triangulation from scratch. + //! Special constructor that can initialize a triangulation with spherical + //! topology from a binary stl + //! [stl](https://en.wikipedia.org/wiki/STL_(file_format)#Format) file. /** - * This overload initiates a planar triangulation with free floating (non-periodic boundaries). - * Edge nodes only serve a topological function and they do not contribute curvature or area to the membrane. - * @warning @linearTriangulationWarningStub - * @param n_length Number of nodes along the length of the triangulation (at the boundary). - * @param n_width Number of nodes along the width of the triangulation (at the boundary). - * @param length Length of the planar membrane. - * @param width Width of the planar membrane - * @param verlet_radius_inp Value for [Verlet radius](https://en.wikipedia.org/wiki/Verlet_list). - */ - Triangulation(Index n_length, Index n_width, Real length, Real width, Real verlet_radius_inp):Triangulation(verlet_radius_inp) - { - static_assert(triangulation_type == EXPERIMENTAL_PLANAR_TRIANGULATION, "This initialization is intended for planar triangulations"); - triangulate_planar_nodes(n_length, n_width, length, width); - orient_plane(); - initiate_advanced_geometry(); - } - - - //! Special constructor that can initialize a triangulation with spherical topology from a binary stl [stl](https://en.wikipedia.org/wiki/STL_(file_format)#Format) file. - /** - * This constructor is intended for initializing a triangulation with spherical topology from an stl file. - * @warning: This constructor is experimental and is not fully tested. The constructor trusts the stl file that it is a properly formed triangulation with spherical topology and a well oriented surface. - * currently there are no catches in place to gracefully handle malformed stl files. malformed stl files will simply result in runtime errors. + * This constructor is intended for initializing a triangulation with + * spherical topology from an stl file. + * @warning: This constructor is experimental and is not fully tested. The + * constructor trusts the stl file that it is a properly formed triangulation + * with spherical topology and a well oriented surface. currently there are no + * catches in place to gracefully handle malformed stl files. malformed stl + * files will simply result in runtime errors. * * @param stl_file_path an absolute or relative path to a binary stl file - * @param verlet_radius_inp - * @return + * @param verlet_radius_inp: stl_file specification has no provision for + * additional information, thus verlet radius of the triangulation must be + * provided additionally. + * @return This function tries to construct and return a spherical + * triangulation. If the stl file contains a triangulation of a different + * topology then the returned triangulation object will be malformed. */ - static Triangulation experimental_load_sphere_from_stl(std::filesystem::path const& stl_file_path, Real verlet_radius_inp){ - std::vector> triangles = implementation::stlSerializer::read_STLSolid_into_triangle_vec(stl_file_path); - - std::vector> nodes; - std::vector> unique_nodes; - fp::Triangulation triangulation; - nodes.resize(triangles.size()/2 + 2); - for (Index i=0; implementation::stlTriangle &triangle : triangles) { - for (unsigned int tr_idx = 0; tr_idx < 3; ++tr_idx) { - implementation::stlNode& node = triangle[tr_idx]; - auto node_pos = std::find(unique_nodes.begin(), unique_nodes.end(), node); - if (node_pos == unique_nodes.end()) { - node.id = i; - triangle[tr_idx].id = i; - ++i; - unique_nodes.push_back(node); - fp::Node n{}; - n.pos = node.pos; - n.id = node.id; - nodes[n.id] = n; - }else{ - triangle[tr_idx].id = node_pos->id; - } + static Triangulation experimental_load_sphere_from_stl(const std::filesystem::path &stl_file_path, + Real verlet_radius_inp) { + std::vector> triangles = + implementation::stlSerializer::read_STLSolid_into_triangle_vec(stl_file_path); + + std::vector nodes; + std::vector> unique_nodes; + Triangulation triangulation; + nodes.resize((triangles.size() / 2) + 2); + for (Index i = 0; implementation::stlTriangle &triangle : triangles) { + for (unsigned int tr_idx = 0; tr_idx < 3; ++tr_idx) { + implementation::stlNode &node = triangle[tr_idx]; + auto node_pos = std::ranges::find(unique_nodes, node); + if (node_pos == unique_nodes.end()) { + node.id = i; + triangle[tr_idx].id = i; + ++i; + unique_nodes.push_back(node); + Node n{}; + n.pos = node.pos; + n.id = node.id; + nodes[n.id] = n; + } else { + triangle[tr_idx].id = node_pos->id; } } + } - for (auto &triangle : triangles) { - for (Index tr_idx = 0; tr_idx < 3; ++tr_idx) { - Index id_0 = triangle[tr_idx].id; - auto [id_1, id_2] = triangle.other_node_ids(tr_idx); - - if(!is_member(nodes[id_0].nn_ids, id_1)){nodes[id_0].nn_ids.push_back(id_1);} - if(!is_member(nodes[id_0].nn_ids, id_2)){nodes[id_0].nn_ids.push_back(id_2);} + for (auto &triangle : triangles) { + for (Index tr_idx = 0; tr_idx < 3; ++tr_idx) { + Index id_0 = triangle[tr_idx].id; + auto [id_1, id_2] = triangle.other_node_ids(tr_idx); - } + if (!is_member(nodes[id_0].nn_ids, id_1)) { nodes[id_0].nn_ids.push_back(id_1); } + if (!is_member(nodes[id_0].nn_ids, id_2)) { nodes[id_0].nn_ids.push_back(id_2); } } - for(auto &node: nodes){ - std::cout << "node_id: " << node.id << "\n"; - } - - Triangulation tr; - tr.verlet_radius = verlet_radius_inp; - tr.R_initial = 1; - std::cout << "finished stl parsing\n"; - tr.nodes_ = Nodes(nodes); - tr.all_nodes_are_bulk(); - std::cout << "node count: " << tr.nodes_.size() << "\n"; - tr.orient_surface_of_a_sphere(); - std::cout << "surface oriented\n"; - tr.initiate_advanced_geometry(); - std::cout << "advanced geometry initiated\n"; - return tr; } - + Triangulation tr; + tr.verlet_radius = verlet_radius_inp; + tr.R_initial = 1; + tr.nodes_ = Nodes(nodes); + tr.orient_surface_of_a_sphere(); + tr.initiate_advanced_geometry(); + return tr; + } //! Set the radius of the Verlet list to a new value. /** * @param R new radius * @related Triangulation::make_verlet_list() */ - void set_verlet_radius(Real R){ - verlet_radius = R; - verlet_radius_squared = R*R; + void set_verlet_radius(Real R) { + verlet_radius = R; + verlet_radius_squared = R * R; } - //todo unittest + // todo unittest //! Create a [Verlet list](https://en.wikipedia.org/wiki/Verlet_list). /** - * This method creates a Verlet list for each node of the triangulation. All nodes that are inside the `verlet_radius`, of a given node, - * are included in its Verlet list (Node.verlet_list), + * This method creates a Verlet list for each node of the triangulation. All + * nodes that are inside the `verlet_radius`, of a given node, are included in + * its Verlet list (Node.verlet_list), */ - void make_verlet_list() - { - for (auto& node: nodes_) { + void make_verlet_list() { + for (auto &node : nodes_) { node.verlet_list.clear(); } - for (auto node_p = nodes_.begin(); node_p!=nodes_.end(); ++node_p) { - for (auto other_node_p = nodes_.begin(); other_node_p!=node_p; ++other_node_p) { - if ((node_p->pos - other_node_p->pos).norm_square()pos - other_node_p->pos).norm_square() < verlet_radius_squared) { node_p->verlet_list.push_back(other_node_p->id); other_node_p->verlet_list.push_back(node_p->id); } } - } } - //! Adds the same 3D vector to the positions of each node of the triangulation. + //! Adds the same 3D vector to the positions of each node of the + //! triangulation. /** - * This method is most helpful in shifting a triangulation after its initiation. - * For example, to set up initial conditions for a simulation where several triangulated vesicles interact. - * @param translation_vector A fixed 3D vector by which the triangulation is to be shifted. + * This method is most helpful in shifting a triangulation after its + * initiation. For example, to set up initial conditions for a simulation + * where several triangulated vesicles interact. + * @param translation_vector A fixed 3D vector by which the triangulation is + * to be shifted. */ - void translate_all_nodes(vec3 const& translation_vector) - { - for (Index i = 0; i &translation_vector) { + for (Index i = 0; i < nodes_.size(); ++i) { + move_node(i, translation_vector); + } } - //unit tested + // unit tested //! Calculate the area-weighted average of node positions. /** - * This method calculates the average position of the mass center of the triangulation, - * by averaging the positions of each node of the triangulation. - * The average is weighted by the area associated with each node. + * This method calculates the average position of the mass center of the + * triangulation, by averaging the positions of each node of the + * triangulation. The average is weighted by the area associated with each + * node. * @return position of the mass center. */ - vec3 calculate_mass_center() const - { - vec3 mass_center = vec3{0., 0., 0.}; - for (auto const& node : nodes_) { mass_center += node.pos; } - mass_center = mass_center/static_cast(nodes_.size()); + [[nodiscard]] vec3 calculate_mass_center() const { + auto mass_center = vec3{.x = 0., .y = 0., .z = 0.}; + for (const auto &node : nodes_) { + mass_center += node.pos; + } + mass_center = mass_center / static_cast(nodes_.size()); return mass_center; } - //unit tested - //! Move an individual node of the triangulation and update all the geometric quantities of the triangulation that changed. + // unit tested + //! Move an individual node of the triangulation and update all the geometric + //! quantities of the triangulation that changed. /** * @param node_id @NodeIDStub - * @param displacement_vector 3D vector by which the chosen node is to be displaced. + * @param displacement_vector 3D vector by which the chosen node is to be + * displaced. */ - void move_node(Index node_id, vec3 const& displacement_vector) - { + void move_node(Index node_id, const vec3 &displacement_vector) { + Node &node = nodes_[node_id]; pre_update_geometry = get_two_ring_geometry(node_id); - nodes_.displace(node_id, displacement_vector); - update_two_ring_geometry(node_id); + pure_node_move(node, displacement_vector); post_update_geometry = get_two_ring_geometry(node_id); update_global_geometry(pre_update_geometry, post_update_geometry); } // unit-tested - //! Adds a new node to the next neighbor list of a given node and calculates their mutual distance. + //! Adds a new node to the next neighbor list of a given node and calculates + //! their mutual distance. /** - * @note The direct use of this method is discouraged unless a very specific type of edge flipping is required. - * Triangulation::flip_bond is a more high-level method, suitable for most basic bond-flipping needs. + * @note The direct use of this method is discouraged unless a very specific + * type of edge flipping is required. Triangulation::flip_bond is a more + * high-level method, suitable for most basic bond-flipping needs. * - * This method finds the anchor node in the Nodes::nn_ids vector of the center_node - * and uses Node classes own method Node::emplace_nn_id to emplace the new_value - * there (together with its distance to the center_node). - * @param center_node_id @NodeIDStub The new node is emplaced in the Node.nn_ids vector of this node. - * @param anchor_id @LocNNIndexStub This is the index of the next neighbor (inside `nn_ids` vector of the node `center_node_id`), before which the new node id is emplaced. + * This method finds the anchor node in the Nodes::nn_ids vector of the + * center_node and uses Node classes own method Node::emplace_nn_id to emplace + * the new_value there (together with its distance to the center_node). + * @param center_node_id @NodeIDStub The new node is emplaced in the + * Node.nn_ids vector of this node. + * @param anchor_id @LocNNIndexStub This is the index of the next neighbor + * (inside `nn_ids` vector of the node `center_node_id`), before which the new + * node id is emplaced. * @param new_value @NodeIDStub The id of the new node. */ - void emplace_before(Index center_node_id, Index anchor_id, Index new_value) - { - // The body of this function looks like it does not guard against find returning - // end() pointer, but this is taken care of in the emplace_nn_id method. - auto anchor_pos_ptr = std::find(nodes_[center_node_id].nn_ids.begin(), - nodes_[center_node_id].nn_ids.end(), anchor_id); - indexing_number auto anchor_pos = (Index) (anchor_pos_ptr - nodes_[center_node_id].nn_ids.begin()); + void emplace_before(Index center_node_id, Index anchor_id, Index new_value) { + // The body of this function looks like it does not guard against find + // returning end() pointer, but this is taken care of in the emplace_nn_id + // method. + auto anchor_pos_ptr = + std::find(nodes_[center_node_id].nn_ids.begin(), nodes_[center_node_id].nn_ids.end(), anchor_id); + indexing_number auto anchor_pos = (Index)(anchor_pos_ptr - nodes_[center_node_id].nn_ids.begin()); nodes_[center_node_id].emplace_nn_id(new_value, nodes_[new_value].pos, anchor_pos); } - /** \brief Securely flip the bond inside a quadrilateral formed by the nodes given by node_id, - * nn_id and their two common next neighbors, if all topological requirements are satisfied. + /** \brief Securely flip the bond inside a quadrilateral formed by the nodes + * given by node_id, nn_id and their two common next neighbors, if all + * topological requirements are satisfied. */ - BondFlipData flip_bond(Index node_id, Index nn_id, - Real min_bond_length_square, - Real max_bond_length_square){ - /** - * *flip_bond* function takes a lot of care to keep the triangulation intact, i.e., not introduce holes or additional bonds in it. - * To this end, the function performs a lot of checks to determine if the proposed bond fip is allowed by the topology. - * The information if the flip was allowed and succeeded or not will be encoded in the BondFlipData struct, which this function will return. - * The struct also contains information on the new end nodes of the bond, which is useful if one wishes to undo the flip. - * A bond flip can fail if: - * - if the provided nodes id's do not correspond to neighboring nodes. - * - one of the donor nodes have already too few bonds (bonds less than #BOND_DONATION_CUTOFF). - * - if a new bond that would be created, would be - * - too long (length squared is larger than **max_bond_length_square**) - * - too short (length squared is smaller than **min_bond_length_square**) - * - * @param node_id @NodeIDStub - * @param nn_id @NNIDStub - * @param min_bond_length_square @BondLengthSquareStub{minimal} - * @param max_bond_length_square @BondLengthSquareStub{maximal} - * @return If the flip was successful, the returned BondFlipData struct will contain a boolean state variable BondFlipData::flipped = **true**. - * The members BondFlipData::common_nn_0 and BondFlipData::common_nn_1 will contain global ids of new end nodes of the flipped bond. - * If the flip was not successful, then a default initialized BondFlipData struct will be returned with BondFlipData::flipped = **false**. - * @note Regardless of the return values, the primary purpose of the function, that of flipping a bond, is accomplished as a side-effect. - */ - if constexpr (triangulation_type == TriangulationType::SPHERICAL_TRIANGULATION) { - return flip_bulk_bond(node_id, nn_id, min_bond_length_square, max_bond_length_square); - } else if constexpr (triangulation_type == TriangulationType::EXPERIMENTAL_PLANAR_TRIANGULATION){ - - if (boundary_nodes_ids_set_.contains(node_id) or boundary_nodes_ids_set_.contains(nn_id)){ - }else{ - Neighbors common_nns = previous_and_next_neighbour_global_ids(node_id, nn_id); - if(boundary_nodes_ids_set_.contains(common_nns.j_m_1) or boundary_nodes_ids_set_.contains(common_nns.j_p_1)){ - }else{ - return flip_bond_in_quadrilateral(node_id, nn_id, common_nns, min_bond_length_square, max_bond_length_square); - } - } - return BondFlipData(); + BondFlipData flip_bond(Index node_id, Index nn_id, Real min_bond_length_square, Real max_bond_length_square) { + /** + * *flip_bond* function takes a lot of care to keep the triangulation + * intact, i.e., not introduce holes or additional bonds in it. To this end, + * the function performs a lot of checks to determine if the proposed bond + * fip is allowed by the topology. The information if the flip was allowed + * and succeeded or not will be encoded in the BondFlipData struct, which + * this function will return. The struct also contains information on the + * new end nodes of the bond, which is useful if one wishes to undo the + * flip. A bond flip can fail if: + * - if the provided nodes id's do not correspond to neighboring nodes. + * - one of the donor nodes have already too few bonds (bonds less than + * #BOND_DONATION_CUTOFF). + * - if a new bond that would be created, would be + * - too long (length squared is larger than **max_bond_length_square**) + * - too short (length squared is smaller than **min_bond_length_square**) + * + * @param node_id @NodeIDStub + * @param nn_id @NNIDStub + * @param min_bond_length_square @BondLengthSquareStub{minimal} + * @param max_bond_length_square @BondLengthSquareStub{maximal} + * @return If the flip was successful, the returned BondFlipData struct will + * contain a boolean state variable BondFlipData::flipped = **true**. The + * members BondFlipData::common_nn_0 and BondFlipData::common_nn_1 will + * contain global ids of new end nodes of the flipped bond. If the flip was + * not successful, then a default initialized BondFlipData struct will be + * returned with BondFlipData::flipped = **false**. + * @note Regardless of the return values, the primary purpose of the + * function, that of flipping a bond, is accomplished as a side-effect. + */ + BondFlipData bfd{}; + + if (nodes_have_too_few_bonds_for_donation(node_id, nn_id)) { return bfd; } + + Neighbors common_nns = previous_and_next_neighbour_global_ids(node_id, nn_id); + + Real bond_length_square = (nodes_[common_nns.j_m_1].pos - nodes_[common_nns.j_p_1].pos).norm_square(); + if ((bond_length_square > max_bond_length_square) || (bond_length_square < min_bond_length_square)) { + return bfd; + } + + pre_update_geometry = calculate_diamond_geometry(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1); - }else{ - static_assert(triangulation_type == TriangulationType::SPHERICAL_TRIANGULATION or triangulation_type == TriangulationType::EXPERIMENTAL_PLANAR_TRIANGULATION, - "Triangulation type must be either spherical or planar."); + bfd = flip_bond_unchecked(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1); + + if (has_two_common_neighbours(bfd.common_nn_0, bfd.common_nn_1)) { + update_diamond_geometry(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1); + post_update_geometry = calculate_diamond_geometry(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1); + update_global_geometry(pre_update_geometry, post_update_geometry); + } else { + flip_bond_unchecked(bfd.common_nn_0, bfd.common_nn_1, nn_id, node_id); + bfd.flipped = false; } + return bfd; } - //unit-tested + // unit-tested //! Un-flip a bond that was just flipped. /** - * This method reverses a flip between two nodes that used to be connected and had their node just flipped away, - * provided their id's and the BondFlipData that holds the information on the current bond holders. + * This method reverses a flip between two nodes that used to be connected and + * had their node just flipped away, provided their id's and the BondFlipData + * that holds the information on the current bond holders. * * - * This means that `node_id` and `nn_id` are (pre-flip) owners of the bond. And `common_nns` contains the id's of the - * current bond owners (to which the bond was flipped to). - * The edge will be taken away from the current two neighbors and added to the previous owners. All geometric information of the triangulation will be updated. + * This means that `node_id` and `nn_id` are (pre-flip) owners of the bond. + * And `common_nns` contains the id's of the current bond owners (to which the + * bond was flipped to). The edge will be taken away from the current two + * neighbors and added to the previous owners. All geometric information of + * the triangulation will be updated. * - * @warning This method only works correctly if there were no bond flips after that flip which is being reversed. - * I.e., this method can only reverse the last flip. Furthermore, the method assumes that the arguments are provided correctly and - * will result in an illegal triangulation if this is not the case. + * @warning This method only works correctly if there were no bond flips after + * that flip which is being reversed. I.e., this method can only reverse the + * last flip. Furthermore, the method assumes that the arguments are provided + * correctly and will result in an illegal triangulation if this is not the + * case. * - * @note This method does not check the validity of its input to provide a fast way of flip reversal. It relies on the fact that - * the user usually has the exact knowledge of all four node id's that participated in a flip and can provide those id's - * in the correct order. For a safer way of un-fliping, the Triangulation::flip_bond method can be used twice, with interchanged order - * of arguments. + * @note This method does not check the validity of its input to provide a + * fast way of flip reversal. It relies on the fact that the user usually has + * the exact knowledge of all four node id's that participated in a flip and + * can provide those id's in the correct order. For a safer way of un-fliping, + * the Triangulation::flip_bond method can be used twice, with interchanged + * order of arguments. * - * The following example implementation of a Monte Carlo flip update method shows the proper way to use - * the Triangulation.flip_bond and Triangulation.unflip_bond methods. + * The following example implementation of a Monte Carlo flip update method + * shows the proper way to use the Triangulation.flip_bond and + * Triangulation.unflip_bond methods. * * ```c++ - * // `e_old`, `e_new`, `triangulation and `parameters` are data members of the updater - * void mc_flipp_update(fp::Node const& node) + * // `e_old`, `e_new`, `triangulation and `parameters` are data members of + * the updater void mc_flipp_update(fp::Node const& node) * { * e_old = energy_function(node, triangulation, parameters); * Index number_nn_ids = node.nn_ids.size(); - * Index nn_id = node.nn_ids[std::uniform_int_distribution(0, number_nn_ids-1)(rng)]; - * auto bond_flip_data = triangulation.flip_bond(node.id, nn_id, min_bond_length_square, max_bond_length_square); - * if (bond_flip_data.flipped) { - * e_new = energy_function(node, triangulation, parameters); - * if (move_needs_undoing()) { triangulation.unflip_bond(node.id, nn_id, bond_flip_data); } + * Index nn_id = node.nn_ids[std::uniform_int_distribution(0, + * number_nn_ids-1)(rng)]; auto bond_flip_data = + * triangulation.flip_bond(node.id, nn_id, min_bond_length_square, + * max_bond_length_square); if (bond_flip_data.flipped) { e_new = + * energy_function(node, triangulation, parameters); if (move_needs_undoing()) + * { triangulation.unflip_bond(node.id, nn_id, bond_flip_data); } * } * } *``` @@ -610,27 +606,32 @@ class Triangulation * * @param node_id @NodeIDStub * @param nn_id @NNIDStub - * @param common_nns BondFlipData containing information on the common next neighbor ids. + * @param common_nns BondFlipData containing information on the common next + * neighbor ids. */ - void unflip_bond(Index node_id, Index nn_id, BondFlipData const& common_nns) - { + void unflip_bond(Index node_id, Index nn_id, const BondFlipData &common_nns) { flip_bond_unchecked(common_nns.common_nn_0, common_nns.common_nn_1, nn_id, node_id); update_diamond_geometry(node_id, nn_id, common_nns.common_nn_0, common_nns.common_nn_1); update_global_geometry(post_update_geometry, pre_update_geometry); } - //! Exchange the next neighborhood between four nodes in a manner that will correspond to - //! a bond flip if the provided information was correct. + //! Exchange the next neighborhood between four nodes in a manner that will + //! correspond to a bond flip if the provided information was correct. /** - * @warning This method may lead to an unphysical state (broken lattice that no longer represents a triangulation) if the provided - * arguments are not correct. - * @note For most use-cases the high level methods Triangulation::flip_bond and Triangulation::unflilp_bond are recommended. - * They guarantee that the performed flips result in a legal triangulation and reject the flip otherwise. - * This method should only be used by advanced users that have very specific needs for a flip updater. + * @warning This method may lead to an unphysical state (broken lattice that + * no longer represents a triangulation) if the provided arguments are not + * correct. + * @note For most use-cases the high level methods Triangulation::flip_bond + * and Triangulation::unflilp_bond are recommended. They guarantee that the + * performed flips result in a legal triangulation and reject the flip + * otherwise. This method should only be used by advanced users that have very + * specific needs for a flip updater. * - * The correct functioning of this method requires that, `node_id` and `nn_id` need to be next neighbours, and `common_nn_j_m_1` and `common_nn_j_p_1` + * The correct functioning of this method requires that, `node_id` and `nn_id` + * need to be next neighbours, and `common_nn_j_m_1` and `common_nn_j_p_1` * need to be common next neighbors of both `node_id` and `nn_id`. - * Moreover, the nodes need to be ordered in the Node::nn_ids vector of the Node represented by `node_id` as follows: + * Moreover, the nodes need to be ordered in the Node::nn_ids vector of the + * Node represented by `node_id` as follows: * `... common_nn_j_m_1, node_id, common_nn_j_p_1 ...`, * or a cyclic permutation thereof. * @param node_id @NodeIDStub @@ -639,236 +640,198 @@ class Triangulation * @param common_nn_j_p_1 * @return BondFlipData, where the flipped field is always set to `True`. */ - BondFlipData flip_bond_unchecked(Index node_id, Index nn_id, - Index common_nn_j_m_1, Index common_nn_j_p_1) - { + BondFlipData flip_bond_unchecked(Index node_id, Index nn_id, Index common_nn_j_m_1, Index common_nn_j_p_1) { emplace_before(common_nn_j_m_1, node_id, common_nn_j_p_1); emplace_before(common_nn_j_p_1, nn_id, common_nn_j_m_1); delete_connection_between_nodes_of_old_edge(node_id, nn_id); - return {.flipped=true, .common_nn_0=common_nn_j_m_1, .common_nn_1=common_nn_j_p_1}; + return {.flipped = true, .common_nn_0 = common_nn_j_m_1, .common_nn_1 = common_nn_j_p_1}; } // unit-tested //! Update the geometric quantities associated with the given node. /** * This is the core update function of the triangulation. - * It updates the geometric quantities of the given node after its position in the triangulation has been changed - * through a node move, or its neighborhood structure has been changed through a bond flip. - * Calculate and update the local curvature, area, volume, and unit bending energy of the node (See Figure tr1 B, C and D). + * It updates the geometric quantities of the given node after its position in + * the triangulation has been changed through a node move, or its neighborhood + * structure has been changed through a bond flip. Calculate and update the + * local curvature, area, volume, and unit bending energy of the node (See + * Figure tr1 B, C and D). * - * @see Node::curvature_vec, Node::area, Node::volume, Node::unit_bending_energy + * @see Node::curvature_vec, Node::area, Node::volume, + * Node::unit_bending_energy * @param node_id @NodeIDStub */ - void update_bulk_node_geometry(Index node_id) - { + void update_bulk_node_geometry(Index node_id) { update_nn_distance_vectors(node_id); - Real area_sum = 0.; - vec3 face_normal_sum{0., 0., 0.}, local_curvature_vec{0., 0., 0.}; - vec3 face_normal; - indexing_number auto nn_number = (Index) nodes_.nn_ids(node_id).size(); - Index j_p_1; + Real area_sum = 0.; + vec3 face_normal_sum{0., 0., 0.}, local_curvature_vec{0., 0., 0.}; + vec3 face_normal; + indexing_number auto nn_number = (Index)nodes_[node_id].nn_ids.size(); + Index j_p_1; - Real face_area, face_normal_norm; + Real face_area, face_normal_norm; vec3 ljj_p_1, lij_p_1, lij; - Real cot_at_j, cot_at_j_p_1; + Real cot_at_j, cot_at_j_p_1; - for (Index j = 0; j::plus_one(j,nn_number); + for (Index j = 0; j < nn_number; ++j) { + // return j+1 element of ordered_nn_ids unless j has the last value then + // wrap around and return 0th element + j_p_1 = Neighbors::plus_one(j, nn_number); - lij = nodes_.nn_distances(node_id)[j]; - lij_p_1 = nodes_.nn_distances(node_id)[j_p_1]; + lij = nodes_[node_id].nn_distances[j]; + lij_p_1 = nodes_[node_id].nn_distances[j_p_1]; ljj_p_1 = lij_p_1 - lij; - cot_at_j = cot_between_vectors(lij, (-1)*ljj_p_1); - cot_at_j_p_1 = cot_between_vectors(lij_p_1, ljj_p_1); + cot_at_j = -TrgMath::cot_between_vectors(lij, ljj_p_1); + cot_at_j_p_1 = TrgMath::cot_between_vectors(lij_p_1, ljj_p_1); - - face_normal = lij.cross(lij_p_1); //nodes_.nn_distances(node_id)[j].cross(nodes_.nn_distances(node_id)[j_p_1]); + face_normal = + lij.cross(lij_p_1); // nodes_.nn_distances(node_id)[j].cross(nodes_.nn_distances(node_id)[j_p_1]); face_normal_norm = face_normal.norm(); #ifdef DEBUG - if(face_normal_norm < 1e-10) { - throw std::runtime_error("A triangle face is degenerate and Area sum is evaluating to "+std::to_string(face_normal_norm)+". This should not happen."); + if (face_normal_norm < 1e-10) { + throw std::runtime_error("A triangle face is degenerate and Area sum is evaluating to " + + std::to_string(face_normal_norm) + ". This should not happen."); } #endif - face_area = mixed_area(lij, lij_p_1, Real(0.5)*face_normal_norm, cot_at_j, cot_at_j_p_1); - area_sum += face_area; - face_normal_sum += face_area*face_normal/face_normal_norm; + face_area = mixed_area(lij, lij_p_1, Real(0.5) * face_normal_norm, cot_at_j, cot_at_j_p_1); + area_sum += face_area; + face_normal_sum += face_area * face_normal / face_normal_norm; - local_curvature_vec -= (cot_at_j_p_1*lij + cot_at_j*lij_p_1); + local_curvature_vec -= (cot_at_j_p_1 * lij + cot_at_j * lij_p_1); } - nodes_.set_area(node_id, area_sum); - nodes_.set_volume(node_id, nodes_[node_id].pos.dot(face_normal_sum)/((Real) 3.)); // 18=3*6: 6 has the aforementioned justification. 3 is part of the formula for the tetrahedron volume - nodes_.set_curvature_vec(node_id, -local_curvature_vec/((Real) 2.*area_sum)); // 2 is part of the formula to calculate the local curvature I just did not divide the vector inside the loop - nodes_.set_unit_bending_energy(node_id, local_curvature_vec.dot(local_curvature_vec)/((Real) 8.*area_sum)); // 8 is 2*4, where 4 is the square of the above two and the area in the denominator is what remains after canceling. 1/ comes from the pre-factor to bending energy - + nodes_[node_id].area = area_sum; + nodes_[node_id].volume = nodes_[node_id].pos.dot(face_normal_sum) / + (static_cast(3.)); // 18=3*6: 6 has the aforementioned justification. 3 is part + // of the formula for the tetrahedron volume + nodes_[node_id].curvature_vec = + -local_curvature_vec / + (static_cast(2.) * area_sum); // 2 is part of the formula to calculate the local curvature + // I just did not divide the vector inside the loop }; - - //! This function is deprecated! - /** - * @warning This function is here for legacy reasons! It is deprecated and will be removed in future minor updates. - * This function returns values of eqn.'s (82) & (84) from the paper [Gueguen et al. 2017](https://doi.org/10.1039/C7SM01272A). - * Every node has its associated Voronoi area, and each Voronoi area can be subdivided into parts that are - * associated with each triangle that the node is part of. This function returns that sub-area and the face normal - * of that triangle. - * @param lij distance between a node and its jth next neighbor - * @param lij_p_1 distance between a node and its j+1th next neighbor - * @return tuple of the area associated with the node inside the triangle (i,j,j+1) and the face normal of the triangle. - */ - [[deprecated("This function is deprecated and will be removed in a future release. It uses expensive function calls and is not recommended for use.")]] - static std::tuple> partial_voronoi_area_and_face_normal_of_node_in_a_triangle(vec3 const& lij, - vec3 const& lij_p_1) - { - Real area, face_normal_norm; - vec3 un_noremd_face_normal; - //precalculating this normal and its norm will be needed in area calc. If all triangles are oriented as - // right-handed, then this normal will point outwards - un_noremd_face_normal = lij.cross(lij_p_1); - face_normal_norm = un_noremd_face_normal.norm(); - area = mixed_area(lij, lij_p_1, face_normal_norm/2.); - return std::make_tuple(area, un_noremd_face_normal); - } - //! The node-associated area inside a triangle. /** - * This function is calculating the area associated with a node inside a triangle. As depicted in Figure tr1. A. - * This can be found in the description of the Triangulation class. + * This function is calculating the area associated with a node inside a + * triangle. As depicted in Figure tr1. A. This can be found in the + * description of the Triangulation class. * * Every node of the triangulation has its own associated area. - * In the simplest case, the area associated with a node is the area of the Voronoi cell of that node. Where the Voronoi tessellation of the surface is the dual lattice of the triangulation. - * This function returns the area associated with a node inside a triangle. If that triangle is not obtuse, then this area is simply - * the area of the Voronoi cell of the node that is inside the triangle. - * This Voronoi area becomes negative for obtuse triangles, and thus an exception has to be made. - * If the triangle has an obtuse angle at the node, then the area associated with the node inside the triangle is half of the triangle area, - * otherwise, it is the quarter of the triangle area. This procedure is described in detail by [Meyer et al. 2003](https://doi.org/10.1007/978-3-662-05105-4_2) - * @param lij Distance vector between the node and its next neighbor. (Next neighbors are ordered according to the right-hand rule. See Figure tr1. A and C) - * @param lij_p_1 Distance vector between the node and its next neighbor. (Next neighbors are ordered according to the right-hand rule) - * @param triangle_area area of the triangle i,j,j+1. See Area \f$A_{i,j,j+1}\f$ in Figure tr1. C. - * @param cot_at_j Cotangent of the angle at the node j, opposite to the edge i,j+1. See Figure tr1. B. - * @param cot_at_j_p_1 Cotangent of the angle at the node j+1, opposite to the edge i,j. See Figure tr1. B. - * @return Area associated with the node inside the triangle. See Area \f$A_{ij}\f$ in Figure tr1. C. - */ - static Real mixed_area(vec3 const& lij, vec3 const& lij_p_1, Real triangle_area, Real cot_at_j, Real cot_at_j_p_1){ - if ((cot_at_j>0.) && (cot_at_j_p_1>0.)) { // both angles at j and j+1 are smaller than 90 deg so the triangle can only be obtuse at the node - if (lij.dot(lij_p_1)>0) { // cos at i is positive i.e. angle at i is not obtuse - return (cot_at_j_p_1*lij.dot(lij) + cot_at_j*lij_p_1.dot(lij_p_1))/Real(8.); - } - else {//obtuse at node i. - return triangle_area/Real(2.); - } - } - else {//obtuse at node j or j+1. - return triangle_area/Real(4.); - } - - } - - //unit tested - //! This function is deprecated! - /** - * @warning This function is here for legacy reasons! It is deprecated and will be removed in future minor updates. - * Use the alternative mixed_area function instead! - * - * @param lij Distance vector between the node and its next neighbor. (Next neighbors are ordered according to the right-hand rule. See Figure tr1. A and C) - * @param lij_p_1 Distance vector between the node and its next neighbor. (Next neighbors are ordered according to the right-hand rule) - * @param triangle_area area of the triangle \f$i,j,j+1\f$. See Area \f$A_{i,j,j+1}\f$ in Figure tr1. C. - * @return Area associated with the node inside the triangle. See Area \f$A_{ij}\f$ in Figure tr1. C. + * In the simplest case, the area associated with a node is the area of the + * Voronoi cell of that node. Where the Voronoi tessellation of the surface is + * the dual lattice of the triangulation. This function returns the area + * associated with a node inside a triangle. If that triangle is not obtuse, + * then this area is simply the area of the Voronoi cell of the node that is + * inside the triangle. This Voronoi area becomes negative for obtuse + * triangles, and thus an exception has to be made. If the triangle has an + * obtuse angle at the node, then the area associated with the node inside the + * triangle is half of the triangle area, otherwise, it is the quarter of the + * triangle area. This procedure is described in detail by [Meyer et al. + * 2003](https://doi.org/10.1007/978-3-662-05105-4_2) + * @param lij Distance vector between the node and its next neighbor. (Next + * neighbors are ordered according to the right-hand rule. See Figure tr1. A + * and C) + * @param lij_p_1 Distance vector between the node and its next neighbor. + * (Next neighbors are ordered according to the right-hand rule) + * @param triangle_area area of the triangle i,j,j+1. See Area + * \f$A_{i,j,j+1}\f$ in Figure tr1. C. + * @param cot_at_j Cotangent of the angle at the node j, opposite to the edge + * i,j+1. See Figure tr1. B. + * @param cot_at_j_p_1 Cotangent of the angle at the node j+1, opposite to the + * edge i,j. See Figure tr1. B. + * @return Area associated with the node inside the triangle. See Area + * \f$A_{ij}\f$ in Figure tr1. C. */ - [[deprecated("This function is deprecated and will be removed in a future release. mixed_area, which does not take precalculated cotangents, performs expensive calculations! Use the alternative mixed_area function!")]] - static Real mixed_area(vec3 const& lij, vec3 const& lij_p_1, Real const& triangle_area) - { - vec3 ljj_p_1 = lij_p_1 - lij; - - Real cot_at_j = cot_between_vectors(lij, (-1)*ljj_p_1); - Real cot_at_j_p_1 = cot_between_vectors(lij_p_1, ljj_p_1); - if ((cot_at_j>Real(0.)) && (cot_at_j_p_1>Real(0.))) { // both angles at j and j+1 are smaller than 90 deg so the triangle can only be obtuse at the node - if (lij.dot(lij_p_1)>Real(0.)) { // cos at i is positive i.e. angle at i is not obtuse - return (cot_at_j_p_1*lij.dot(lij) + cot_at_j*lij_p_1.dot(lij_p_1))/8.; + static Real + mixed_area(const vec3 &lij, const vec3 &lij_p_1, Real triangle_area, Real cot_at_j, Real cot_at_j_p_1) { + if ((cot_at_j > 0.) && (cot_at_j_p_1 > 0.)) { // both angles at j and j+1 are smaller than 90 deg so the + // triangle can only be obtuse at the node + if (lij.dot(lij_p_1) > 0) { // cos at i is positive i.e. angle at i is not obtuse + return (cot_at_j_p_1 * lij.dot(lij) + cot_at_j * lij_p_1.dot(lij_p_1)) / Real(8.); + } else { // obtuse at node i. + return triangle_area / Real(2.); } - else {//obtuse at node i. - return triangle_area/Real(2.); - } - } - else {//obtuse at node j or j+1. - return triangle_area/Real(4.); + } else { // obtuse at node j or j+1. + return triangle_area / Real(4.); } - } - //! Aggregates and Returns the geometric quantities of the center node and its next neighbor nodes. + //! Aggregates and Returns the geometric quantities of the center node and its + //! next neighbor nodes. /** - * This function aggregates area volume and squared curvature integrated over the area for the two-ring of the - * associated with the node, using the stored quantities. - * Two-ring refers to the second concentric ring of the next-nearest-neighbor nodes surrounding the center node. + * This function aggregates area volume and squared curvature integrated over + * the area for the two-ring of the associated with the node, using the + * stored quantities. Two-ring refers to the second concentric ring of the + * next-nearest-neighbor nodes surrounding the center node. * * @param node_id - * @return Geometry object containing the geometric quantities of the center node and its next neighbor nodes. + * @return Geometry object containing the geometric quantities of the center + * node and its next neighbor nodes. */ - [[nodiscard]] Geometry get_two_ring_geometry(Index node_id) const - { - Geometry trg(nodes_[node_id]); - for (auto const& nn_id: nodes_[node_id].nn_ids) { + [[nodiscard]] Geometry get_two_ring_geometry(Index node_id) const { + Geometry trg(nodes_[node_id]); + for (const auto &nn_id : nodes_[node_id].nn_ids) { trg += nodes_[nn_id]; } return trg; } - //! Updates the geometric quantities of the center node and its next neighbor nodes. + //! Updates the geometric quantities of the center node and its next neighbor + //! nodes. /** - * This function calculates and updates the area volume and squared curvature integrated over the area for the two-ring of the - * associated with the node. - * Two-ring refers to the second concentric ring of the next-nearest-neighbor nodes surrounding the center node. + * This function calculates and updates the area volume and squared curvature + * integrated over the area for the two-ring of the associated with the node. + * Two-ring refers to the second concentric ring of the next-nearest-neighbor + * nodes surrounding the center node. * @param node_id @NodeIDStub */ - void update_two_ring_geometry(Index node_id) - { - if constexpr(triangulation_type == TriangulationType::SPHERICAL_TRIANGULATION) { - update_two_ring_geometry_on_a_boundary_free_triangulation(node_id); - } - else if constexpr(triangulation_type == TriangulationType::EXPERIMENTAL_PLANAR_TRIANGULATION) { - update_two_ring_geometry_on_a_boundary_triangulation(node_id); - } - else { - static_assert(triangulation_type == TriangulationType::SPHERICAL_TRIANGULATION || triangulation_type == TriangulationType::EXPERIMENTAL_PLANAR_TRIANGULATION, - "Triangulation type is not supported!"); + void update_two_ring_geometry(Index node_id) { + update_bulk_node_geometry(node_id); + for (auto nn_id : nodes_[node_id].nn_ids) { + update_bulk_node_geometry(nn_id); } }; // unit-tested //! Method for stretching or squeezing the initial triangulation shape. /** - * This method is most useful for transforming a spherical triangulation into an ellipse. + * This method is most useful for transforming a spherical triangulation into + * an ellipse. * - * The method stretches `x`, `y`, and `z` components of each node by a factor provided in the function argument. - * Triangulation's local and global geometric properties are updated after the stretch. + * The method stretches `x`, `y`, and `z` components of each node by a factor + * provided in the function argument. Triangulation's local and global + * geometric properties are updated after the stretch. * - * @note The stretch will happen with respect to the lab frame and not the mass center of the triangulation. - * Thus, to get the intended results, the stretch is most likely desired, - * when the triangulation is centered around the origin of the lab frame, This is the case right after the initiation. + * @note The stretch will happen with respect to the lab frame and not the + * mass center of the triangulation. Thus, to get the intended results, the + * stretch is most likely desired, when the triangulation is centered around + * the origin of the lab frame, This is the case right after the initiation. * - * @param x_stretch Stretching factor of the `x` component of the position of the triangulation nodes. - * @param y_stretch Stretching factor of the `y` component of the position of the triangulation nodes. - * @param z_stretch Stretching factor of the `z` component of the position of the triangulation nodes. + * @param x_stretch Stretching factor of the `x` component of the position of + * the triangulation nodes. + * @param y_stretch Stretching factor of the `y` component of the position of + * the triangulation nodes. + * @param z_stretch Stretching factor of the `z` component of the position of + * the triangulation nodes. */ - void scale_node_coordinates(Real x_stretch, Real y_stretch = 1, Real z_stretch = 1) - { + void scale_node_coordinates(Real x_stretch, Real y_stretch = 1, Real z_stretch = 1) { vec3 displ = {0, 0, 0}; - for (auto& node: nodes_.data) { - displ[0] = node.pos[0]*(x_stretch - 1); - displ[1] = node.pos[1]*(y_stretch - 1); - displ[2] = node.pos[2]*(z_stretch - 1); + for (auto &node : nodes_.data) { + displ[0] = node.pos[0] * (x_stretch - 1); + displ[1] = node.pos[1] * (y_stretch - 1); + displ[2] = node.pos[2] * (z_stretch - 1); move_node(node.id, displ); } } - //Todo unittest - //! Aggregates the geometric quantities of the diamond configuration of nodes associated with a bond flip. + // Todo unittest + //! Aggregates the geometric quantities of the diamond configuration of nodes + //! associated with a bond flip. /** *```txt - * State of the diamond, which contains all nodes that participate in a bond flip. - * before the flip + * State of the diamond, which contains all nodes that participate in a bond + * flip. before the flip * * common nn 1 * / \ @@ -881,26 +844,28 @@ class Triangulation * * @param node_id @NodeIDStub * @param nn_id @NodeIDStub - * @param cnn_0 Global id of the common next nearest neighbor of node_id and nn_id. - * @param cnn_1 Global id of the common next nearest neighbor of node_id and nn_id. - * @return Geometric quantities aggregated over the diamond configuration of nodes associated with a bond flip. + * @param cnn_0 Global id of the common next nearest neighbor of node_id and + * nn_id. + * @param cnn_1 Global id of the common next nearest neighbor of node_id and + * nn_id. + * @return Geometric quantities aggregated over the diamond configuration of + * nodes associated with a bond flip. */ - [[nodiscard]] Geometry calculate_diamond_geometry(Index node_id, Index nn_id, - Index cnn_0, Index cnn_1) const - { - Geometry diamond_geometry(nodes_[node_id]); + [[nodiscard]] Geometry calculate_diamond_geometry(Index node_id, Index nn_id, Index cnn_0, Index cnn_1) const { + Geometry diamond_geometry(nodes_[node_id]); diamond_geometry += nodes_[nn_id]; diamond_geometry += nodes_[cnn_0]; diamond_geometry += nodes_[cnn_1]; return diamond_geometry; }; - //Todo unittest - //! Calculates and updates the geometric quantities of the diamond configuration of nodes associated with a bond flip. + // Todo unittest + //! Calculates and updates the geometric quantities of the diamond + //! configuration of nodes associated with a bond flip. /** *```txt - * State of the diamond, which contains all nodes that participate in a bond flip. - * before the flip + * State of the diamond, which contains all nodes that participate in a bond + * flip. before the flip * * common nn 1 * / \ @@ -913,11 +878,12 @@ class Triangulation * * @param node_id @NodeIDStub * @param nn_id @NodeIDStub - * @param cnn_0 Global id of the common next nearest neighbor of node_id and nn_id. - * @param cnn_1 Global id of the common next nearest neighbor of node_id and nn_id. + * @param cnn_0 Global id of the common next nearest neighbor of node_id and + * nn_id. + * @param cnn_1 Global id of the common next nearest neighbor of node_id and + * nn_id. */ - void update_diamond_geometry(Index node_id, Index nn_id, Index cnn_0, Index cnn_1) - { + void update_diamond_geometry(Index node_id, Index nn_id, Index cnn_0, Index cnn_1) { update_bulk_node_geometry(node_id); update_bulk_node_geometry(nn_id); update_bulk_node_geometry(cnn_0); @@ -933,197 +899,121 @@ class Triangulation //! Returns a constant reference to the node with the given id. /** * Triangulation will never give non-constant access to a node. - * In order to change a node, one has to use the methods of the Triangulation class. - * This guarantees that the triangulation is always in a consistent state. + * In order to change a node, one has to use the methods of the Triangulation + * class. This guarantees that the triangulation is always in a consistent + * state. * @param idx @NodeIDStub * @return Constant reference to the node with the given id. */ - const Node& operator[](Index idx) const { return nodes_.data.at(idx); } + const Node &operator[](Index idx) const { return nodes_.data.at(idx); } //! Returns a constant reference to the underlying Nodes container. /** * @return Constant reference to the underlying Nodes container. */ - const Nodes& nodes() const { return nodes_; } + const Nodes &nodes() const { return nodes_; } //! Creates a JSON object with the data of the triangulation. /** - * Egg refers to the fact that the data can be used to recreate the triangulation using the Triangulation(Json const& nodes_input, Real verlet_radius_inp) constructor. - * @note The Triangulation(Json const& nodes_input, Real verlet_radius_inp) constructor is currently only implemented for a spherical Triangulation! + * Egg refers to the fact that the data can be used to recreate the + * triangulation using the Triangulation(Json const& nodes_input, Real + * verlet_radius_inp) constructor. + * @note The Triangulation(Json const& nodes_input, Real verlet_radius_inp) + * constructor is currently only implemented for a spherical Triangulation! * * @return Triangulation data in JSON format. */ [[nodiscard]] Json make_egg_data() const { return nodes_.make_data(); } - //! Information about the global geometric quantities of the triangulation, like global area, volume, and total unit bending energy. + //! Information about the global geometric quantities of the triangulation, + //! like global area, volume, and total unit bending energy. /** - * @return Geometric quantities of the triangulation aggregated over all nodes. + * @return Geometric quantities of the triangulation aggregated over all + * nodes. */ - [[nodiscard]] const Geometry& global_geometry() const { return global_geometry_; } + [[nodiscard]] const Geometry &global_geometry() const { return global_geometry_; } - //Todo unittest + // Todo unittest //! Initiates the global geometry of the triangulation. /** - * The global geometry is calculated by summing up the local geometries of all nodes. + * The global geometry is calculated by summing up the local geometries of all + * nodes. * */ - void make_global_geometry() - { - const Geometry empty{}; + void make_global_geometry() { + const Geometry empty{}; global_geometry_ = empty; - for (auto node_id: bulk_nodes_ids) { - update_bulk_node_geometry(node_id); - update_global_geometry(empty, Geometry(nodes_[node_id])); - } - for (auto node_id: boundary_nodes_ids_set_) { - update_boundary_node_geometry(node_id); - update_global_geometry(empty, Geometry(nodes_[node_id])); + for (const auto &node : nodes_) { + update_bulk_node_geometry(node.id); + update_global_geometry(empty, Geometry(nodes_[node.id])); } } - //! Returns the ids of all nodes that are not on the boundary. - /** - * Only works for triangulations that have a boundary. - * @return unique set of global ids of all nodes that are not on the boundary. - */ - std::set boundary_nodes_ids_set() const { - static_assert(triangulation_type == TriangulationType::EXPERIMENTAL_PLANAR_TRIANGULATION, "This function is only implemented for PLANAR_TRIANGULATION."); - return boundary_nodes_ids_set_; - } - - //Todo unittest - //! Updates the local geometry of a boundary node (for triangulation types that have a boundary). - /** - * @warning @linearTriangulationWarningStub - * Boundary nodes need to be treated differently, depending on the boundary conditions. - * Right now, flippy is only handling fixed boundary conditions, where all geometric quantities of boundary nodes are set to zero. - * @param node_id Id of a boundary node. - */ - void update_boundary_node_geometry([[maybe_unused]]Index node_id){ - update_nn_distance_vectors(node_id); - } - #ifdef TESTING_FLIPPY_TRIANGULATION_ndh6jclc0qnp274b -public: + public: #else -private: + private: #endif - Real R_initial; - Nodes nodes_; - std::vector bulk_nodes_ids; - Geometry global_geometry_; - Geometry pre_update_geometry, post_update_geometry; - mutable vec3 l0_, l1_; - Real verlet_radius{}; - Real verlet_radius_squared{}; - std::set boundary_nodes_ids_set_; - - //unit tested - void initiate_advanced_geometry(){ + Real R_initial; + Nodes nodes_; + Geometry global_geometry_; + Geometry pre_update_geometry, post_update_geometry; + Real verlet_radius{}; + Real verlet_radius_squared{}; + + // unit tested + void initiate_advanced_geometry() { initiate_distance_vectors(); make_global_geometry(); set_verlet_radius(verlet_radius); make_verlet_list(); } - void update_two_ring_geometry_on_a_boundary_free_triangulation(Index node_id){ - update_bulk_node_geometry(node_id); - for (auto nn_id: nodes_.nn_ids(node_id)) { - update_bulk_node_geometry(nn_id); - } - } - void update_two_ring_geometry_on_a_boundary_triangulation(Index node_id){ - if(boundary_nodes_ids_set_.contains(node_id)){ - update_boundary_node_geometry(node_id); - }else{ - update_bulk_node_geometry(node_id); - } - - for (auto nn_id: nodes_.nn_ids(node_id)) { - if(boundary_nodes_ids_set_.contains(nn_id)){ - update_boundary_node_geometry(nn_id); - }else{ - update_bulk_node_geometry(nn_id); - } - } - } - - //unit tested - void scale_all_nodes_to_R_init() - { - static_assert(triangulation_type==SPHERICAL_TRIANGULATION, "This function is only well defined for a spherical triangulation"); + // unit tested + void scale_all_nodes_to_R_init() { vec3 diff; vec3 mass_center = calculate_mass_center(); - for (Index i = 0; i &displacement_vector) { + node.pos += displacement_vector; + update_two_ring_geometry(node.id); } - //! This function calculates distance vectors from a node to all of its neighbors. - void update_nn_distance_vectors(Index node_id) - { + //! This function calculates distance vectors from a node to all of its + //! neighbors. + void update_nn_distance_vectors(Index node_id) { /** - * The directions of the distance vectors are (radiating outward) pointing from the node to neighbors. - * The function also preserves the order of neighbors. Meaning that the order of distance vectors is in the same + * The directions of the distance vectors are (radiating outward) pointing + * from the node to neighbors. The function also preserves the order of + * neighbors. Meaning that the order of distance vectors is in the same * order as the provided list of neighbor ids. * @param node_id Global id of a node. */ - for (Index i = 0; auto nn_id: nodes_.nn_ids(node_id)) { - nodes_.set_nn_distance(node_id, i, nodes_.pos(nn_id) - nodes_.pos(node_id)); + for (Index i = 0; auto nn_id : nodes_[node_id].nn_ids) { + nodes_.set_nn_distance(node_id, i, nodes_[nn_id].pos - nodes_[node_id].pos); ++i; } } - /** - * given a node `i` and its neighbor `j`, they will share two common neighbor nodes, `p` and `m`. - * This function finds the angles at `p` & `m` opposite of `i-j` link. - * This function implements the cot(alpha_ij) + cot(beta_ij) from fig. (6c) from [. - * The order of these neighbors does not matter for the correct sign of the angles. - * @param node_id @NodeIDStub - * @param nn_id @NNIDStub - * @param cnn_0 common neighbor node 0 - * @param cnn_1 common neighbor node 1 - * @return cot(alpha_ij_jm1) + cot(alpha_ij_jp1) - */ - Real cot_alphas_sum(Index node_id, Index nn_id, Index cnn_0, Index cnn_1) const - { - /** - * - */ - - l0_ = nodes_[node_id].pos - nodes_[cnn_0].pos; - l1_ = nodes_[nn_id].pos - nodes_[cnn_0].pos; - - Real cot_sum = cot_between_vectors(l0_, l1_); - l0_ = nodes_[node_id].pos - nodes_[cnn_1].pos; - l1_ = nodes_[nn_id].pos - nodes_[cnn_1].pos; - - cot_sum += cot_between_vectors(l0_, l1_); - return cot_sum; - } - - static Real cot_between_vectors(vec3 const& v1, vec3 const& v2) - { - return v1.dot(v2)/(v1.cross(v2).norm()); - }; - - //unit tested - [[nodiscard]] std::vector order_nn_ids(Index node_id) const - { - std::vector const& nn_ids = nodes_[node_id].nn_ids; - auto common_nn_ids = two_common_neighbours(node_id, nn_ids[0]); - std::vector ordered_nn_ids{common_nn_ids[0], nn_ids[0], common_nn_ids[1]}; + // unit tested + [[nodiscard]] std::vector order_nn_ids(Index node_id) const { + const std::vector &nn_ids = nodes_[node_id].nn_ids; + auto common_nn_ids = two_common_neighbours(node_id, nn_ids[0]); + std::vector ordered_nn_ids{common_nn_ids[0], nn_ids[0], common_nn_ids[1]}; Index nn_id; - for (Index i = 0; i<(Index) nodes_[node_id].nn_ids.size() - 3; ++i) { - nn_id = ordered_nn_ids[ordered_nn_ids.size() - 1]; + for (Index i = 0; i < (Index)nodes_[node_id].nn_ids.size() - 3; ++i) { + nn_id = ordered_nn_ids[ordered_nn_ids.size() - 1]; common_nn_ids = two_common_neighbours(node_id, nn_id); if (is_member(ordered_nn_ids, common_nn_ids[0])) { ordered_nn_ids.push_back(common_nn_ids[1]); - } - else { + } else { ordered_nn_ids.push_back(common_nn_ids[0]); } } @@ -1131,296 +1021,146 @@ class Triangulation return ordered_nn_ids; } - //unit tested - void orient_surface_of_a_sphere() - { + // unit tested + void orient_surface_of_a_sphere() { /** - * If the initial configuration is spherical, then this function can orient the surface, such - * that all right handed cross products will point outwards. - * And the nn_ids are ordered in a way that two successive nn_s j and j+1 will give a right handed - * cross product. I.e l_i_j x l_i_jp1 points outwards. + * If the initial configuration is spherical, then this function can orient + * the surface, such that all right handed cross products will point + * outwards. And the nn_ids are ordered in a way that two successive nn_s j + * and j+1 will give a right handed cross product. I.e l_i_j x l_i_jp1 + * points outwards. * - * This operation is not idempotent in a strict sense, since it guarantees that the nn_ids are in - * a correct cycle every time but not in the same strict order, they might differ by an even - * permutation. I.e. the ordering {1,2,3,4,5,6} and {6,1,2,3,4,5} are equivalent results. + * This operation is not idempotent in a strict sense, since it guarantees + * that the nn_ids are in a correct cycle every time but not in the same + * strict order, they might differ by an even permutation. I.e. the ordering + * {1,2,3,4,5,6} and {6,1,2,3,4,5} are equivalent results. */ - static_assert(triangulation_type==SPHERICAL_TRIANGULATION, "This function is only well defined for a spherical triangulation"); std::vector nn_ids_temp; - vec3 li0, li1; - vec3 mass_center = calculate_mass_center(); - for (Index i = 0; i li0, li1; + vec3 mass_center = calculate_mass_center(); + for (Index i = 0; i < nodes_.size(); ++i) { // ToDo modernize this loop nn_ids_temp = order_nn_ids(i); - li0 = nodes_[nn_ids_temp[0]].pos - nodes_[i].pos; - li1 = nodes_[nn_ids_temp[1]].pos - nodes_[i].pos; - if ((li0.cross(li1)).dot(nodes_[i].pos - mass_center)<0) { + li0 = nodes_[nn_ids_temp[0]].pos - nodes_[i].pos; + li1 = nodes_[nn_ids_temp[1]].pos - nodes_[i].pos; + if ((li0.cross(li1)).dot(nodes_[i].pos - mass_center) < 0) { std::reverse(nn_ids_temp.begin(), nn_ids_temp.end()); } - nodes_.set_nn_ids(i, nn_ids_temp); + nodes_[i].nn_ids = nn_ids_temp; } } - void orient_plane() - { - /** - * If the initial configuration is spherical, then this function can orient the surface, such - * that all right handed cross products will point outwards. - * And the nn_ids are ordered in a way that two successive nn_s j and j+1 will give a right handed - * cross product. I.e l_i_j x l_i_jp1 points outwards. - * - * This operation is not idempotent in a strict sense, since it guarantees that the nn_ids are in - * a correct cycle every time but not in the same strict order, they might differ by an even - * permutation. I.e. the ordering {1,2,3,4,5,6} and {6,1,2,3,4,5} are equivalent results. - */ - static_assert(triangulation_type == EXPERIMENTAL_PLANAR_TRIANGULATION, "This function is only well defined for a planar triangulation"); - std::vector nn_ids_temp; - vec3 li0, li1; - vec3 mass_center = calculate_mass_center(); - mass_center.z+=10; - for (Index node_id = 0; node_id < nodes_.size(); ++node_id) { //ToDo modernize this loop - if(boundary_nodes_ids_set_.contains(node_id)){ - continue; - } - nn_ids_temp = order_nn_ids(node_id); - li0 = nodes_[nn_ids_temp[0]].pos - nodes_[node_id].pos; - li1 = nodes_[nn_ids_temp[1]].pos - nodes_[node_id].pos; - if ((li0.cross(li1)).dot(nodes_[node_id].pos - mass_center) < 0) { - std::reverse(nn_ids_temp.begin(), nn_ids_temp.end()); - } - nodes_.set_nn_ids(node_id, nn_ids_temp); - } - - } - // Todo unittest - void initiate_distance_vectors() - { - for (Node& node: nodes_.data) { + void initiate_distance_vectors() { + for (Node &node : nodes_) { node.nn_distances.resize(node.nn_ids.size()); update_nn_distance_vectors(node.id); } } - //unit tested - std::vector common_neighbours(Index node_id_0, Index node_id_1) const - { - std::vector res; - res.reserve(2); - std::vector nn_ids0 = nodes_[node_id_0].nn_ids; - std::vector nn_ids1 = nodes_[node_id_1].nn_ids; - std::sort(nn_ids0.begin(), nn_ids0.end()); - std::sort(nn_ids1.begin(), nn_ids1.end()); - std::set_intersection(nn_ids0.begin(), nn_ids0.end(), - nn_ids1.begin(), nn_ids1.end(), - std::back_inserter(res)); - return res; - } - - //unit tested - std::array two_common_neighbours(Index node_id_0, Index node_id_1) const - { - static const Index vln = static_cast(VERY_LARGE_NUMBER_); - std::array res{vln, vln}; - //todo safe remove const& in the loop - for (auto res_p = res.begin(); auto const& n0_nn_id: nodes_[node_id_0].nn_ids) { - if (res_p==res.end()) { break; } - else { - if (is_member(nodes_[node_id_1].nn_ids, n0_nn_id)) { - *res_p = n0_nn_id; - ++res_p; - } + bool has_two_common_neighbours(Index node_id_0, Index node_id_1) const { + int nn_count = 0; + for (Index nn_of_n0 : nodes_[node_id_0].nn_ids) { + for (Index nn_of_n1 : nodes_[node_id_1].nn_ids) { + if (nn_of_n0 == nn_of_n1) { ++nn_count; } } + if (nn_count > 2) { return false; } } - return res; + return nn_count == 2; } - std::array fast_two_common_neighbours(Index node_id_0, Index node_id_1) const - { - - Index j = nodes_.find_nns_loc_idx(node_id_0, node_id_1); - indexing_number auto nn_number = (Index)nodes_.nn_ids(node_id_0).size(); - Index j_p_1 = Neighbors::plus_one(j, nn_number); - Index j_m_1 = Neighbors::plus_one(j, nn_number); - std::array res{nodes_.nn_id(node_id_0,j_m_1), - nodes_.nn_id(node_id_0,j_p_1)}; - return res; - } - - std::array two_common_neighbour_positions(Index node_id_0, Index node_id_1) const - { - static const Index vln = static_cast(VERY_LARGE_NUMBER_); + // unit tested + [[nodiscard]] std::array two_common_neighbours(Index node_id_0, Index node_id_1) const { + static const Index vln = std::numeric_limits::max(); std::array res{vln, vln}; - short counter = 0; - for (auto const& n0_nn_id: nodes_[node_id_0].nn_ids) { - if (counter==2) { break; } - else { - auto pos = std::find(nodes_[node_id_1].nn_ids.begin(), nodes_[node_id_1].nn_ids.end(), n0_nn_id); - if (pos!=nodes_[node_id_1].nn_ids.end()) { - res[counter] = (Index) (pos - nodes_[node_id_1].nn_ids.begin()); - ++counter; - } + // todo safe remove const& in the loop + for (auto *res_p = res.begin(); const auto &n0_nn_id : nodes_[node_id_0].nn_ids) { + if (res_p == res.end()) { break; } + if (is_member(nodes_[node_id_1].nn_ids, n0_nn_id)) { + *res_p = n0_nn_id; + ++res_p; } } return res; } - //Todo unittest - //unit tested - Neighbors previous_and_next_neighbour_local_ids(Index node_id, Index nn_id) const - { + // Todo unittest + // unit tested + [[nodiscard]] Neighbors previous_and_next_neighbour_local_ids(Index node_id, Index nn_id) const { /** * j+1 * / \ * i-----j * \ / * j-1 - * given i and j, this function finds the local ids of j-1 and j+1 nodes and returns them IN THAT ORDER; - * This function relies on the fact that i & j are neighbors and will throw a nasty runtime error if they are + * given i and j, this function finds the local ids of j-1 and j+1 + * nodes and returns them IN THAT ORDER; This function relies on the fact + * that i & j are neighbors and will throw a nasty runtime error if they are * not */ - auto const& nn_ids_view = nodes_[node_id].nn_ids; - auto const local_nn_id = (Index) (std::find(nn_ids_view.begin(), nn_ids_view.end(), nn_id) - - nn_ids_view.begin()); - auto const nn_number = (Index) nn_ids_view.size(); - return {.j_m_1= Neighbors::minus_one(local_nn_id, nn_number), - .j_p_1 = Neighbors::plus_one(local_nn_id, nn_number)}; + const auto &nn_ids_view = nodes_[node_id].nn_ids; + const auto local_nn_id = + (Index)(std::find(nn_ids_view.begin(), nn_ids_view.end(), nn_id) - nn_ids_view.begin()); + const auto nn_number = (Index)nn_ids_view.size(); + return {.j_m_1 = Neighbors::minus_one(local_nn_id, nn_number), + .j_p_1 = Neighbors::plus_one(local_nn_id, nn_number)}; } - //unit tested - Neighbors previous_and_next_neighbour_global_ids(Index node_id, Index nn_id) const - { + public: + // unit tested + Neighbors previous_and_next_neighbour_global_ids(Index node_id, Index nn_id) const { /** * j+1 * / \ * i-----j * \ / * j-1 - * given i and j, this function finds the global ids of j-1 and j+1 nodes and returns them IN THAT ORDER; - * This function relies on the fact that i & j are neighbors and will throw a nasty runtime error if they are + * given i and j, this function finds the global ids of j-1 and j+1 + * nodes and returns them IN THAT ORDER; This function relies on the fact + * that i & j are neighbors and will throw a nasty runtime error if they are * not */ - auto const& nn_ids_view = nodes_[node_id].nn_ids; - Neighbors neighbors = previous_and_next_neighbour_local_ids(node_id, nn_id); - return {.j_m_1=nn_ids_view[neighbors.j_m_1], .j_p_1=nn_ids_view[neighbors.j_p_1]}; + const auto &nn_ids_view = nodes_[node_id].nn_ids; + Neighbors neighbors = previous_and_next_neighbour_local_ids(node_id, nn_id); + return {.j_m_1 = nn_ids_view[neighbors.j_m_1], .j_p_1 = nn_ids_view[neighbors.j_p_1]}; } - void update_global_geometry(Geometry const& lg_old, Geometry const& lg_new) - { - global_geometry_ += lg_new - lg_old; - } + private: + void update_global_geometry(const Geometry &lg_old, const Geometry &lg_new) { global_geometry_ += lg_new - lg_old; } // Todo unittest - void delete_connection_between_nodes_of_old_edge(Index old_node_id0, Index old_node_id1) - { + void delete_connection_between_nodes_of_old_edge(Index old_node_id0, Index old_node_id1) { nodes_[old_node_id0].pop_nn(old_node_id1); nodes_[old_node_id1].pop_nn(old_node_id0); } - static Nodes triangulate_sphere_nodes(Index n_iter){ - std::unordered_map> simpleNodeData = - fp::implementation::IcosahedronSubTriangulation::make_corner_nodes(); - fp::implementation::IcosahedronSubTriangulation::make_face_nodes(simpleNodeData, n_iter); - - fp::indexing_number auto nNewNodesOnEdge = static_cast(n_iter - 1); - fp::indexing_number auto nBulk = static_cast(nNewNodesOnEdge*(nNewNodesOnEdge+1)/2); - fp::indexing_number auto nNodes = static_cast(fp::implementation::IcosahedronSubTriangulation::N_ICOSA_NODEs - + fp::implementation::IcosahedronSubTriangulation::N_ICOSA_EDGEs*n_iter - + fp::implementation::IcosahedronSubTriangulation::N_ICOSA_FACEs*nBulk); - std::vector> nodeData(nNodes); - for(Index id; auto & nodeEl :simpleNodeData){ - id = nodeEl.second.id; - nodeData[id].id = nodeEl.second.id; + static Nodes triangulate_sphere_nodes(Index n_iter) { + std::unordered_map> simpleNodeData = + fp::implementation::IcosahedronSubTriangulation::make_corner_nodes(); + fp::implementation::IcosahedronSubTriangulation::make_face_nodes(simpleNodeData, n_iter); + + Index nNewNodesOnEdge = static_cast(n_iter - 1); + Index nBulk = static_cast(nNewNodesOnEdge * (nNewNodesOnEdge + 1) / 2); + Index nNodes = + static_cast(fp::implementation::IcosahedronSubTriangulation::N_ICOSA_NODEs + + fp::implementation::IcosahedronSubTriangulation::N_ICOSA_EDGEs * n_iter + + fp::implementation::IcosahedronSubTriangulation::N_ICOSA_FACEs * nBulk); + std::vector nodeData(nNodes); + for (Index id; auto &nodeEl : simpleNodeData) { + id = nodeEl.second.id; + nodeData[id].id = nodeEl.second.id; nodeData[id].pos = nodeEl.second.pos; - for(auto const& hash: nodeEl.second.nn_hashes){ + for (const auto &hash : nodeEl.second.nn_hashes) { nodeData[id].nn_ids.push_back(simpleNodeData[hash].id); } } - return Nodes(nodeData); + return Nodes(nodeData); } - void triangulate_planar_nodes(Index n_length, Index n_width, Real length, Real width){ - Index N_nodes = n_length*n_width; - fp::implementation::PlanarTriangulation triang(n_length, n_width); -// Nodes bulk_nodes; - Node node{}; - node.curvature_vec=fp::vec3{0.,0.,0.}; - for(Index node_id=0; node_id{ - triang.id_to_j(node_id)*length/n_length, - triang.id_to_i(node_id)*width/n_width, - 0. - }; - - node.nn_ids = triang.nn_ids[node_id]; - nodes_.data.push_back(node); - if(triang.is_bulk[node_id]){bulk_nodes_ids.push_back(node_id);} - else{boundary_nodes_ids_set_.insert(node_id);} - } - } - void all_nodes_are_bulk(){ - for(auto const& node: nodes_){ - bulk_nodes_ids.push_back(node.id); - } + [[nodiscard]] bool nodes_have_too_few_bonds_for_donation(Index node_id, Index nn_id) { + return (nodes_[node_id].nn_ids.size() <= BOND_DONATION_CUTOFF) || + (nodes_[nn_id].nn_ids.size() <= BOND_DONATION_CUTOFF); } - - - //unit tested - BondFlipData flip_bulk_bond(Index node_id, Index nn_id, - Real min_bond_length_square, - Real max_bond_length_square) { - BondFlipData bfd{}; - if (nodes_.nn_ids(node_id).size() > BOND_DONATION_CUTOFF) { - if (nodes_.nn_ids(nn_id).size() > BOND_DONATION_CUTOFF) { - Neighbors common_nns = previous_and_next_neighbour_global_ids(node_id, nn_id); - Real bond_length_square = (nodes_.pos(common_nns.j_m_1) - nodes_.pos(common_nns.j_p_1)).norm_square(); - if ((bond_length_square < max_bond_length_square) && (bond_length_square > min_bond_length_square)) { - if (common_neighbours(node_id, nn_id).size() == 2) { - pre_update_geometry = calculate_diamond_geometry(node_id, nn_id, common_nns.j_m_1, - common_nns.j_p_1); - bfd = flip_bond_unchecked(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1); - if (common_neighbours(bfd.common_nn_0, bfd.common_nn_1).size() == 2) { - update_diamond_geometry(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1); - post_update_geometry = calculate_diamond_geometry(node_id, nn_id, common_nns.j_m_1, - common_nns.j_p_1); - update_global_geometry(pre_update_geometry, post_update_geometry); - } else { - flip_bond_unchecked(bfd.common_nn_0, bfd.common_nn_1, nn_id, node_id); - bfd.flipped = false; - } - } - } - } - } - return bfd; - } - - ///// EXPERIMENTAL SUPPORT ///// - BondFlipData - flip_bond_in_quadrilateral(Index node_id, Index nn_id, const Neighbors &common_nns, - Real min_bond_length_square, Real max_bond_length_square) { - BondFlipData bfd{}; - Real bond_length_square = (nodes_.pos(common_nns.j_m_1) - nodes_.pos(common_nns.j_p_1)).norm_square(); - if ((bond_length_squaremin_bond_length_square)) { - if (common_neighbours(node_id, nn_id).size() == 2) { - pre_update_geometry = calculate_diamond_geometry(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1); - bfd = flip_bond_unchecked(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1); - if (common_neighbours(bfd.common_nn_0, bfd.common_nn_1).size() == 2) { - update_diamond_geometry(node_id, nn_id, common_nns.j_m_1, common_nns.j_p_1); - post_update_geometry = calculate_diamond_geometry(node_id, nn_id, common_nns.j_m_1, - common_nns.j_p_1); - update_global_geometry(pre_update_geometry, post_update_geometry); - } - else { - flip_bond_unchecked(bfd.common_nn_0, bfd.common_nn_1, nn_id, node_id); - bfd.flipped = false; - } - } - } - return bfd; - } - }; -} -#endif //FLIPPY_TRIANGULATION_HPP - +} // namespace fp +#endif // FLIPPY_TRIANGULATION_HPP diff --git a/flippy/Triangulator.hpp b/flippy/Triangulator.hpp index 7370c43..0f9dc62 100755 --- a/flippy/Triangulator.hpp +++ b/flippy/Triangulator.hpp @@ -6,55 +6,42 @@ * The classes and methods implemented here are responsible for creating the intitial triangulations. */ -#include -#include -#include -#include #include "custom_concepts.hpp" #include "vec3.hpp" +#include +#include +#include +#include +#include - -/** - * @GlobalsStub - * @{ - */ -//! The M_PI macro is not defined on for all compilers, so it is defined here (if a definition does not already exist). -#ifndef M_PI -#define M_PI 3.14159265358979323846 /* pi */ -#endif /**@}*/ /** * The API stability of the functions in the implementation namespace is not guaranteed! - * Functions that are part of the implementation namespace are not part of the public facing API and are not intended fot the end-user. - * Since flippy is a headers only library this could not be hidden in source files. + * Functions that are part of the implementation namespace are not part of the public facing API and are not intended + * fot the end-user. Since flippy is a headers only library this could not be hidden in source files. */ -namespace fp::implementation{ +namespace fp::implementation { //! @private -template -struct SimpleNodeData{ - std::string hash{}; - Index id{}; - vec3 pos{}; - std::unordered_set nn_hashes{}; +template struct SimpleNodeData { + std::string hash{}; + Index id{}; + vec3 pos{}; + std::unordered_set nn_hashes{}; }; //! @private -template -class IcosahedronSubTriangulation -{ -public: - static std::string hash_node(Index c) - { +template class IcosahedronSubTriangulation { + public: + static std::string hash_node(Index c) { /** * returns a unique hash for a corner node, which is just the id of that corner node. */ return std::to_string(c); } - static std::string hash_node(Index c0, Index c1, Index n) - { + static std::string hash_node(Index c0, Index c1, Index n) { /** * returns a unique hash for a node on one of the sides of the initial triangle. * This hash is determined by the (ordered) corner nodes of the initial edge and the index of the node. @@ -64,16 +51,15 @@ class IcosahedronSubTriangulation return std::to_string(a) + "_" + std::to_string(b) + "_" + std::to_string(n); } - static std::string hash_node(Index c0, Index c1, Index c2, Index i, Index j) - { + static std::string hash_node(Index c0, Index c1, Index c2, Index i, Index j) { /** * returns a unique hash for a node in the bulk of the subtriangulation. */ std::vector cv{c0, c1, c2}; std::sort(cv.begin(), cv.end()); - return std::to_string(cv[0]) + "_" + std::to_string(cv[1]) + "_" + std::to_string(cv[2]) - + "_" + std::to_string(i) + "_" + std::to_string(j); + return std::to_string(cv[0]) + "_" + std::to_string(cv[1]) + "_" + std::to_string(cv[2]) + "_" + + std::to_string(i) + "_" + std::to_string(j); } static vec3 r_S1(Real R, Real t, Real f) { @@ -85,396 +71,383 @@ class IcosahedronSubTriangulation static constexpr int N_ICOSA_EDGEs = 30; static constexpr int N_ICOSA_NODEs = 12; - static constexpr std::array FACE_IDs{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; + static constexpr std::array FACE_IDs{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; static constexpr std::array NODE_IDs{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; + static constexpr std::array, N_ICOSA_FACEs> FACE_CORNER_NODES_ = { - std::array{NODE_IDs[0], NODE_IDs[5], NODE_IDs[1]}, - std::array{NODE_IDs[0], NODE_IDs[1], NODE_IDs[2]}, - std::array{NODE_IDs[0], NODE_IDs[2], NODE_IDs[3]}, - std::array{NODE_IDs[0], NODE_IDs[3], NODE_IDs[4]}, - std::array{NODE_IDs[0], NODE_IDs[4], NODE_IDs[5]}, - std::array{NODE_IDs[10], NODE_IDs[5], NODE_IDs[4]}, - std::array{NODE_IDs[10], NODE_IDs[6], NODE_IDs[5]}, - std::array{NODE_IDs[6], NODE_IDs[1], NODE_IDs[5]}, - std::array{NODE_IDs[6], NODE_IDs[7], NODE_IDs[1]}, - std::array{NODE_IDs[7], NODE_IDs[2], NODE_IDs[1]}, - std::array{NODE_IDs[7], NODE_IDs[8], NODE_IDs[2]}, - std::array{NODE_IDs[8], NODE_IDs[3], NODE_IDs[2]}, - std::array{NODE_IDs[8], NODE_IDs[9], NODE_IDs[3]}, - std::array{NODE_IDs[9], NODE_IDs[4], NODE_IDs[3]}, - std::array{NODE_IDs[9], NODE_IDs[10], NODE_IDs[4]}, - std::array{NODE_IDs[11], NODE_IDs[10], NODE_IDs[9]}, - std::array{NODE_IDs[11], NODE_IDs[6], NODE_IDs[10]}, - std::array{NODE_IDs[11], NODE_IDs[7], NODE_IDs[6]}, - std::array{NODE_IDs[11], NODE_IDs[8], NODE_IDs[7]}, - std::array{NODE_IDs[11], NODE_IDs[9], NODE_IDs[8]} - }; + std::array{NODE_IDs[0], NODE_IDs[5], NODE_IDs[1]}, + std::array{NODE_IDs[0], NODE_IDs[1], NODE_IDs[2]}, + std::array{NODE_IDs[0], NODE_IDs[2], NODE_IDs[3]}, + std::array{NODE_IDs[0], NODE_IDs[3], NODE_IDs[4]}, + std::array{NODE_IDs[0], NODE_IDs[4], NODE_IDs[5]}, + std::array{NODE_IDs[10], NODE_IDs[5], NODE_IDs[4]}, + std::array{NODE_IDs[10], NODE_IDs[6], NODE_IDs[5]}, + std::array{NODE_IDs[6], NODE_IDs[1], NODE_IDs[5]}, + std::array{NODE_IDs[6], NODE_IDs[7], NODE_IDs[1]}, + std::array{NODE_IDs[7], NODE_IDs[2], NODE_IDs[1]}, + std::array{NODE_IDs[7], NODE_IDs[8], NODE_IDs[2]}, + std::array{NODE_IDs[8], NODE_IDs[3], NODE_IDs[2]}, + std::array{NODE_IDs[8], NODE_IDs[9], NODE_IDs[3]}, + std::array{NODE_IDs[9], NODE_IDs[4], NODE_IDs[3]}, + std::array{NODE_IDs[9], NODE_IDs[10], NODE_IDs[4]}, + std::array{NODE_IDs[11], NODE_IDs[10], NODE_IDs[9]}, + std::array{NODE_IDs[11], NODE_IDs[6], NODE_IDs[10]}, + std::array{NODE_IDs[11], NODE_IDs[7], NODE_IDs[6]}, + std::array{NODE_IDs[11], NODE_IDs[8], NODE_IDs[7]}, + std::array{NODE_IDs[11], NODE_IDs[9], NODE_IDs[8]}}; static constexpr const std::array, N_ICOSA_FACEs> FACE_CORNER_NODES = { - std::array{0, 5, 1}, - std::array{0, 1, 2}, - std::array{0, 2, 3}, - std::array{0, 3, 4}, - std::array{0, 4, 5}, - std::array{10, 5, 4}, - std::array{10, 6, 5}, - std::array{6, 1, 5}, - std::array{6, 7, 1}, - std::array{7, 2, 1}, - std::array{7, 8, 2}, - std::array{8, 3, 2}, - std::array{8, 9, 3}, - std::array{9, 4, 3}, - std::array{9, 10, 4}, - std::array{11, 10, 9}, - std::array{11, 6, 10}, - std::array{11, 7, 6}, - std::array{11, 8, 7}, - std::array{11, 9, 8} - }; + std::array{0, 5, 1}, std::array{0, 1, 2}, std::array{0, 2, 3}, + std::array{0, 3, 4}, std::array{0, 4, 5}, std::array{10, 5, 4}, + std::array{10, 6, 5}, std::array{6, 1, 5}, std::array{6, 7, 1}, + std::array{7, 2, 1}, std::array{7, 8, 2}, std::array{8, 3, 2}, + std::array{8, 9, 3}, std::array{9, 4, 3}, std::array{9, 10, 4}, + std::array{11, 10, 9}, std::array{11, 6, 10}, std::array{11, 7, 6}, + std::array{11, 8, 7}, std::array{11, 9, 8}}; - static std::unordered_map> make_corner_nodes() - { + static std::unordered_map> make_corner_nodes() { - Real R = 1.; + Real R = 1.; std::unordered_map> base_nodes(N_ICOSA_NODEs); - base_nodes[hash_node(0)] = {.hash=hash_node(0), .id=0, .pos=r_S1(R, 0., 0.)}; + base_nodes[hash_node(0)] = {.hash = hash_node(0), .id = 0, .pos = r_S1(R, 0., 0.)}; std::string hash; hash.reserve(2); - for (Index i = 1; i<6; ++i) { - hash = hash_node(i); - base_nodes[hash] = { - .hash=hash, - .id=i, - .pos=r_S1(R, - static_cast(M_PI/2. - std::atan(0.5)), - static_cast(2.*M_PI*(static_cast(i) - 1.)/5.))}; + for (Index i = 1; i < 6; ++i) { + hash = hash_node(i); + base_nodes[hash] = {.hash = hash, + .id = i, + .pos = r_S1(R, + static_cast(PI / 2. - std::atan(0.5)), + static_cast(2. * PI * (static_cast(i) - 1.) / 5.))}; } - for (Index i = 6; i(M_PI/2. + std::atan(0.5)), - static_cast(2.*M_PI*(static_cast(i) - 6.5)/5.))}; + for (Index i = 6; i < N_ICOSA_NODEs - 1; ++i) { + hash = hash_node(i); + base_nodes[hash] = {.hash = hash, + .id = i, + .pos = r_S1(R, + static_cast(PI / 2. + std::atan(0.5)), + static_cast(2. * PI * (static_cast(i) - 6.5) / 5.))}; } - hash = hash_node(N_ICOSA_NODEs - 1); - base_nodes[hash] = { - .hash=hash, - .id=static_cast(N_ICOSA_NODEs - 1), - .pos=r_S1(R, static_cast(M_PI), static_cast(0.))}; + hash = hash_node(N_ICOSA_NODEs - 1); + base_nodes[hash] = {.hash = hash, .id = static_cast(N_ICOSA_NODEs - 1), .pos = r_S1(R, PI, 0._r)}; return base_nodes; } - enum TriangleRegion - { - TOP_CORNER, BOTTOM_LEFT_CORNER, BOTTOM_RIGHT_CORNER, LEFT_EDGE, BOTTOM_EDGE, DIAGONAL_EDGE, BULK + enum TriangleRegion { + TOP_CORNER, + BOTTOM_LEFT_CORNER, + BOTTOM_RIGHT_CORNER, + LEFT_EDGE, + BOTTOM_EDGE, + DIAGONAL_EDGE, + BULK }; - static TriangleRegion get_region(Index i, Index j, Index sizeMinOne) - { - if (i==0) { return TOP_CORNER; } - else if (j==0 && i==sizeMinOne) { return BOTTOM_LEFT_CORNER; } - else if (j==sizeMinOne && i==sizeMinOne) { return BOTTOM_RIGHT_CORNER; } - else if (j==0) { return LEFT_EDGE; } - else if (i==sizeMinOne) { return BOTTOM_EDGE; } - else if (i==j) { return DIAGONAL_EDGE; } - else { return BULK; } + static TriangleRegion get_region(Index i, Index j, Index sizeMinOne) { + if (i == 0) { + return TOP_CORNER; + } else if (j == 0 && i == sizeMinOne) { + return BOTTOM_LEFT_CORNER; + } else if (j == sizeMinOne && i == sizeMinOne) { + return BOTTOM_RIGHT_CORNER; + } else if (j == 0) { + return LEFT_EDGE; + } else if (i == sizeMinOne) { + return BOTTOM_EDGE; + } else if (i == j) { + return DIAGONAL_EDGE; + } else { + return BULK; + } } - static std::string hash_any(Index c0, Index c1, Index c2, Index i, Index j, Index maxIdx) - { + static std::string hash_any(Index c0, Index c1, Index c2, Index i, Index j, Index maxIdx) { switch (get_region(i, j, maxIdx)) { - case TOP_CORNER:return hash_node(c0); - case BOTTOM_LEFT_CORNER:return hash_node(c1); - case BOTTOM_RIGHT_CORNER:return hash_node(c2); - case LEFT_EDGE:return hash_node(c0, c1, i); - case BOTTOM_EDGE:return hash_node(c1, c2, j); - case DIAGONAL_EDGE:return hash_node(c0, c2, j); - case BULK:return hash_node(c0, c1, c2, i, j); - default: - std::cerr<<"something went wrong! provided indices i: " - < neighbour_hash_vec(Index c0, Index c1, Index c2, Index i, Index j, Index maxIdx) - { + static std::vector neighbour_hash_vec(Index c0, Index c1, Index c2, Index i, Index j, Index maxIdx) { std::vector neighbour_hash; neighbour_hash.reserve(6); switch (get_region(i, j, maxIdx)) { - case TOP_CORNER:neighbour_hash.push_back(hash_any(c0, c1, c2, 1, 0, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, 1, 1, maxIdx)); - return neighbour_hash; - - case BOTTOM_LEFT_CORNER:neighbour_hash.push_back(hash_any(c0, c1, c2, i, j + 1, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j, maxIdx)); - return neighbour_hash; - - case BOTTOM_RIGHT_CORNER:neighbour_hash.push_back(hash_any(c0, c1, c2, i, j - 1, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j - 1, maxIdx)); - return neighbour_hash; - - case LEFT_EDGE:neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i, j + 1, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j + 1, maxIdx)); - return neighbour_hash; - - case BOTTOM_EDGE:neighbour_hash.push_back(hash_any(c0, c1, c2, i, j - 1, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j - 1, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i, j + 1, maxIdx)); - return neighbour_hash; - - case DIAGONAL_EDGE:neighbour_hash.push_back(hash_any(c0, c1, c2, i, j - 1, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j - 1, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j + 1, maxIdx)); - return neighbour_hash; - - case BULK:neighbour_hash.push_back(hash_any(c0, c1, c2, i, j - 1, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j - 1, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i - 1, j, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i, j + 1, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j + 1, maxIdx)); - neighbour_hash.push_back(hash_any(c0, c1, c2, i + 1, j, maxIdx)); - return neighbour_hash; - default: - std::cerr<<"something went wrong! provided indices i: " - <(k)/static_cast(n); - Real denominator = static_cast(l + std::sqrt(4.*R*R - l*l)/std::tan(fr*2.*asin(l/(2.*R)))); - return static_cast(2.)*R*R/denominator; + } else { + Real fr = static_cast(k) / static_cast(n); + Real denominator = + static_cast(l + std::sqrt(4. * R * R - l * l) / std::tan(fr * 2. * asin(l / (2. * R)))); + return static_cast(2.) * R * R / denominator; } } - static vec3 get_pos(vec3 const& p0, vec3 const& p1, vec3 const& p2, Index i, Index j, Index maxIdx) - { -/** - * get the position o a node in the sub triangulation of a face of the initial icosahedron. - * ```{.txt} - * p0 - * /___\ - * e1 /__\/__\ e2 - * / \ / \ / \ - * p1 --------- p3 - * e3 - * ``` - */ + static vec3 + get_pos(const vec3 &p0, const vec3 &p1, const vec3 &p2, Index i, Index j, Index maxIdx) { + /** + * get the position o a node in the sub triangulation of a face of the initial icosahedron. + * ```{.txt} + * p0 + * /___\ + * e1 /__\/__\ e2 + * / \ / \ / \ + * p1 --------- p3 + * e3 + * ``` + */ vec3 e1 = p1 - p0; vec3 e2 = p2 - p0; - auto e = e1.norm(); - Real wi = even_angular_distance_length(e, i, maxIdx); + auto e = e1.norm(); + Real wi = even_angular_distance_length(e, i, maxIdx); e1.normalize(); e2.normalize(); vec3 li{}; - Real li_norm{0}; - vec3 interm_1 = p0 + wi*e1; + Real li_norm{0}; + vec3 interm_1 = p0 + wi * e1; interm_1.normalize(); - if (i!=0) { - vec3 interm_2 = p0 + wi*e2; + if (i != 0) { + vec3 interm_2 = p0 + wi * e2; interm_2.normalize(); - li = interm_2 - interm_1; + li = interm_2 - interm_1; li_norm = li.norm(); li.normalize(); } Real wj = even_angular_distance_length(li_norm, j, i); - return interm_1 + wj*li; + return interm_1 + wj * li; } - static std::tuple get_sorted_face_nodes(std::array face) - { + static std::tuple get_sorted_face_nodes(std::array face) { std::sort(face.begin(), face.end()); - return {static_cast(face[0]), - static_cast(face[1]), - static_cast(face[2])}; + return {static_cast(face[0]), static_cast(face[1]), static_cast(face[2])}; } - static void make_face_nodes(std::unordered_map>& node_cache, Index nIter) - { + static void make_face_nodes(std::unordered_map> &node_cache, Index nIter) { vec3 p0, p1, p2, pos; - Index nEdge = nIter + 2;// total Number of nodes on an edge - Index maxIdx = nIter + 1;// max value i or j can have + Index nEdge = nIter + 2; // total Number of nodes on an edge + Index maxIdx = nIter + 1; // max value i or j can have std::string hash; hash.reserve(10); std::string c0_h, c1_h, c2_h; - for (auto face: FACE_CORNER_NODES) { - auto[c0, c1, c2] = get_sorted_face_nodes(face); - c0_h = hash_node(c0); - c1_h = hash_node(c1); - c2_h = hash_node(c2); - p0 = node_cache[c0_h].pos; - p1 = node_cache[c1_h].pos; - p2 = node_cache[c2_h].pos; - for (Index i = 0; i neighbour_hashes = neighbour_hash_vec(c0, c1, c2, i, j, maxIdx); - for (auto const& neighbour_hash: neighbour_hashes) { + for (const auto &neighbour_hash : neighbour_hashes) { node_cache[hash].nn_hashes.insert(neighbour_hash); node_cache[neighbour_hash].nn_hashes.insert(hash); } } } - for (Index idx = 0; auto& nodeEl: node_cache) { + for (Index idx = 0; auto &nodeEl : node_cache) { nodeEl.second.id = idx; ++idx; } - } - } }; //! @private -template -class PlanarTriangulation{ +template class PlanarTriangulation { Index n_length; -public: + + public: std::vector> nn_ids; - std::vector is_bulk; - [[nodiscard]] Index ij_to_id(Index i, Index j){return i*n_length+j;} - [[nodiscard]] Index id_to_i(Index id){return id/n_length;} - [[nodiscard]] Index id_to_j(Index id){return id%n_length;} + std::vector is_bulk; + [[nodiscard]] Index ij_to_id(Index i, Index j) { return i * n_length + j; } + [[nodiscard]] Index id_to_i(Index id) { return id / n_length; } + [[nodiscard]] Index id_to_j(Index id) { return id % n_length; } // TL T TR // L R // BL B BR - [[nodiscard]] Index TL(Index id){ return ij_to_id(id_to_i(id)-1, id_to_j(id)-1);} - [[nodiscard]] Index T (Index id){ return ij_to_id(id_to_i(id)-1, id_to_j(id) );} - [[nodiscard]] Index TR(Index id){ return ij_to_id(id_to_i(id)-1, id_to_j(id)+1);} - [[nodiscard]] Index L(Index id){ return ij_to_id(id_to_i(id) , id_to_j(id)-1);} - [[nodiscard]] Index R(Index id){ return ij_to_id(id_to_i(id) , id_to_j(id)+1);} - [[nodiscard]] Index BL(Index id){ return ij_to_id(id_to_i(id)+1, id_to_j(id)-1);} - [[nodiscard]] Index B (Index id){ return ij_to_id(id_to_i(id)+1, id_to_j(id) );} - [[nodiscard]] Index BR(Index id){ return ij_to_id(id_to_i(id)+1, id_to_j(id)+1);} - - [[nodiscard]] std::vector bulk_odd_j_neighbor_ids(Index id){ - return { B(id), R(id), TR(id), T(id), TL(id), L(id) }; + [[nodiscard]] Index TL(Index id) { return ij_to_id(id_to_i(id) - 1, id_to_j(id) - 1); } + [[nodiscard]] Index T(Index id) { return ij_to_id(id_to_i(id) - 1, id_to_j(id)); } + [[nodiscard]] Index TR(Index id) { return ij_to_id(id_to_i(id) - 1, id_to_j(id) + 1); } + [[nodiscard]] Index L(Index id) { return ij_to_id(id_to_i(id), id_to_j(id) - 1); } + [[nodiscard]] Index R(Index id) { return ij_to_id(id_to_i(id), id_to_j(id) + 1); } + [[nodiscard]] Index BL(Index id) { return ij_to_id(id_to_i(id) + 1, id_to_j(id) - 1); } + [[nodiscard]] Index B(Index id) { return ij_to_id(id_to_i(id) + 1, id_to_j(id)); } + [[nodiscard]] Index BR(Index id) { return ij_to_id(id_to_i(id) + 1, id_to_j(id) + 1); } + + [[nodiscard]] std::vector bulk_odd_j_neighbor_ids(Index id) { + return {B(id), R(id), TR(id), T(id), TL(id), L(id)}; } - [[nodiscard]] std::vector bulk_even_j_neighbor_ids(Index id){ - return { T(id), L(id), BL(id), B(id), BR(id), R(id) }; + [[nodiscard]] std::vector bulk_even_j_neighbor_ids(Index id) { + return {T(id), L(id), BL(id), B(id), BR(id), R(id)}; } - [[nodiscard]] std::vector top_boundary_odd_j_neighbor_ids(Index id){ - return { L(id), B(id), R(id) }; - } + [[nodiscard]] std::vector top_boundary_odd_j_neighbor_ids(Index id) { return {L(id), B(id), R(id)}; } - [[nodiscard]] std::vector top_boundary_even_j_neighbor_ids(Index id){ - return { L(id), BL(id), B(id), BR(id), R(id) }; + [[nodiscard]] std::vector top_boundary_even_j_neighbor_ids(Index id) { + return {L(id), BL(id), B(id), BR(id), R(id)}; } - [[nodiscard]] std::vector bottom_boundary_odd_j_neighbor_ids(Index id){ - return { R(id), TR(id), T(id), TL(id), L(id) }; + [[nodiscard]] std::vector bottom_boundary_odd_j_neighbor_ids(Index id) { + return {R(id), TR(id), T(id), TL(id), L(id)}; } - [[nodiscard]] std::vector bottom_boundary_even_j_neighbor_ids(Index id){ - return { T(id), L(id), R(id) }; - } + [[nodiscard]] std::vector bottom_boundary_even_j_neighbor_ids(Index id) { return {T(id), L(id), R(id)}; } - [[nodiscard]] std::vector left_boundary_neighbor_ids(Index id){ - return { T(id), B(id), BR(id), R(id)}; - } + [[nodiscard]] std::vector left_boundary_neighbor_ids(Index id) { return {T(id), B(id), BR(id), R(id)}; } - [[nodiscard]] std::vector right_boundary_odd_j_neighbor_ids(Index id){ - return { T(id), TL(id), L(id), B(id) }; + [[nodiscard]] std::vector right_boundary_odd_j_neighbor_ids(Index id) { + return {T(id), TL(id), L(id), B(id)}; } - [[nodiscard]] std::vector right_boundary_even_j_neighbor_ids(Index id){ - return { T(id), L(id), BL(id), B(id) }; + [[nodiscard]] std::vector right_boundary_even_j_neighbor_ids(Index id) { + return {T(id), L(id), BL(id), B(id)}; } - PlanarTriangulation(Index n_length_inp, Index n_width):n_length(n_length_inp){ - Index N_nodes = n_length*n_width; + PlanarTriangulation(Index n_length_inp, Index n_width) : n_length(n_length_inp) { + Index N_nodes = n_length * n_width; nn_ids.resize(N_nodes); - is_bulk.resize(N_nodes,false); + is_bulk.resize(N_nodes, false); // populate_bulk - for(Index i=1; i{B(0), BR(0), R(0)}; // populate bottom left corner - Index bottom_left_id = ij_to_id(n_width-1,0); - nn_ids[bottom_left_id] = std::vector{R(bottom_left_id), T(bottom_left_id)}; //Todo this bond will never flip + Index bottom_left_id = ij_to_id(n_width - 1, 0); + nn_ids[bottom_left_id] = + std::vector{R(bottom_left_id), T(bottom_left_id)}; // Todo this bond will never flip // populate top and bottom right corner - Index top_right_id = n_length-1; - Index bottom_right_id = N_nodes-1; - if((n_length-1)%2==0){ - nn_ids[top_right_id] = {L(top_right_id), BL(top_right_id), B(top_right_id)}; - nn_ids[bottom_right_id] = {T(bottom_right_id), L(bottom_right_id)};// Todo this bond will never flip - }else{ - nn_ids[top_right_id] = {L(top_right_id), /*BL(top_right_id),*/ B(top_right_id)}; // Todo this bond will never flip - nn_ids[bottom_right_id] = {T(bottom_right_id), TL(bottom_right_id), L(bottom_right_id),};// Todo this bond will never flip + Index top_right_id = n_length - 1; + Index bottom_right_id = N_nodes - 1; + if ((n_length - 1) % 2 == 0) { + nn_ids[top_right_id] = {L(top_right_id), BL(top_right_id), B(top_right_id)}; + nn_ids[bottom_right_id] = {T(bottom_right_id), L(bottom_right_id)}; // Todo this bond will never flip + } else { + nn_ids[top_right_id] = {L(top_right_id), + /*BL(top_right_id),*/ B(top_right_id)}; // Todo this bond will never flip + nn_ids[bottom_right_id] = { + T(bottom_right_id), + TL(bottom_right_id), + L(bottom_right_id), + }; // Todo this bond will never flip } - - } }; -} -#endif //FLIPPY_TRIANGULATOR_HPP +} // namespace fp::implementation +#endif // FLIPPY_TRIANGULATOR_HPP diff --git a/flippy/custom_concepts.hpp b/flippy/custom_concepts.hpp index 7e2b899..47d62a8 100755 --- a/flippy/custom_concepts.hpp +++ b/flippy/custom_concepts.hpp @@ -1,15 +1,18 @@ #ifndef FLIPPY_CUSTOM_CONCEPTS_HPP #define FLIPPY_CUSTOM_CONCEPTS_HPP #include +#include +#include /** * @file * @brief This file contains the concepts that are costomly defined for the flippy class templates. */ -namespace fp{ +namespace fp { /** * @defgroup myConcepts Special concepts * @brief definitions of concepts that restrict template parameters in flippy's classes. - * @note For more information on what `c++` concepts are in general see [this](https://en.cppreference.com/w/cpp/language/constraints) cpp reference page. + * @note For more information on what `c++` concepts are in general see + * [this](https://en.cppreference.com/w/cpp/language/constraints) cpp reference page. *@{ */ @@ -21,16 +24,55 @@ namespace fp{ * In particular some apple clang versions that are technically `c++20` capable. * @tparam T This concept requires the type T to be a floating point number. */ -template concept floating_point_number = std::is_floating_point_v; +template +concept floating_point_number = std::is_floating_point_v; /** * @brief Here we implement the concepts of a positive integer number that is used throughout the code for indexing. * * @tparam T This concept requires the type T to be unsigned and an integral type. */ -template concept indexing_number = std::is_unsigned_v && std::is_integral_v; +template +concept indexing_number = std::is_unsigned_v && std::is_integral_v; /**@}*/ -} +using Index = std::size_t; +using Real = double; -#endif //FLIPPY_CUSTOM_CONCEPTS_HPP +namespace implementation { +template +concept Beginable = requires(C c) { std::begin(c); }; +template +concept Endable = requires(C c) { std::end(c); }; +template +concept NeqableBeginAndEnd = requires(C c) { + { std::begin(c) != std::end(c) } -> std::same_as; +}; +template +concept BeginIncrementable = requires(C c) { std::begin(c)++; }; +template +concept BeginDerefable = requires(C c) { *std::begin(c); }; +template +concept BeginDerefToVoid = requires(C c) { + { *std::begin(c) } -> std::same_as; +}; +template +concept BeginAndEndCopyConstructibleAndDestructible = requires(C c) { + requires std::destructible && std::destructible && + std::copy_constructible && std::copy_constructible; +}; + +} // namespace implementation +template +concept Container = + implementation::Beginable && implementation::Endable && implementation::NeqableBeginAndEnd && + implementation::BeginIncrementable && implementation::BeginDerefable && + !implementation::BeginDerefToVoid && implementation::BeginAndEndCopyConstructibleAndDestructible; + +[[maybe_unused]] static Real operator""_r(long double value) { return static_cast(value); } +[[maybe_unused]] static Real operator""_r(unsigned long long value) { return static_cast(value); } + +static constexpr auto PI = static_cast(std::numbers::pi); +} // namespace fp + +#endif // FLIPPY_CUSTOM_CONCEPTS_HPP diff --git a/flippy/external/json.hpp b/flippy/external/json.hpp old mode 100755 new mode 100644 index cb27e05..82d69f7 --- a/flippy/external/json.hpp +++ b/flippy/external/json.hpp @@ -1,31 +1,10 @@ -/* - __ _____ _____ _____ - __| | __| | | | JSON for Modern C++ -| | |__ | | | | | | version 3.10.5 -|_____|_____|_____|_|___| https://github.com/nlohmann/json - -Licensed under the MIT License . -SPDX-License-Identifier: MIT -Copyright (c) 2013-2022 Niels Lohmann . - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT /****************************************************************************\ * Note on documentation: The source files contain links to the online * @@ -33,16 +12,12 @@ SOFTWARE. * contains the most recent documentation and should also be applicable to * * previous versions; documentation for deprecated functions is not * * removed, but marked deprecated. See "Generate documentation" section in * - * file doc/README.md. * + * file docs/README.md. * \****************************************************************************/ #ifndef INCLUDE_NLOHMANN_JSON_HPP_ #define INCLUDE_NLOHMANN_JSON_HPP_ -#define NLOHMANN_JSON_VERSION_MAJOR 3 -#define NLOHMANN_JSON_VERSION_MINOR 10 -#define NLOHMANN_JSON_VERSION_PATCH 5 - #include // all_of, find, for_each #include // nullptr_t, ptrdiff_t, size_t #include // hash, less @@ -52,18 +27,145 @@ SOFTWARE. #endif // JSON_NO_IO #include // random_access_iterator_tag #include // unique_ptr -#include // accumulate #include // string, stoi, to_string #include // declval, forward, move, pair, swap #include // vector // #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + -#include #include +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// This file contains all macro definitions affecting or depending on the ABI + +#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK + #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH) + #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 12 || NLOHMANN_JSON_VERSION_PATCH != 0 + #warning "Already included a different version of the library!" + #endif + #endif +#endif + +#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_MINOR 12 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_PATCH 0 // NOLINT(modernize-macro-to-enum) + +#ifndef JSON_DIAGNOSTICS + #define JSON_DIAGNOSTICS 0 +#endif + +#ifndef JSON_DIAGNOSTIC_POSITIONS + #define JSON_DIAGNOSTIC_POSITIONS 0 +#endif + +#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0 +#endif + +#if JSON_DIAGNOSTICS + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag +#else + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS +#endif + +#if JSON_DIAGNOSTIC_POSITIONS + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS _dp +#else + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS +#endif + +#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp +#else + #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION + #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0 +#endif + +// Construct the namespace ABI tags component +#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b, c) json_abi ## a ## b ## c +#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b, c) \ + NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b, c) + +#define NLOHMANN_JSON_ABI_TAGS \ + NLOHMANN_JSON_ABI_TAGS_CONCAT( \ + NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \ + NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON, \ + NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS) + +// Construct the namespace version component +#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \ + _v ## major ## _ ## minor ## _ ## patch +#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \ + NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) + +#if NLOHMANN_JSON_NAMESPACE_NO_VERSION +#define NLOHMANN_JSON_NAMESPACE_VERSION +#else +#define NLOHMANN_JSON_NAMESPACE_VERSION \ + NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \ + NLOHMANN_JSON_VERSION_MINOR, \ + NLOHMANN_JSON_VERSION_PATCH) +#endif + +// Combine namespace components +#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b +#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \ + NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) + +#ifndef NLOHMANN_JSON_NAMESPACE +#define NLOHMANN_JSON_NAMESPACE \ + nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \ + NLOHMANN_JSON_ABI_TAGS, \ + NLOHMANN_JSON_NAMESPACE_VERSION) +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN +#define NLOHMANN_JSON_NAMESPACE_BEGIN \ + namespace nlohmann \ + { \ + inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \ + NLOHMANN_JSON_ABI_TAGS, \ + NLOHMANN_JSON_NAMESPACE_VERSION) \ + { +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_END +#define NLOHMANN_JSON_NAMESPACE_END \ + } /* namespace (inline namespace) NOLINT(readability/namespace) */ \ + } // namespace nlohmann +#endif + // #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + #include // transform @@ -71,6 +173,9 @@ SOFTWARE. #include // forward_list #include // inserter, front_inserter, end #include // map +#ifdef JSON_HAS_CPP_17 + #include // optional +#endif #include // string #include // tuple, make_tuple #include // is_arithmetic, is_same, is_enum, underlying_type, is_convertible @@ -79,14 +184,34 @@ SOFTWARE. #include // valarray // #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + +#include // nullptr_t #include // exception +#if JSON_DIAGNOSTICS + #include // accumulate +#endif #include // runtime_error #include // to_string #include // vector // #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + #include // array @@ -94,102 +219,130 @@ SOFTWARE. #include // uint8_t #include // string -namespace nlohmann -{ +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // declval, pair +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN namespace detail { -/////////////////////////// -// JSON type enumeration // -/////////////////////////// -/*! -@brief the JSON type enumeration +template struct make_void +{ + using type = void; +}; +template using void_t = typename make_void::type; -This enumeration collects the different JSON types. It is internally used to -distinguish the stored values, and the functions @ref basic_json::is_null(), -@ref basic_json::is_object(), @ref basic_json::is_array(), -@ref basic_json::is_string(), @ref basic_json::is_boolean(), -@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), -@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), -@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and -@ref basic_json::is_structured() rely on it. +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END -@note There are three enumeration entries (number_integer, number_unsigned, and -number_float), because the library distinguishes these three types for numbers: -@ref basic_json::number_unsigned_t is used for unsigned integers, -@ref basic_json::number_integer_t is used for signed integers, and -@ref basic_json::number_float_t is used for floating-point numbers or to -approximate integers which do not fit in the limits of their respective type. -@sa see @ref basic_json::basic_json(const value_t value_type) -- create a JSON -value with the default value for a given type +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ -@since version 1.0.0 -*/ -enum class value_t : std::uint8_t +// https://en.cppreference.com/w/cpp/experimental/is_detected +struct nonesuch { - null, ///< null value - object, ///< object (unordered set of name/value pairs) - array, ///< array (ordered collection of values) - string, ///< string value - boolean, ///< boolean value - number_integer, ///< number value (signed integer) - number_unsigned, ///< number value (unsigned integer) - number_float, ///< number value (floating-point) - binary, ///< binary array (ordered collection of bytes) - discarded ///< discarded by the parser callback function + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(nonesuch const&) = delete; + nonesuch(nonesuch const&&) = delete; + void operator=(nonesuch const&) = delete; + void operator=(nonesuch&&) = delete; }; -/*! -@brief comparison operator for JSON types - -Returns an ordering that is similar to Python: -- order: null < boolean < number < object < array < string < binary -- furthermore, each type is not smaller than itself -- discarded values are not comparable -- binary is represented as a b"" string in python and directly comparable to a - string; however, making a binary array directly comparable with a string would - be surprising behavior in a JSON file. +template class Op, + class... Args> +struct detector +{ + using value_t = std::false_type; + using type = Default; +}; -@since version 1.0.0 -*/ -inline bool operator<(const value_t lhs, const value_t rhs) noexcept +template class Op, class... Args> +struct detector>, Op, Args...> { - static constexpr std::array order = {{ - 0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */, - 1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */, - 6 /* binary */ - } - }; + using value_t = std::true_type; + using type = Op; +}; - const auto l_index = static_cast(lhs); - const auto r_index = static_cast(rhs); - return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index]; -} -} // namespace detail -} // namespace nlohmann +template class Op, class... Args> +using is_detected = typename detector::value_t; -// #include +template class Op, class... Args> +struct is_detected_lazy : is_detected { }; + +template class Op, class... Args> +using detected_t = typename detector::type; + +template class Op, class... Args> +using detected_or = detector; +template class Op, class... Args> +using detected_or_t = typename detected_or::type; -#include -// #include +template class Op, class... Args> +using is_detected_exact = std::is_same>; + +template class Op, class... Args> +using is_detected_convertible = + std::is_convertible, To>; +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END -#include // declval, pair // #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-FileCopyrightText: 2016 - 2021 Evan Nemerson +// SPDX-License-Identifier: MIT + /* Hedley - https://nemequ.github.io/hedley * Created by Evan Nemerson - * - * To the extent possible under law, the author(s) have dedicated all - * copyright and related and neighboring rights to this software to - * the public domain worldwide. This software is distributed without - * any warranty. - * - * For details, see . - * SPDX-License-Identifier: CC0-1.0 */ #if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 15) @@ -2223,116 +2376,53 @@ JSON_HEDLEY_DIAGNOSTIC_POP #endif /* !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < X) */ -// #include - -#include +// This file contains all internal macro definitions (except those affecting ABI) +// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them -// #include +// #include -namespace nlohmann -{ -namespace detail -{ -template struct make_void -{ - using type = void; -}; -template using void_t = typename make_void::type; -} // namespace detail -} // namespace nlohmann +// exclude unsupported compilers +#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) + #if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #endif +#endif +// C++ language standard detection +// if the user manually specified the used c++ version this is skipped +#if !defined(JSON_HAS_CPP_23) && !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11) + #if (defined(__cplusplus) && __cplusplus > 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG > 202002L) + #define JSON_HAS_CPP_23 + #define JSON_HAS_CPP_20 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus > 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG > 201703L) + #define JSON_HAS_CPP_20 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus > 201402L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus > 201103L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 + #endif + // the cpp 11 flag is always specified because it is the minimal required version + #define JSON_HAS_CPP_11 +#endif -// https://en.cppreference.com/w/cpp/experimental/is_detected -namespace nlohmann -{ -namespace detail -{ -struct nonesuch -{ - nonesuch() = delete; - ~nonesuch() = delete; - nonesuch(nonesuch const&) = delete; - nonesuch(nonesuch const&&) = delete; - void operator=(nonesuch const&) = delete; - void operator=(nonesuch&&) = delete; -}; - -template class Op, - class... Args> -struct detector -{ - using value_t = std::false_type; - using type = Default; -}; - -template class Op, class... Args> -struct detector>, Op, Args...> -{ - using value_t = std::true_type; - using type = Op; -}; - -template class Op, class... Args> -using is_detected = typename detector::value_t; - -template class Op, class... Args> -struct is_detected_lazy : is_detected { }; - -template class Op, class... Args> -using detected_t = typename detector::type; - -template class Op, class... Args> -using detected_or = detector; - -template class Op, class... Args> -using detected_or_t = typename detected_or::type; - -template class Op, class... Args> -using is_detected_exact = std::is_same>; - -template class Op, class... Args> -using is_detected_convertible = - std::is_convertible, To>; -} // namespace detail -} // namespace nlohmann - - -// This file contains all internal macro definitions -// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them - -// exclude unsupported compilers -#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) - #if defined(__clang__) - #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 - #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" - #endif - #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) - #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 - #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" - #endif - #endif -#endif - -// C++ language standard detection -// if the user manually specified the used c++ version this is skipped -#if !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11) - #if (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L) - #define JSON_HAS_CPP_20 - #define JSON_HAS_CPP_17 - #define JSON_HAS_CPP_14 - #elif (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 - #define JSON_HAS_CPP_17 - #define JSON_HAS_CPP_14 - #elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) - #define JSON_HAS_CPP_14 - #endif - // the cpp 11 flag is always specified because it is the minimal required version - #define JSON_HAS_CPP_11 -#endif +#ifdef __has_include + #if __has_include() + #include + #endif +#endif #if !defined(JSON_HAS_FILESYSTEM) && !defined(JSON_HAS_EXPERIMENTAL_FILESYSTEM) #ifdef JSON_HAS_CPP_17 @@ -2367,7 +2457,7 @@ using is_detected_convertible = #endif // no filesystem support before MSVC 19.14: https://en.cppreference.com/w/cpp/compiler_support - #if defined(_MSC_VER) && _MSC_VER < 1940 + #if defined(_MSC_VER) && _MSC_VER < 1914 #undef JSON_HAS_FILESYSTEM #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM #endif @@ -2394,6 +2484,46 @@ using is_detected_convertible = #define JSON_HAS_FILESYSTEM 0 #endif +#ifndef JSON_HAS_THREE_WAY_COMPARISON + #if defined(__cpp_impl_three_way_comparison) && __cpp_impl_three_way_comparison >= 201907L \ + && defined(__cpp_lib_three_way_comparison) && __cpp_lib_three_way_comparison >= 201907L + #define JSON_HAS_THREE_WAY_COMPARISON 1 + #else + #define JSON_HAS_THREE_WAY_COMPARISON 0 + #endif +#endif + +#ifndef JSON_HAS_RANGES + // ranges header shipping in GCC 11.1.0 (released 2021-04-27) has syntax error + #if defined(__GLIBCXX__) && __GLIBCXX__ == 20210427 + #define JSON_HAS_RANGES 0 + #elif defined(__cpp_lib_ranges) + #define JSON_HAS_RANGES 1 + #else + #define JSON_HAS_RANGES 0 + #endif +#endif + +#ifndef JSON_HAS_STATIC_RTTI + #if !defined(_HAS_STATIC_RTTI) || _HAS_STATIC_RTTI != 0 + #define JSON_HAS_STATIC_RTTI 1 + #else + #define JSON_HAS_STATIC_RTTI 0 + #endif +#endif + +#ifdef JSON_HAS_CPP_17 + #define JSON_INLINE_VARIABLE inline +#else + #define JSON_INLINE_VARIABLE +#endif + +#if JSON_HEDLEY_HAS_ATTRIBUTE(no_unique_address) + #define JSON_NO_UNIQUE_ADDRESS [[no_unique_address]] +#else + #define JSON_NO_UNIQUE_ADDRESS +#endif + // disable documentation warnings on clang #if defined(__clang__) #pragma clang diagnostic push @@ -2457,7 +2587,9 @@ using is_detected_convertible = template \ inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ { \ + /* NOLINTNEXTLINE(modernize-type-traits) we use C++11 */ \ static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + /* NOLINTNEXTLINE(modernize-avoid-c-arrays) we don't want to depend on */ \ static const std::pair m[] = __VA_ARGS__; \ auto it = std::find_if(std::begin(m), std::end(m), \ [e](const std::pair& ej_pair) -> bool \ @@ -2469,7 +2601,9 @@ using is_detected_convertible = template \ inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ { \ + /* NOLINTNEXTLINE(modernize-type-traits) we use C++11 */ \ static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + /* NOLINTNEXTLINE(modernize-avoid-c-arrays) we don't want to depend on */ \ static const std::pair m[] = __VA_ARGS__; \ auto it = std::find_if(std::begin(m), std::end(m), \ [&j](const std::pair& ej_pair) -> bool \ @@ -2489,12 +2623,13 @@ using is_detected_convertible = class NumberUnsignedType, class NumberFloatType, \ template class AllocatorType, \ template class JSONSerializer, \ - class BinaryType> + class BinaryType, \ + class CustomBaseClass> #define NLOHMANN_BASIC_JSON_TPL \ basic_json + AllocatorType, JSONSerializer, BinaryType, CustomBaseClass> // Macros to simplify conversion from/to types @@ -2631,28 +2766,146 @@ using is_detected_convertible = #define NLOHMANN_JSON_TO(v1) nlohmann_json_j[#v1] = nlohmann_json_t.v1; #define NLOHMANN_JSON_FROM(v1) nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1); +#define NLOHMANN_JSON_FROM_WITH_DEFAULT(v1) nlohmann_json_t.v1 = !nlohmann_json_j.is_null() ? nlohmann_json_j.value(#v1, nlohmann_json_default_obj.v1) : nlohmann_json_default_obj.v1; /*! @brief macro @def NLOHMANN_DEFINE_TYPE_INTRUSIVE @since version 3.9.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/ */ #define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...) \ - friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ - friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT +@since version 3.11.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(Type, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE +@since version 3.11.3 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE(Type, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } /*! @brief macro @def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE @since version 3.9.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_non_intrusive/ */ #define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \ - inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ - inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT +@since version 3.11.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_non_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Type, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE +@since version 3.11.3 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_non_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE(Type, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE(Type, BaseType, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_WITH_DEFAULT +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_WITH_DEFAULT(Type, BaseType, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_ONLY_SERIALIZE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_ONLY_SERIALIZE(Type, BaseType, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE(Type, BaseType, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_WITH_DEFAULT +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Type, BaseType, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE(Type, BaseType, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } // inspired from https://stackoverflow.com/a/26745591 -// allows to call any std function as if (e.g. with begin): +// allows calling any std function as if (e.g., with begin): // using std::begin; begin(x); // // it allows using the detected idiom to retrieve the return type @@ -2699,13 +2952,132 @@ using is_detected_convertible = #define JSON_EXPLICIT explicit #endif -#ifndef JSON_DIAGNOSTICS - #define JSON_DIAGNOSTICS 0 +#ifndef JSON_DISABLE_ENUM_SERIALIZATION + #define JSON_DISABLE_ENUM_SERIALIZATION 0 +#endif + +#ifndef JSON_USE_GLOBAL_UDLS + #define JSON_USE_GLOBAL_UDLS 1 +#endif + +#if JSON_HAS_THREE_WAY_COMPARISON + #include // partial_ordering +#endif + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/////////////////////////// +// JSON type enumeration // +/////////////////////////// + +/*! +@brief the JSON type enumeration + +This enumeration collects the different JSON types. It is internally used to +distinguish the stored values, and the functions @ref basic_json::is_null(), +@ref basic_json::is_object(), @ref basic_json::is_array(), +@ref basic_json::is_string(), @ref basic_json::is_boolean(), +@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), +@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), +@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and +@ref basic_json::is_structured() rely on it. + +@note There are three enumeration entries (number_integer, number_unsigned, and +number_float), because the library distinguishes these three types for numbers: +@ref basic_json::number_unsigned_t is used for unsigned integers, +@ref basic_json::number_integer_t is used for signed integers, and +@ref basic_json::number_float_t is used for floating-point numbers or to +approximate integers which do not fit in the limits of their respective type. + +@sa see @ref basic_json::basic_json(const value_t value_type) -- create a JSON +value with the default value for a given type + +@since version 1.0.0 +*/ +enum class value_t : std::uint8_t +{ + null, ///< null value + object, ///< object (unordered set of name/value pairs) + array, ///< array (ordered collection of values) + string, ///< string value + boolean, ///< boolean value + number_integer, ///< number value (signed integer) + number_unsigned, ///< number value (unsigned integer) + number_float, ///< number value (floating-point) + binary, ///< binary array (ordered collection of bytes) + discarded ///< discarded by the parser callback function +}; + +/*! +@brief comparison operator for JSON types + +Returns an ordering that is similar to Python: +- order: null < boolean < number < object < array < string < binary +- furthermore, each type is not smaller than itself +- discarded values are not comparable +- binary is represented as a b"" string in python and directly comparable to a + string; however, making a binary array directly comparable with a string would + be surprising behavior in a JSON file. + +@since version 1.0.0 +*/ +#if JSON_HAS_THREE_WAY_COMPARISON + inline std::partial_ordering operator<=>(const value_t lhs, const value_t rhs) noexcept // *NOPAD* +#else + inline bool operator<(const value_t lhs, const value_t rhs) noexcept #endif +{ + static constexpr std::array order = {{ + 0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */, + 1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */, + 6 /* binary */ + } + }; + const auto l_index = static_cast(lhs); + const auto r_index = static_cast(rhs); +#if JSON_HAS_THREE_WAY_COMPARISON + if (l_index < order.size() && r_index < order.size()) + { + return order[l_index] <=> order[r_index]; // *NOPAD* + } + return std::partial_ordering::unordered; +#else + return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index]; +#endif +} -namespace nlohmann +// GCC selects the built-in operator< over an operator rewritten from +// a user-defined spaceship operator +// Clang, MSVC, and ICC select the rewritten candidate +// (see GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105200) +#if JSON_HAS_THREE_WAY_COMPARISON && defined(__GNUC__) +inline bool operator<(const value_t lhs, const value_t rhs) noexcept { + return std::is_lt(lhs <=> rhs); // *NOPAD* +} +#endif + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN namespace detail { @@ -2722,12 +3094,13 @@ enforced with an assertion.** @since version 2.0.0 */ -inline void replace_substring(std::string& s, const std::string& f, - const std::string& t) +template +inline void replace_substring(StringType& s, const StringType& f, + const StringType& t) { JSON_ASSERT(!f.empty()); for (auto pos = s.find(f); // find first occurrence of f - pos != std::string::npos; // make sure f was found + pos != StringType::npos; // make sure f was found s.replace(pos, f.size(), t), // replace with t, and pos = s.find(f, pos + t.size())) // find next occurrence of f {} @@ -2740,10 +3113,11 @@ inline void replace_substring(std::string& s, const std::string& f, * * Note the order of escaping "~" to "~0" and "/" to "~1" is important. */ -inline std::string escape(std::string s) +template +inline StringType escape(StringType s) { - replace_substring(s, "~", "~0"); - replace_substring(s, "/", "~1"); + replace_substring(s, StringType{"~"}, StringType{"~0"}); + replace_substring(s, StringType{"/"}, StringType{"~1"}); return s; } @@ -2754,24 +3128,36 @@ inline std::string escape(std::string s) * * Note the order of escaping "~1" to "/" and "~0" to "~" is important. */ -static void unescape(std::string& s) +template +static void unescape(StringType& s) { - replace_substring(s, "~1", "/"); - replace_substring(s, "~0", "~"); + replace_substring(s, StringType{"~1"}, StringType{"/"}); + replace_substring(s, StringType{"~0"}, StringType{"~"}); } -} // namespace detail -} // namespace nlohmann +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END // #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + #include // size_t -namespace nlohmann -{ +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN namespace detail { + /// struct to capture the start position of the current token struct position_t { @@ -2789,251 +3175,32 @@ struct position_t } }; -} // namespace detail -} // namespace nlohmann +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END // #include +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-FileCopyrightText: 2018 The Abseil Authors +// SPDX-License-Identifier: MIT -namespace nlohmann -{ -namespace detail -{ -//////////////// -// exceptions // -//////////////// -/// @brief general exception of the @ref basic_json class -/// @sa https://json.nlohmann.me/api/basic_json/exception/ -class exception : public std::exception -{ - public: - /// returns the explanatory string - const char* what() const noexcept override - { - return m.what(); - } - /// the id of the exception - const int id; // NOLINT(cppcoreguidelines-non-private-member-variables-in-classes) +#include // array +#include // size_t +#include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type +#include // index_sequence, make_index_sequence, index_sequence_for - protected: - JSON_HEDLEY_NON_NULL(3) - exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} // NOLINT(bugprone-throw-keyword-missing) +// #include - static std::string name(const std::string& ename, int id_) - { - return "[json.exception." + ename + "." + std::to_string(id_) + "] "; - } - template - static std::string diagnostics(const BasicJsonType& leaf_element) - { -#if JSON_DIAGNOSTICS - std::vector tokens; - for (const auto* current = &leaf_element; current->m_parent != nullptr; current = current->m_parent) - { - switch (current->m_parent->type()) - { - case value_t::array: - { - for (std::size_t i = 0; i < current->m_parent->m_value.array->size(); ++i) - { - if (¤t->m_parent->m_value.array->operator[](i) == current) - { - tokens.emplace_back(std::to_string(i)); - break; - } - } - break; - } - - case value_t::object: - { - for (const auto& element : *current->m_parent->m_value.object) - { - if (&element.second == current) - { - tokens.emplace_back(element.first.c_str()); - break; - } - } - break; - } - - case value_t::null: // LCOV_EXCL_LINE - case value_t::string: // LCOV_EXCL_LINE - case value_t::boolean: // LCOV_EXCL_LINE - case value_t::number_integer: // LCOV_EXCL_LINE - case value_t::number_unsigned: // LCOV_EXCL_LINE - case value_t::number_float: // LCOV_EXCL_LINE - case value_t::binary: // LCOV_EXCL_LINE - case value_t::discarded: // LCOV_EXCL_LINE - default: // LCOV_EXCL_LINE - break; // LCOV_EXCL_LINE - } - } - - if (tokens.empty()) - { - return ""; - } - - return "(" + std::accumulate(tokens.rbegin(), tokens.rend(), std::string{}, - [](const std::string & a, const std::string & b) - { - return a + "/" + detail::escape(b); - }) + ") "; -#else - static_cast(leaf_element); - return ""; -#endif - } - - private: - /// an exception object as storage for error messages - std::runtime_error m; -}; - -/// @brief exception indicating a parse error -/// @sa https://json.nlohmann.me/api/basic_json/parse_error/ -class parse_error : public exception -{ - public: - /*! - @brief create a parse error exception - @param[in] id_ the id of the exception - @param[in] pos the position where the error occurred (or with - chars_read_total=0 if the position cannot be - determined) - @param[in] what_arg the explanatory string - @return parse_error object - */ - template - static parse_error create(int id_, const position_t& pos, const std::string& what_arg, const BasicJsonType& context) - { - std::string w = exception::name("parse_error", id_) + "parse error" + - position_string(pos) + ": " + exception::diagnostics(context) + what_arg; - return {id_, pos.chars_read_total, w.c_str()}; - } - - template - static parse_error create(int id_, std::size_t byte_, const std::string& what_arg, const BasicJsonType& context) - { - std::string w = exception::name("parse_error", id_) + "parse error" + - (byte_ != 0 ? (" at byte " + std::to_string(byte_)) : "") + - ": " + exception::diagnostics(context) + what_arg; - return {id_, byte_, w.c_str()}; - } - - /*! - @brief byte index of the parse error - - The byte index of the last read character in the input file. - - @note For an input with n bytes, 1 is the index of the first character and - n+1 is the index of the terminating null byte or the end of file. - This also holds true when reading a byte vector (CBOR or MessagePack). - */ - const std::size_t byte; - - private: - parse_error(int id_, std::size_t byte_, const char* what_arg) - : exception(id_, what_arg), byte(byte_) {} - - static std::string position_string(const position_t& pos) - { - return " at line " + std::to_string(pos.lines_read + 1) + - ", column " + std::to_string(pos.chars_read_current_line); - } -}; - -/// @brief exception indicating errors with iterators -/// @sa https://json.nlohmann.me/api/basic_json/invalid_iterator/ -class invalid_iterator : public exception -{ - public: - template - static invalid_iterator create(int id_, const std::string& what_arg, const BasicJsonType& context) - { - std::string w = exception::name("invalid_iterator", id_) + exception::diagnostics(context) + what_arg; - return {id_, w.c_str()}; - } - - private: - JSON_HEDLEY_NON_NULL(3) - invalid_iterator(int id_, const char* what_arg) - : exception(id_, what_arg) {} -}; - -/// @brief exception indicating executing a member function with a wrong type -/// @sa https://json.nlohmann.me/api/basic_json/type_error/ -class type_error : public exception -{ - public: - template - static type_error create(int id_, const std::string& what_arg, const BasicJsonType& context) - { - std::string w = exception::name("type_error", id_) + exception::diagnostics(context) + what_arg; - return {id_, w.c_str()}; - } - - private: - JSON_HEDLEY_NON_NULL(3) - type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} -}; - -/// @brief exception indicating access out of the defined range -/// @sa https://json.nlohmann.me/api/basic_json/out_of_range/ -class out_of_range : public exception -{ - public: - template - static out_of_range create(int id_, const std::string& what_arg, const BasicJsonType& context) - { - std::string w = exception::name("out_of_range", id_) + exception::diagnostics(context) + what_arg; - return {id_, w.c_str()}; - } - - private: - JSON_HEDLEY_NON_NULL(3) - out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} -}; - -/// @brief exception indicating other library errors -/// @sa https://json.nlohmann.me/api/basic_json/other_error/ -class other_error : public exception -{ - public: - template - static other_error create(int id_, const std::string& what_arg, const BasicJsonType& context) - { - std::string w = exception::name("other_error", id_) + exception::diagnostics(context) + what_arg; - return {id_, w.c_str()}; - } - - private: - JSON_HEDLEY_NON_NULL(3) - other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} -}; - -} // namespace detail -} // namespace nlohmann - -// #include - -// #include - - -#include // size_t -#include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type -#include // index_sequence, make_index_sequence, index_sequence_for - -// #include - - -namespace nlohmann -{ +NLOHMANN_JSON_NAMESPACE_BEGIN namespace detail { @@ -3170,52 +3337,64 @@ template<> struct priority_tag<0> {}; template struct static_const { - static constexpr T value{}; + static JSON_INLINE_VARIABLE constexpr T value{}; }; -template -constexpr T static_const::value; // NOLINT(readability-redundant-declaration) - -} // namespace detail -} // namespace nlohmann - -// #include - +#ifndef JSON_HAS_CPP_17 + template + constexpr T static_const::value; +#endif -namespace nlohmann -{ -namespace detail +template +constexpr std::array make_array(Args&& ... args) { -// dispatching helper struct -template struct identity_tag {}; + return std::array {{static_cast(std::forward(args))...}}; +} + } // namespace detail -} // namespace nlohmann +NLOHMANN_JSON_NAMESPACE_END // #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + #include // numeric_limits +#include // char_traits +#include // tuple #include // false_type, is_constructible, is_integral, is_same, true_type #include // declval -#include // tuple - -// #include - // #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + #include // random_access_iterator_tag +// #include + // #include // #include -namespace nlohmann -{ +NLOHMANN_JSON_NAMESPACE_BEGIN namespace detail { + template struct iterator_types {}; @@ -3241,7 +3420,7 @@ struct iterator_traits template struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> - : iterator_types + : iterator_types { }; @@ -3254,104 +3433,136 @@ struct iterator_traits::value>> using pointer = T*; using reference = T&; }; -} // namespace detail -} // namespace nlohmann + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include // #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + // #include -namespace nlohmann -{ +NLOHMANN_JSON_NAMESPACE_BEGIN + NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin); -} // namespace nlohmann + +NLOHMANN_JSON_NAMESPACE_END // #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + // #include -namespace nlohmann -{ +NLOHMANN_JSON_NAMESPACE_BEGIN + NLOHMANN_CAN_CALL_STD_FUNC_IMPL(end); -} // namespace nlohmann + +NLOHMANN_JSON_NAMESPACE_END // #include // #include // #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + #ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_ -#define INCLUDE_NLOHMANN_JSON_FWD_HPP_ + #define INCLUDE_NLOHMANN_JSON_FWD_HPP_ -#include // int64_t, uint64_t -#include // map -#include // allocator -#include // string -#include // vector + #include // int64_t, uint64_t + #include // map + #include // allocator + #include // string + #include // vector -/*! -@brief namespace for Niels Lohmann -@see https://github.com/nlohmann -@since version 1.0.0 -*/ -namespace nlohmann -{ -/*! -@brief default JSONSerializer template argument + // #include -This serializer ignores the template arguments and uses ADL -([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl)) -for serialization. -*/ -template -struct adl_serializer; - -/// a class to store JSON values -/// @sa https://json.nlohmann.me/api/basic_json/ -template class ObjectType = - std::map, - template class ArrayType = std::vector, - class StringType = std::string, class BooleanType = bool, - class NumberIntegerType = std::int64_t, - class NumberUnsignedType = std::uint64_t, - class NumberFloatType = double, - template class AllocatorType = std::allocator, - template class JSONSerializer = - adl_serializer, - class BinaryType = std::vector> -class basic_json; -/// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document -/// @sa https://json.nlohmann.me/api/json_pointer/ -template -class json_pointer; + /*! + @brief namespace for Niels Lohmann + @see https://github.com/nlohmann + @since version 1.0.0 + */ + NLOHMANN_JSON_NAMESPACE_BEGIN -/*! -@brief default specialization -@sa https://json.nlohmann.me/api/json/ -*/ -using json = basic_json<>; + /*! + @brief default JSONSerializer template argument + + This serializer ignores the template arguments and uses ADL + ([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl)) + for serialization. + */ + template + struct adl_serializer; + + /// a class to store JSON values + /// @sa https://json.nlohmann.me/api/basic_json/ + template class ObjectType = + std::map, + template class ArrayType = std::vector, + class StringType = std::string, class BooleanType = bool, + class NumberIntegerType = std::int64_t, + class NumberUnsignedType = std::uint64_t, + class NumberFloatType = double, + template class AllocatorType = std::allocator, + template class JSONSerializer = + adl_serializer, + class BinaryType = std::vector, // cppcheck-suppress syntaxError + class CustomBaseClass = void> + class basic_json; + + /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document + /// @sa https://json.nlohmann.me/api/json_pointer/ + template + class json_pointer; + + /*! + @brief default specialization + @sa https://json.nlohmann.me/api/json/ + */ + using json = basic_json<>; -/// @brief a minimal map-like container that preserves insertion order -/// @sa https://json.nlohmann.me/api/ordered_map/ -template -struct ordered_map; + /// @brief a minimal map-like container that preserves insertion order + /// @sa https://json.nlohmann.me/api/ordered_map/ + template + struct ordered_map; -/// @brief specialization that maintains the insertion order of object keys -/// @sa https://json.nlohmann.me/api/ordered_json/ -using ordered_json = basic_json; + /// @brief specialization that maintains the insertion order of object keys + /// @sa https://json.nlohmann.me/api/ordered_json/ + using ordered_json = basic_json; -} // namespace nlohmann + NLOHMANN_JSON_NAMESPACE_END #endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_ -namespace nlohmann -{ +NLOHMANN_JSON_NAMESPACE_BEGIN /*! @brief detail namespace with internal helper functions @@ -3362,6 +3573,7 @@ implementations of some @ref basic_json methods, and meta-programming helpers. */ namespace detail { + ///////////// // helpers // ///////////// @@ -3380,6 +3592,16 @@ template struct is_basic_json : std::false_type {}; NLOHMANN_BASIC_JSON_TPL_DECLARATION struct is_basic_json : std::true_type {}; +// used by exceptions create() member functions +// true_type for pointer to possibly cv-qualified basic_json or std::nullptr_t +// false_type otherwise +template +struct is_basic_json_context : + std::integral_constant < bool, + is_basic_json::type>::type>::value + || std::is_same::value > +{}; + ////////////////////// // json_ref helpers // ////////////////////// @@ -3481,17 +3703,92 @@ struct has_to_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> T>::value; }; +template +using detect_key_compare = typename T::key_compare; -/////////////////// -// is_ functions // -/////////////////// +template +struct has_key_compare : std::integral_constant::value> {}; + +// obtains the actual object key comparator +template +struct actual_object_comparator +{ + using object_t = typename BasicJsonType::object_t; + using object_comparator_t = typename BasicJsonType::default_object_comparator_t; + using type = typename std::conditional < has_key_compare::value, + typename object_t::key_compare, object_comparator_t>::type; +}; + +template +using actual_object_comparator_t = typename actual_object_comparator::type; + +///////////////// +// char_traits // +///////////////// + +// Primary template of char_traits calls std char_traits +template +struct char_traits : std::char_traits +{}; + +// Explicitly define char traits for unsigned char since it is not standard +template<> +struct char_traits : std::char_traits +{ + using char_type = unsigned char; + using int_type = uint64_t; + + // Redefine to_int_type function + static int_type to_int_type(char_type c) noexcept + { + return static_cast(c); + } + + static char_type to_char_type(int_type i) noexcept + { + return static_cast(i); + } + + static constexpr int_type eof() noexcept + { + return static_cast(std::char_traits::eof()); + } +}; + +// Explicitly define char traits for signed char since it is not standard +template<> +struct char_traits : std::char_traits +{ + using char_type = signed char; + using int_type = uint64_t; + + // Redefine to_int_type function + static int_type to_int_type(char_type c) noexcept + { + return static_cast(c); + } + + static char_type to_char_type(int_type i) noexcept + { + return static_cast(i); + } + + static constexpr int_type eof() noexcept + { + return static_cast(std::char_traits::eof()); + } +}; + +/////////////////// +// is_ functions // +/////////////////// // https://en.cppreference.com/w/cpp/types/conjunction template struct conjunction : std::true_type { }; -template struct conjunction : B1 { }; -template -struct conjunction -: std::conditional, B1>::type {}; +template struct conjunction : B { }; +template +struct conjunction +: std::conditional(B::value), conjunction, B>::type {}; // https://en.cppreference.com/w/cpp/types/negation template struct negation : std::integral_constant < bool, !B::value > { }; @@ -3504,20 +3801,19 @@ struct is_default_constructible : std::is_default_constructible {}; template struct is_default_constructible> - : conjunction, is_default_constructible> {}; + : conjunction, is_default_constructible> {}; template struct is_default_constructible> - : conjunction, is_default_constructible> {}; + : conjunction, is_default_constructible> {}; template struct is_default_constructible> - : conjunction...> {}; + : conjunction...> {}; template struct is_default_constructible> - : conjunction...> {}; - + : conjunction...> {}; template struct is_constructible : std::is_constructible {}; @@ -3534,7 +3830,6 @@ struct is_constructible> : is_default_constructible struct is_constructible> : is_default_constructible> {}; - template struct is_iterator_traits : std::false_type {}; @@ -3655,9 +3950,18 @@ struct is_compatible_string_type template struct is_constructible_string_type { + // launder type through decltype() to fix compilation failure on ICPC +#ifdef __INTEL_COMPILER + using laundered_type = decltype(std::declval()); +#else + using laundered_type = ConstructibleStringType; +#endif + static constexpr auto value = - is_constructible::value; + conjunction < + is_constructible, + is_detected_exact>::value; }; template @@ -3707,8 +4011,8 @@ is_detected::value&& // special case for types like std::filesystem::path whose iterator's value_type are themselves // c.f. https://github.com/nlohmann/json/pull/3073 !std::is_same>::value&& - is_complete_type < - detected_t>::value >> +is_complete_type < +detected_t>::value >> { using value_type = range_value_t; @@ -3775,6 +4079,81 @@ struct is_constructible_tuple : std::false_type {}; template struct is_constructible_tuple> : conjunction...> {}; +template +struct is_json_iterator_of : std::false_type {}; + +template +struct is_json_iterator_of : std::true_type {}; + +template +struct is_json_iterator_of : std::true_type +{}; + +// checks if a given type T is a template specialization of Primary +template