diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100755 index 00000000..021c1119 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,61 @@ +cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +project(DSQSS NONE) +set(DSQSS_VERSION 1.2.0) + +if(CONFIG) + message(STATUS "Loading configration: " ${PROJECT_SOURCE_DIR}/config/${CONFIG}.cmake) + include(${PROJECT_SOURCE_DIR}/config/${CONFIG}.cmake) +endif(CONFIG) +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Type of build" FORCE) +endif(NOT CMAKE_BUILD_TYPE) +message(STATUS "Build type: " ${CMAKE_BUILD_TYPE}) + +option(BUILD_SHARED_LIBS "Build shared libraries" ON) +option(ENABLE_MPI "Enable MPI Parallelization" ON) +option(Testing "Enable testing" ON) +option(Document "Build HTML document" OFF) + +option(USE_SYSTEM_BOOST "use Boost installed in system" OFF) + +enable_language(C CXX) + +set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") +set(CMAKE_SKIP_BUILD_RPATH FALSE) +set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +set(CMAKE_MACOSX_RPATH 1) + +option(DEBUG "Debug" OFF) + +find_package(LAPACK) + +if(ENABLE_MPI) + find_package(MPI) +endif(ENABLE_MPI) + +if(USE_SYSTEM_BOOST) + find_package(Boost REQUIRED) +else(USE_SYSTEM_BOOST) + set(Boost_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/third-party/boost) + message(STATUS "Use bundled Boost headers (1.67)") +endif(USE_SYSTEM_BOOST) +message(STATUS "Boost headers: ${Boost_INCLUDE_DIRS}") +include_directories(${Boost_INCLUDE_DIRS}) + +add_subdirectory(src/dla) +if(MPI_FOUND) + add_subdirectory(src/pmwa) +endif(MPI_FOUND) +add_subdirectory(tool) + +if (Testing) + enable_testing() + add_subdirectory(test) +endif() + +if (Document) + add_subdirectory(doc) +endif(Document) + +add_subdirectory(sample) diff --git a/LICENSE b/LICENSE new file mode 100755 index 00000000..94a9ed02 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md new file mode 100755 index 00000000..b99dfd83 --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +# dsqss + +## Build + +### Simple build + +``` bash +rm -rf build +mkdir build +cd build +cmake ../ +make +``` + +You can find executable files in `build/src/dla`, `build/src/dla/generators` and `build/src/pmwa/`. + +### build manual + +[Sphinx](http://www.sphinx-doc.org) is required. +LaTeX is required for PDF format. + +``` bash +cmake -DDocument=ON ../ +make doc +``` + +### Testing + +``` bash +ctest +``` + +When some tests failed, you can check output of these tests by following: + +``` bash +ctest -V -R "test name" +``` + +Test names can be specified by the regular expression. + +### Install + +``` bash +cmake -DCMAKE_INSTALL_PREFIX=/path/to/install/to ../ +make install +``` + +## License +### License of DSQSS +DSQSS is distributed under the GNU GPL v3. + +### License of the bundled libs +- Boost C++ library is redistributed under the Boost software license. + diff --git a/config/gcc.cmake b/config/gcc.cmake new file mode 100755 index 00000000..63dd3a85 --- /dev/null +++ b/config/gcc.cmake @@ -0,0 +1,3 @@ +# for GCC Compiler +set(CMAKE_CXX_COMPILER "g++" CACHE STRING "" FORCE) +#set(CMAKE_C_FLAGS_RELEASE "-Wall -Wno-unknown-pragmas -Wformat -Werror=format-security" CACHE STRING "" FORCE) diff --git a/config/intel.cmake b/config/intel.cmake new file mode 100755 index 00000000..0c21432c --- /dev/null +++ b/config/intel.cmake @@ -0,0 +1,9 @@ +# for Intel Compiler + +set(CMAKE_C_COMPILER "icc" CACHE STRING "" FORCE) +set(CMAKE_CXX_COMPILER "icpc" CACHE STRING "" FORCE) +set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -Wformat -Werror=format-security") +set(CMAKE_CXX_FLAGS_RELEASE "-Wno-unknown-pragmas -wd2196 -O3 -DNDEBUG -DHAVE_SSE2" CACHE STRING "" FORCE) + +# for Intel MKL +set(BLA_VENDOR "Intel10_64lp" CACHE STRING "" FORCE) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100755 index 00000000..57af432a --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,15 @@ +find_program(SPHINX_EXECUTABLE NAMES sphinx-build + HINTS $ENV{SPHINX_DIR} + PATH_SUFFIXES bin + ) + +if(NOT SPHINX_EXECUTABLE) + message(FATAL_ERROR "SPHINX_EXECUTABLE (sphinx-build) is not found!") +endif() + +find_package(LATEX) + +add_subdirectory(en) +add_subdirectory(jp) + +add_custom_target(doc DEPENDS doc-jp doc-en) diff --git a/doc/_build/html/.buildinfo b/doc/_build/html/.buildinfo new file mode 100755 index 00000000..a63b94ff --- /dev/null +++ b/doc/_build/html/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: ce1df7b0b76358bb46a7de889faf8523 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/doc/_build/html/.doctrees/dla/users-manual/generator.doctree b/doc/_build/html/.doctrees/dla/users-manual/generator.doctree new file mode 100755 index 00000000..ffe146fd Binary files /dev/null and b/doc/_build/html/.doctrees/dla/users-manual/generator.doctree differ diff --git a/doc/_build/html/.doctrees/dla/users-manual/index.doctree b/doc/_build/html/.doctrees/dla/users-manual/index.doctree new file mode 100755 index 00000000..bf841eb5 Binary files /dev/null and b/doc/_build/html/.doctrees/dla/users-manual/index.doctree differ diff --git a/doc/_build/html/.doctrees/dla/users-manual/input.doctree b/doc/_build/html/.doctrees/dla/users-manual/input.doctree new file mode 100755 index 00000000..6be63b47 Binary files /dev/null and b/doc/_build/html/.doctrees/dla/users-manual/input.doctree differ diff --git a/doc/_build/html/.doctrees/dla/users-manual/output.doctree b/doc/_build/html/.doctrees/dla/users-manual/output.doctree new file mode 100755 index 00000000..d38985bb Binary files /dev/null and b/doc/_build/html/.doctrees/dla/users-manual/output.doctree differ diff --git a/doc/_build/html/.doctrees/dsqss/about_dsqss.doctree b/doc/_build/html/.doctrees/dsqss/about_dsqss.doctree new file mode 100755 index 00000000..f72dc906 Binary files /dev/null and b/doc/_build/html/.doctrees/dsqss/about_dsqss.doctree differ diff --git a/doc/_build/html/.doctrees/dsqss/algorithm.doctree b/doc/_build/html/.doctrees/dsqss/algorithm.doctree new file mode 100755 index 00000000..94558bb9 Binary files /dev/null and b/doc/_build/html/.doctrees/dsqss/algorithm.doctree differ diff --git a/doc/_build/html/.doctrees/dsqss/index.doctree b/doc/_build/html/.doctrees/dsqss/index.doctree new file mode 100755 index 00000000..086e41cb Binary files /dev/null and b/doc/_build/html/.doctrees/dsqss/index.doctree differ diff --git a/doc/_build/html/.doctrees/dsqss/install.doctree b/doc/_build/html/.doctrees/dsqss/install.doctree new file mode 100755 index 00000000..e4339679 Binary files /dev/null and b/doc/_build/html/.doctrees/dsqss/install.doctree differ diff --git a/doc/_build/html/.doctrees/dsqss/tutorial.doctree b/doc/_build/html/.doctrees/dsqss/tutorial.doctree new file mode 100755 index 00000000..0c8cbaca Binary files /dev/null and b/doc/_build/html/.doctrees/dsqss/tutorial.doctree differ diff --git a/doc/_build/html/.doctrees/en/index.doctree b/doc/_build/html/.doctrees/en/index.doctree new file mode 100755 index 00000000..62df202b Binary files /dev/null and b/doc/_build/html/.doctrees/en/index.doctree differ diff --git a/doc/_build/html/.doctrees/environment.pickle b/doc/_build/html/.doctrees/environment.pickle new file mode 100755 index 00000000..df3955aa Binary files /dev/null and b/doc/_build/html/.doctrees/environment.pickle differ diff --git a/doc/_build/html/.doctrees/index.doctree b/doc/_build/html/.doctrees/index.doctree new file mode 100755 index 00000000..514a1464 Binary files /dev/null and b/doc/_build/html/.doctrees/index.doctree differ diff --git a/doc/_build/html/.doctrees/pmwa/tutorial/input.doctree b/doc/_build/html/.doctrees/pmwa/tutorial/input.doctree new file mode 100755 index 00000000..1f770ea2 Binary files /dev/null and b/doc/_build/html/.doctrees/pmwa/tutorial/input.doctree differ diff --git a/doc/_build/html/.doctrees/pmwa/tutorial/intro.doctree b/doc/_build/html/.doctrees/pmwa/tutorial/intro.doctree new file mode 100755 index 00000000..20da74b7 Binary files /dev/null and b/doc/_build/html/.doctrees/pmwa/tutorial/intro.doctree differ diff --git a/doc/_build/html/.doctrees/pmwa/tutorial/lattgene.doctree b/doc/_build/html/.doctrees/pmwa/tutorial/lattgene.doctree new file mode 100755 index 00000000..8f96f67f Binary files /dev/null and b/doc/_build/html/.doctrees/pmwa/tutorial/lattgene.doctree differ diff --git a/doc/_build/html/.doctrees/pmwa/tutorial/model.doctree b/doc/_build/html/.doctrees/pmwa/tutorial/model.doctree new file mode 100755 index 00000000..81e4beec Binary files /dev/null and b/doc/_build/html/.doctrees/pmwa/tutorial/model.doctree differ diff --git a/doc/_build/html/.doctrees/pmwa/tutorial/output.doctree b/doc/_build/html/.doctrees/pmwa/tutorial/output.doctree new file mode 100755 index 00000000..d9589ee2 Binary files /dev/null and b/doc/_build/html/.doctrees/pmwa/tutorial/output.doctree differ diff --git a/doc/_build/html/.doctrees/pmwa/tutorial/reference.doctree b/doc/_build/html/.doctrees/pmwa/tutorial/reference.doctree new file mode 100755 index 00000000..0bcda57f Binary files /dev/null and b/doc/_build/html/.doctrees/pmwa/tutorial/reference.doctree differ diff --git a/doc/_build/html/.doctrees/pmwa/tutorial/sample_Heisenberg.doctree b/doc/_build/html/.doctrees/pmwa/tutorial/sample_Heisenberg.doctree new file mode 100755 index 00000000..a318001b Binary files /dev/null and b/doc/_build/html/.doctrees/pmwa/tutorial/sample_Heisenberg.doctree differ diff --git a/doc/_build/html/.doctrees/pmwa/tutorial/tu-index.doctree b/doc/_build/html/.doctrees/pmwa/tutorial/tu-index.doctree new file mode 100755 index 00000000..917d9376 Binary files /dev/null and b/doc/_build/html/.doctrees/pmwa/tutorial/tu-index.doctree differ diff --git a/doc/_build/html/.doctrees/pmwa/tutorial/tutorial.doctree b/doc/_build/html/.doctrees/pmwa/tutorial/tutorial.doctree new file mode 100755 index 00000000..6bf2ddf1 Binary files /dev/null and b/doc/_build/html/.doctrees/pmwa/tutorial/tutorial.doctree differ diff --git a/doc/_build/html/.doctrees/pmwa/tutorial/usage.doctree b/doc/_build/html/.doctrees/pmwa/tutorial/usage.doctree new file mode 100755 index 00000000..1f220b7f Binary files /dev/null and b/doc/_build/html/.doctrees/pmwa/tutorial/usage.doctree differ diff --git a/doc/_build/html/_sources/dla/users-manual/generator.rst.txt b/doc/_build/html/_sources/dla/users-manual/generator.rst.txt new file mode 100755 index 00000000..968204c5 --- /dev/null +++ b/doc/_build/html/_sources/dla/users-manual/generator.rst.txt @@ -0,0 +1,80 @@ +.. highlight:: none + +DLA の入力ファイル生成ツール +============================= + +DLA は入力ファイルとして格子定義ファイル、アルゴリズム定義ファイル、 +構造因子定義ファイル、実空間表示温度グリーン関数定義ファイル、波数空間表示温度グリーン関数定義ファイルを、それぞれXML 形式ファイルとして取る。 +これらをうまく定義することで、計算機資源の許す範囲で任意の格子や模型を計算できるが、 +手で定義するには複雑になってしまう。 +そのため、超立方格子やハイゼンベルグ模型などのよく使われるような格子・模型については生成ツールが用意されている。 + +超立方格子生成ツール ``lattgene_C`` +************************************ +``lattgene_C`` は周期境界条件を持つ :math:`D` 次元超立方格子を表す格子定義ファイルを生成するためのツールである。 :: + + $ lattgene_C D L1 L2 ... LD BETA + +パラメータは以下の通り。 + +``D`` + 格子の次元。 + +``L1 L2 ... LD`` + 格子のサイズ。 ``D`` 個の整数をスペース区切りで入力する。 + +``BETA`` + 逆温度。 浮動小数点数で入力。 + +実行すると ``lattice.xml`` という格子定義ファイルがカレントディレクトリに生成される。 + +実行例 :: + + ## 8 サイトの一次元鎖で、逆温度は 10.0 + $ lattgene_C 1 8 10.0 + + ## 6x6 サイトの正方格子で、逆温度は 10.0 + $ lattgene_C 2 6 6 10.0 + +ハイゼンベルグスピンハミルトニアン生成ツール ``hamgen_H`` +********************************************************** + +``hamgen_H`` はハイゼンベルグスピン模型を表すハミルトニアンファイルを生成するツールである。 :: + + $ hamgen_H M J F + +パラメータは以下の通り。 + +``M`` + 局在スピンの大きさ:math:`S` の2倍に等しい整数。 + +``J`` + 交換相互作用。正で強磁性、負で反強磁性。 + +``F`` + サイトにかかる、ボンドあたりの磁場。 + +実行すると ``hamiltonian.xml`` というファイルがカレントディレクトリに生成される。 + +実行例 :: + + ## 磁場なしの反強磁性 S=1/2 ハイゼンベルグ模型 + $ hamgen_H 1 -1.0 0.0 + + ## 磁場ありの強磁性 S=1 ハイゼンベルグ模型 + $ hamgen_H 2 1.0 1.0 + + +アルゴリズム生成ツール ``dla_alg`` +************************************* +``dla_alg`` はハミルトニアン生成ツールで生成したハミルトニアンファイルからアルゴリズム定義ファイルを生成するツールである。 :: + + $ dla_alg HFILE AFILE + +パラメータは以下の通り。 + +``HFILE`` + 読み込むハミルトニアンファイル。省略した場合は ``hamiltonian.xml`` が指定される。 + +``AFILE`` + 書き出されるアルゴリズム定義ファイル。省略した場合は ``algorithm.xml`` が指定される。 diff --git a/doc/_build/html/_sources/dla/users-manual/index.rst.txt b/doc/_build/html/_sources/dla/users-manual/index.rst.txt new file mode 100755 index 00000000..23ec9914 --- /dev/null +++ b/doc/_build/html/_sources/dla/users-manual/index.rst.txt @@ -0,0 +1,11 @@ +*********************** +DLAのユーザーマニュアル +*********************** + +.. toctree:: + :maxdepth: 2 + + input + generator + output + diff --git a/doc/_build/html/_sources/dla/users-manual/input.rst.txt b/doc/_build/html/_sources/dla/users-manual/input.rst.txt new file mode 100755 index 00000000..4c05534a --- /dev/null +++ b/doc/_build/html/_sources/dla/users-manual/input.rst.txt @@ -0,0 +1,407 @@ +.. highlight:: none + +DLA の入力ファイル +======================== + +入力ファイル一覧 +************************ + +``qmc.inp`` + モンテカルロの繰り返し回数など、計算制御のためのパラメータファイル。 +``lattice.xml`` + 格子の定義ファイル。 +``algorithm.xml`` + アルゴリズム(ワームの散乱確率など)の定義ファイル。 +``sf.xml`` + 構造因子の波数定義ファイル。 +``cf.xml`` + 実空間温度グリーン関数の座標定義ファイル。 + +パラメータファイル ``qmc.inp`` +********************************** +パラメータファイルは次に示すような書式のプレーンテキストファイルである。 + +- 1行あたり1パラメータを、 `` = `` という形式で表す。 +- 1行の文字数は最大256。 +- ファイル名以外は大文字小文字を区別しない。 +- 空行、空白は無視される。 +- "#" から行末まではコメントとして無視される。 + +パラメータのリストと意味を以下に示す。 +名前のあとのカッコはデフォルト値。 + +``nmcse`` (``1000``) + モンテカルロスイープあたりのワーム対生成回数を求めるための事前計算のためのモンテカルロ試行回数。 + +``nmcsd`` (``1000``) + 熱平衡化のためのモンテカルロスイープ数。 + +``nmcs`` (``1000``) + 物理量計算のためのモンテカルロスイープ数。 + +``nset`` (``10``) + モンテカルロ計算の繰り返し数。 + +``simulationtime`` (``0.0``) + 計算時間(単位は秒)。 + + - ``simulationtime > 0.0`` のとき + + - 指定秒数が経過するか、計算が完了したとき、途中経過をチェックポイントファイルに書き出した後、プログラムを終了する。 + - 計算開始時にチェックポイントファイルがある場合、そのファイルを読み込んだ後に計算を再開する。 + - チェックポイントファイルの名前は ``outfile`` で指定されるメイン出力ファイル名の末尾に ``.cjob`` をつけたもの。 + + - ``simulationtime <= 0.0`` のとき + + - チェックポイントファイルは無視され、書き出しも読み込みも行われない。 + +``seed`` (``198212240``) + 疑似乱数の種。 + +``nvermax`` (``10000``) + 最大バーテックス数。 + +``nsegmax`` (``10000``) + 最大セグメント数。 + +``algfile`` (``algorithm.xml``) + アルゴリズム定義ファイル名。 + +``latfile`` (``lattice.xml``) + 格子定義ファイル名。 + +``sfinpfile`` (``""``) + 構造因子定義ファイル名。空文字列、もしくは指定しない場合、構造因子は計算されない。 + +``cfinpfile`` (``""``) + 実空間表示温度グリーン関数定義ファイル名。空文字列、もしくは指定しない場合、実空間表示温度グリーン関数は計算されない。 + +``ckinpfile`` (``""``) + 波数空間表示温度グリーン関数定義ファイル名。空文字列、もしくは指定しない場合、波数空間表示温度グリーン関数は計算されない。 + +``outfile`` (``sample.log``) + メイン出力ファイル名。 + +``sfoutfile`` (``sf.dat``) + 構造因子出力ファイル名。 + +``cfoutfile`` (``cf.dat``) + 実空間表示温度グリーン関数出力ファイル名。 + +``ckoutfile`` (``ck.dat``) + 波数空間表示温度グリーン関数出力ファイル名。 + +``runtype`` (``0``) + 計算手法。 + 互換性および将来の拡張のために用意されている。 + + +格子定義ファイル ``lattice.xml`` +************************************** + +格子ファイルは時空間の情報、たとえばサイトの数やサイト同士のつながりかた、逆温度の大きさなどを定義するための、 +XML ライクな形式で記述されるテキストファイルである。 +これは一般に複雑になりえるので、正方格子などのよく使われる格子については、 +格子定義ファイル作成のための補助ツール ``lattgene`` が用意されている。 + +格子ファイルはただ一つの要素 ``Lattice`` を持ち、すべての情報は ``Lattice`` 要素の内容として含まれる。 + +``Lattice`` + ファイル全体の要素。ほかのすべての要素は ``Lattice`` のサブ要素となる。 + +``Comment`` + 省略可能。コメント文を示し、計算には使用されない。 + +``Dimension`` + 格子の次元。 + +``Beta`` + 逆温度。 + +``LinearSize`` + ユニットセルを単位とした、各次元の格子の長さ。 + 内容として、スペース区切りの正整数を ``Dimension`` で指定した数だけ並べたものを取る。 :: + + 3 4 + # ユニットセルが第1次元方向に3個、第2次元方向に4個並んでいる場合 + +``NumberOfCells`` + ユニットセルの総数。 ``LinearSize`` で指定した各次元方向のサイズの積。 + +``NumberOfSites`` + サイトの総数。ユニットセルの総数と1セル内のサイト数の積。 + +``NumberOfInteractions`` + 相互作用項の総数。二体相互作用のみの場合は、いわゆる「ボンド数」。 + +``NumberOfSiteTypes`` + サイトの種類数。 + +``NumberOfInteractionTypes`` + 相互作用の種類数。 + +``BondDimension`` + Winding number を測定する際に定義する要素。 + +``NumberOfEdgeInteractions`` + Winding number を測定する際に定義する要素。格子の周期的境界をまたぐボンドの総数を指定する。 + +``S`` + サイト情報。 ``NumberOfSites`` で指定したサイト数だけ指定する必要がある。 + 内容として、「サイト番号」、「サイトタイプ」、「測定タイプ」の3つの整数をスペース区切りで持つ。 + サイトタイプの詳細はアルゴリズム定義ファイルの中で定義される。 :: + + 3 0 1 + # サイト番号が3のサイトはサイトタイプが0で、測定タイプは1である。 + +``I`` + 相互作用情報。 ``NumberOfInteractions`` で指定した相互作用数だけ指定する必要がある。 + 内容として、「相互作用番号」、「相互作用タイプ」、「相互作用サイト数」、「相互作用サイト番号」を指定するために、 + 相互作用サイト数+3個の整数をスペース区切りで持つ。 + 相互作用タイプの詳細 ― たとえば相互作用の大きさ ― はアルゴリズム定義ファイルの中で定義される。 + サイト番号の順序は、アルゴリズム定義ファイルの ``InitialConfiguration | Vertex`` 要素で用いられるサイトの並び順と整合させる必要がある。 :: + + 5 1 2 8 12 + # 相互作用番号が5である相互作用は相互作用タイプが1で、2つのサイトが関与し、 + # それらのサイト番号は8と12である。 + + +アルゴリズム定義ファイル ``algorithm.xml`` +************************************************ + +アルゴリズム定義ファイルは相互作用ごとのワームの散乱確率などを定義する、 +XML ライクな形式で記述されるテキストファイルである。 +これは一般に複雑になりえるので、ハイゼンベルグ模型などのよく用いられる模型については、 +アルゴリズム定義ファイル作成のための補助ツール ``hamgen`` や ``dla_alg`` が用意されている。 + +格子ファイルはただ一つの要素 ``Lattice`` を持ち、すべての情報は ``Lattice`` 要素の内容として含まれる。 + +``Algorithm`` + ファイル全体の要素名。サブ要素として、 ``General``, ``Site``, ``Interaction``, ``Vertex`` がある。 + ワームの生成・消滅・散乱の仕方を定義する。 + +``Comment`` + 省略可能。コメント文を示し、計算には使用されない。 + +``General /Algorithm`` + サブ要素として、 ``NSType``, ``NIType``, ``NVType``, ``NXMax``, ``WDiag`` がある。 + サイトの種類数や相互作用の 種類数などアルゴリズム定義の基本パラメータを設定する。 :: + + + + 1 + 1 + 2 + 2 + 0.2500000000000000 + + ... + + +``NSType /General/Algorithm`` + 異なるサイト型の個数を指定する整数値。 + +``NIType /General/Algorithm`` + 異なる相互作用型の個数を指定する整数値。 + +``NVType /General/Algorithm`` + 異なるバーテックス型の個数を指定する整数値。 + +``NXMax /General/Algorithm`` + 各サイトが取りうる状態の数の最大値。例えば大きさ :math:`S` のスピン系ならば :math:`2S+1` 。 + +``WDiag /General/Algorithm`` + ユーザが改変する measure_specific.cc 以外では用いられないので、その中で使われない場合には指定する必要はない。 + (標準の measure_specific.cc では、ワームの行程長から相関関数を求めるときの比例係数として用いられている。 + この量に興味がない場合は、任意の数を指定しておけばよい。) + +``Site /Algorithm`` + 1つのサイト型を定義する。具体的には、そのサイト型をもつサイトに対する操作を定義する。 + サイトにワームを生成消滅する過程もここで定義される。 + サブ要素として、 ``SType``, ``NumberOfStates``, ``VertexTypeOfSource``, ``InitialConfiguration`` がある。 :: + + + ... + + 0 + 2 + 0 + + ... + + + ... + + + ... + + +``SType /Site/Algorithm`` + 定義されるサイト型の識別番号。 + +``NumberOfStates /Site/Algorithm`` + サイトが取りうる状態の数。 + +``VertexTypeOfSource / Site/Algorithm`` + 挿入される可能性のあるバーテックスのタイプ。 + +``InitialConfiguration / Site/Algorithm`` + 初期条件の定義。 初期条件ごとのワーム対の生成消滅過程を定義もこの要素のなかで行われる。 + サブ要素として、 ``State``, ``NumberOfChannels``, ``Channel`` がある。 :: + + + ... + + ... + + 0 + 2 + 0 1 0.5 + 1 1 0.5 + + ... + + ... + + +``State / InitialConfiguration/Site/Algorithm`` + ワーム対が生成される前(もしくは消滅後)のサイトの状態。 + +``NumberOfChannels /InitialConfiguration/Site/Algorithm`` + 可能性のある終状態(チャネル)の数。 + +``Channel /InitialConfiguration/Site/Algorithm`` + 各チャネルの定義。 整数値、整数値、浮動小数点値の3つの並びで指定。 + + - 第1の値はワーム生成後のヘッドの向き(0は虚時間方向負の向き、1は正の向き。)。 + - 第2の値はワーム生成後のヘッドとテールの間の状態。 + - 第3の値はそのような終状態をとる確率。 + + 終状態としてワーム対を生成しない場合は、その Channel の 第1と第2の整数値はともに -1とする。 + +``Interaction /Algorithm`` + 1つの相互作用型を定義する。 + サブ要素として ``IType``, ``VType``, ``NBody``, ``EBase``, ``VertexDensity`` がある。 :: + + + ... + + 0 + 1 + 2 + 0.125 + 0 0 0.25 + 1 1 0.25 + + ... + + +``IType /Interaction/Algorithm`` + 相互作用の型の識別番号。 + +``VType /Interaction/Algorithm`` + 挿入する可能性のあるバーテックスの型の識別番号。 バーテックス型の内容は ``Vertex/Algorithm`` で定義される。 + +``NBody /Interaction/Algorithm`` + 相互作用に関与するサイトの数(ゼーマン項のような1体相互作用であれば1。交換相互作用のような2体相互作用であれば2。3以上を指定することも可能)。 + +``EBase /Interaction/Algorithm`` + エネルギーオフセットの値。シミュレーション自体には影響しないが、最終的なエネルギーの値を出すときに使用される。 + +``VertexDensity /Interaction/Algorithm`` + 関与するサイトの状態ごとに挿入するバーテックスの密度を指定する。 + ``NBody`` 個の整数値と、1個の浮動小数点値の並びで指定。 + 整数値は、関与する各サイトの状態(順序は格子定義ファイルの ``I`` で指定するサイト番号の順序と対応する)。 + 浮動小数点値は密度。 + +``Vertex /Algorithm`` + 1つのバーテックスの型を定義する。 バーテックスとしては、通常の2体、3体、。。。の相互作用を記述するもの( ``VCategory=2`` )と、 + ワームヘッドがテールと消滅する場合のテール( ``VCategory=1`` )がある。 + ``Interaction`` の要素になりえるのは、前者である。 + (このほか、時間方向の周期境界( ``VCategory=0`` )も1体の バーテックスとして扱っているがユーザが定義する必要はない。) + サブ要素として ``VType``, ``VCategory``, ``NBody``, ``NumberOfInitialConfigurations``, ``InitialConfiguration`` がある。 :: + + + ... + + 0 + 1 + 1 + 4 + + ... + + ... + + ... + + + ... + + +``VType /Vertex/Algorithm`` + バーテックス型の識別番号。 バーテックス型の定義ごとに異なる番号でなければならない。 + +``VCategory /Vertex/Algorithm`` + 1 ... ワームテール。2 ... 相互作用。 + +``NBody /Vertex/Algorithm`` + 相互作用に関与するサイトの個数。 + テールの場合には1。 + +``NumberOfInitialConfigurations /Vertex/Algorithm`` + バーテックスの可能な初期状態数。 + +``InitialConfiguration /Vertex/Algorithm`` + 特定のバーテックス初期状態に対するワームの可能なアクションを定義する。 + 従って、この要素は、NumberOfInitialConfigurations の値と同じ数だけ存在する必要がある。 + サブ要素として、 ``State``, ``IncomingDirection``, ``NewState``, ``NumberOfChannels``, ``Channel`` がある。 :: + + + ... + + ... + + 1 0 0 1 + 0 + 0 + 1 + 3 0 1.0000000000000000 + + ... + + ... + + + この例で定義されているのは、「バーテックスの左下(0)、左上(1)、右下(2)、右上(3)の脚の状態がそれぞれ1,0,0,1 であって、そこに、左下(脚0の方向)から、その脚の状態を 0 に変化させるような ワームヘッドが入射した場合」のアクションであり、 + その内容は、 「確率1で、そのワームヘッドを 脚3の方向に散乱させて、 その方向の足の状態を 0 に変更する」ことを表している。 (つまり、この散乱が起こった場合、散乱後のバーテックスの状態は 0,0,0,0 になる。) + +``State /InitialConfiguration/Vertex/Algorithm`` + ワームヘッドが入ってくる前のバーテックスの初期状態を指定する。 + 具体的にはバーテックスの各脚の状態を指定する。 + 足の本数は、 ``NBody /Vertex`` で指定される数 (=m) の2倍なので、 2m 個数の整数値をスペースで区切ったものになる。 + その際、脚は対応するサイトの順序に並べる。 + 同じサイトに対応する2本の脚については、虚数時間の小さい側を先にする。 + (サイトの並び順は任意でよいが、 格子定義ファイルの ``I`` 要素で 指定されているサイトの並び順はここで用いられた サイトの順序と整合していなければならない。) + 各整数はバーテックスの足の状態を示す 0 から n-1 までの値。 (ここで、n は対応するサイトの、 ``NumberOfStates/Site`` で指定される値。) + +``IncomingDirection /InitialConfiguration/Vertex/Algorithm`` + 入射するワームヘッドが入射前に乗っている脚の番号。 + 対応する足が上記 ``State`` の記述において何番目に出てくるかを 0 から 2m-1 の整数値で指定。 + +``NewState /InitialConfiguration/Vertex/Algorithm`` + ワームヘッドが通過したあとの ``IncomingDirection`` の足の状態。 0 から n-1 の整数値で指定。 + +``NumberOfChannels /InitialConfiguration/Vertex/Algorithm`` + 可能な散乱チャネルの個数。 + +``Channel /InitialConfiguration/Vertex/Algorithm`` + 散乱チャネルの定義。 + ``NumberOfChannels`` の個数だけこの要素が存在しなければならない。 + 2つの整数値と1つの浮動小数点値をスペースで区切ったもので指定。 + + - 第1の整数値は、散乱後のワームヘッドが乗っている足の番号を 0 から 2m-1 の値で指定したもの。 + - 第2の整数値は、ワームヘッドが飛び去ったあとのその足の状態を 0 から n-1 の値で指定したもの。 + - 第3の浮動小数点値は、そのチャネルを選ぶ確率。 + + 特別な場合として、ワームヘッドがテールに衝突して消滅する場合があり、この場合は 第1引数と第2引数に -1 を指定する。 diff --git a/doc/_build/html/_sources/dla/users-manual/output.rst.txt b/doc/_build/html/_sources/dla/users-manual/output.rst.txt new file mode 100755 index 00000000..a5b63c1a --- /dev/null +++ b/doc/_build/html/_sources/dla/users-manual/output.rst.txt @@ -0,0 +1,225 @@ +.. -*- coding: utf-8 -*- +.. highlight:: none + +DLA の出力ファイル +============================== + +フォーマット +***************************** +DLA は計算結果を行区切りのプレーンテキストファイルで出力する。 +行頭の文字はその行の意味を表している。 + +``P = `` + 入力パラメータファイルと格子ファイルから読み取ったパラメータ。 +``R = `` + 計算で求められた物理量。 ```` は平均値を、 ```` は標準誤差を示す。 +``I = `` + その他計算中に得られた情報。 +``C `` + コメント。 + +以下にサンプル(反強磁性ハイゼンベルグ鎖)を示す :: + + C This is DSQSS ver.1.2.0 + + P D = 1 + P L = 8 + P BETA = 10.0000000000000000 + P NSET = 10 + P NMCSE = 1000 + P NMCSD = 1000 + P NMCS = 1000 + P SEED = 198212240 + P NSEGMAX = 10000 + P NVERMAX = 10000 + P NCYC = 7 + P ALGFILE = algorithm.xml + P LATFILE = lattice.xml + P CFINPFILE = cf.xml + P SFINPFILE = sf.xml + P CKINPFILE = sf.xml + P OUTFILE = res.dat.000 + P CFOUTFILE = cfout.dat.000 + P SFOUTFILE = sfout.dat.000 + P CKOUTFILE = ckout.dat.000 + P SIMULATIONTIME = 0.000000 + R anv = 3.03805000e+00 1.25395375e-02 + R ene = -4.55991910e-01 1.20267537e-03 + R spe = -1.76672204e-02 4.09064489e-02 + R len = 1.20014021e+01 4.78403202e-02 + R xmx = 3.00035053e-01 1.19600800e-03 + R amzu = -2.00000000e-04 1.08972474e-04 + R bmzu = -2.00000000e-04 1.08972474e-04 + R smzu = 1.32382500e-03 1.40792745e-04 + R xmzu = 1.32382500e-02 1.40792745e-03 + R amzs = -9.25000000e-04 4.02247160e-03 + R bmzs = -2.03918502e-04 2.22828174e-03 + R smzs = 8.72503175e-01 8.93939492e-03 + R xmzs = 3.00500011e+00 2.99056535e-02 + R time = 9.01378000e-08 1.61529255e-09 + I [the maximum number of segments] = 123 + I [the maximum number of vertices] = 66 + I [the maximum number of reg. vertex info.] = 3 + +以下の物理量定義に現れる記号の意味を示す。 + +:math:`N_s` + サイト数。 + +:math:`Q(\vec{k})` + 格子点 :math:`i` 上で定義される任意の演算子 :math:`Q_i` のフーリエ変換。 + + :math:`\displaystyle Q(\vec{k}) \equiv \frac{1}{\sqrt{N_s}} \sum_i^{N_s} Q_i e^{-i\vec{r}_i\cdot\vec{k}}` + +:math:`Q(\tau)` + 虚時間 :math:`\tau` における演算子。 + + :math:`\displaystyle Q(\tau) \equiv \exp\left[\tau \mathcal{H}\right] Q(\tau=0) \exp\left[-\tau \mathcal{H}\right]` + +:math:`\tilde{Q}` + 任意の演算子 :math:`Q` について、虚時間方向の平均 :math:`\displaystyle \frac{1}{\beta}\int_0^\beta \! \mathrm{d} \tau Q(\tau)` + +:math:`M^z` + 局所自由度の量子化軸方向成分。 + たとえばスピン系では局在スピン演算子の :math:`z` 成分 :math:`S^z` であり、 + ボース粒子系では数演算子 :math:`n` である。 + +:math:`M^\pm` + :math:`M^z` の昇降演算子。 + スピン系では :math:`M^{\pm} \equiv S^\pm` 、 + ボース粒子系では生成消滅演算子 :math:`M^+ \equiv b^\dagger` および :math:`M^- \equiv b` 。 + +:math:`M^x` + 横磁化ないし非対角秩序変数。 + スピン系では :math:`M^x \equiv (S^+ + S^-)/2` 、 + ボース粒子系では :math:`M^x \equiv (b + b^\dagger)` 。 + +:math:`T` + 温度。 + +:math:`\beta` + 逆温度。 + +:math:`h` + :math:`M^z` に共役な外場。スピン系では縦磁場、ボース粒子系では化学ポテンシャル。 + +:math:`\left\langle Q \right\rangle` + 任意の演算子 :math:`Q` のグランドカノニカル平均。 + +メイン出力 +***************** +メイン出力ファイルは、入力パラメータファイルの ``outfile`` キーワードで指定した名前で出力される。 + +``anv`` + 平均バーテックス数。 + + :math:`\displaystyle \frac{\langle N_v \rangle}{N_s}` +``ene`` + エネルギー密度。 + + :math:`\displaystyle \epsilon \equiv \frac{1}{N_s}\left(E_0 - T\langle N_v\rangle\right)` +``spe`` + 比熱。 + + :math:`\displaystyle C_V \equiv \frac{\partial \epsilon}{\partial T}` +``len`` + 平均ワーム長さ。 +``xmx`` + 横感受率。 +``amzu`` + 「磁化」(uniform, :math:`\tau=0`)。 + + :math:`\displaystyle m^z \equiv \frac{1}{N_s} \sum_i^{N_s} M^z_i` としたときの + :math:`\left\langle m^z \right\rangle` 。 + +``bmzu`` + 「磁化」(uniform, :math:`\tau` 平均)。 :math:`\left\langle \tilde{m}^z \right\rangle` 。 + +``smzu`` + 構造因子(uniform)。 + + :math:`\displaystyle S^{zz}(\vec{k}=0) \equiv \frac{1}{N_s} + \sum_{i,j} e^{i \vec{k}\cdot(\vec{r}_i-\vec{r}_j)} \left[ + \left\langle M^z_i M^z_j\right\rangle + - \left\langle M_i^z \right\rangle \left\langle M_j^z \right\rangle + \right] \Bigg|_{\vec{k}=0} + = + N_s \left[ \left\langle (m^z)^2\right\rangle + - \left\langle m^z\right\rangle^2 \right]` + +``xmzu`` + 縦感受率(uniform)。 + + :math:`\displaystyle \chi^{zz}(\vec{k}=0, \omega=0) \equiv + \frac{\partial \left\langle \tilde{m}^z \right\rangle}{\partial h} = + \beta N_s\left[ \left\langle \left(\tilde{m}^z\right)^2\right\rangle + - \left\langle \tilde{m}^z\right\rangle^2 \right]` + +``amzs`` + 「磁化」("staggered", :math:`\tau=0`) + + :math:`\displaystyle m_s^z \equiv \frac{1}{N_s} \sum_i^{N_s} M_i^z + \cos\left( 2\pi \frac{\text{mtype}(i)}{N_\text{mtype}} \right)` + としたときの :math:`\left\langle m_s^z \right\rangle` 。 + ここで :math:`\text{mtype}(i)` は :math:`i` サイトの測定種類(格子ファイル参照)、 + :math:`N_\text{mtype}` は測定種類の総数。 + +``bmzu`` + 「磁化」("staggered", :math:`\tau` 平均)。 :math:`\left\langle \tilde{m}_s^z \right\rangle` 。 + +``smzs`` + 構造因子 ("staggered")。 + + :math:`\displaystyle S^{zz}(\vec{k}_s) = N_s \left[ \left\langle (m_s^z)^2 \right\rangle - \left\langle m_s^z \right\rangle^2 \right]` + +``xmzs`` + 縦感受率 ("staggered")。 + + :math:`\displaystyle \chi^{zz}(\vec{k}_s, \omega=0) + = \beta N_s \left[\left\langle (\tilde{m}_s^z)^2 \right\rangle - \left\langle \tilde{m}_s^z \right\rangle^2 \right]` + +構造因子出力ファイル +**************************************** +構造因子出力ファイルは、入力パラメータファイルの ``sfoutfile`` キーワードで指定した名前で出力される。 +このファイルには虚時間構造因子 + +.. math:: + S^{zz}(\vec{k},\tau) \equiv + \left\langle M^z(\vec{k}, \tau) M^z(-\vec{k}, 0) \right\rangle + - \left\langle M^z(\vec{k}, \tau)\right\rangle \left\langle M^z(-\vec{k}, 0)\right\rangle + +が出力される。 波数 :math:`\vec{k}` や虚時間 :math:`\tau` の値は物理量名を用いて :: + + R C0t0 = 1.32500000e-03 1.40929454e-04 + R C0t1 = 1.32500000e-03 1.40929454e-04 + R C1t0 = 7.35281032e-02 3.18028565e-04 + +のように ``Ct`` という形で区別される。 +ここで ```` は構造因子入力ファイルの ``kindex`` (``SF`` タグの最終要素) で指定される波数のインデックスで、 +```` は離散化した虚時間のインデックス。 + +実空間表示温度グリーン関数出力ファイル +**************************************** +実空間表示温度グリーン関数出力ファイルは、入力パラメータファイルの ``cfoutfile`` キーワードで指定した名前で出力される。 +このファイルには温度グリーン関数 + +.. math:: + G(\vec{r}_{ij},\tau) \equiv \left\langle M_i^+(\tau) M_j^- \right\rangle + +が出力される。 変位 :math:`\vec{r}_{ij}` や虚時間 :math:`\tau` の値は構造因子と同様に、 +``Ct`` という形で物理量名によって区別される。 +ここで ```` は実空間温度グリーン関数入力ファイルの ``kind`` (``CF`` タグの第一要素) で指定される変位のインデックスで、 +```` は離散化した虚時間のインデックス。 + +波数表示温度グリーン関数出力ファイル +**************************************** +波数表示温度グリーン関数出力ファイルは、入力パラメータファイルの ``ckoutfile`` キーワードで指定した名前で出力される。 +このファイルには温度グリーン関数 + +.. math:: + G(\vec{k},\tau) \equiv \left\langle M^+(\vec{k}, \tau) M^-(-\vec{k},0) \right\rangle + +が出力される。 波数 :math:`\vec{k}` や虚時間 :math:`\tau` の値は構造因子と同様に、 +``Ct`` という形で物理量名によって区別される。 +ここで ```` は波数表示温度グリーン関数入力ファイルの ``kindex`` (``SF`` タグの第一要素) で指定される変位のインデックスで、 +```` は離散化した虚時間のインデックス。 diff --git a/doc/_build/html/_sources/dsqss/about_dsqss.rst.txt b/doc/_build/html/_sources/dsqss/about_dsqss.rst.txt new file mode 100755 index 00000000..719720dd --- /dev/null +++ b/doc/_build/html/_sources/dsqss/about_dsqss.rst.txt @@ -0,0 +1,83 @@ +.. -*- coding: utf-8 -*- +.. highlight:: none + +DSQSSとは? +--------------- + +概要 +**************** +DSQSSは、連続虚数時間向き付きループアルゴリズムに基づく量子モンテカルロ法によって離散空間上で定義された量子多体問題を解くためのプログラムです。単位格子の情報、2体相互作用ハミルトニアンの行列要素などを入力ファイルとして広い範囲のモデルに対応しています。例えば、次元、格子の1辺の長さ、相互作用の異方性、スピンの大きさ、磁場の大きさ、温度などのパラメータを任意にとって、XXZハイゼンベルクモデルの計算を行うことができます。また、ボーズ系のシミュレーションも可能です。大規模並列化に対応したプログラム(PMWA)も含まれています。 + +DSQSSは、以下のサブシステム群から構成されています。 + +- シリアル版 + + 1. ハミルトニアン定義ファイルジェネレータ: ``hamgen_H`` (スピン系), ``hamgen_B`` (ボソン系) + 2. 格子定義ジェネレータ: ``lattgene`` + 3. アルゴリズムジェネレータ: ``dla_alg`` + 4. 量子モンテカルロ法エンジン(向き付きループアルゴリズム): ``dla_H`` (スピン系), ``dla_B`` (ボソン系) + +- 非自明並列版 + 1. 格子定義ジェネレータ: ``lattgene_P`` + 2. 量子モンテカルロ法エンジン(向き付きループアルゴリズム): ``pmwa_H`` (XXZ模型), ``pmwa_B`` (ハードコアボソン系) + +- ツール + 1. 入力一括作成ツール:dsqss_pre.py + +リリース情報 +**************** + +- 2015.11.20 dsqss-Ver.1.1.17+pmwa-Ver.1.1.2 GCCに対応, PMWA,configure修正,その他/toolのスクリプトを追加 +- 2014.03.28 Ver.1.1.16 シングルモード(非MPI環境)に対応 +- 2013.07.22 Ver.1.1.15 レプリカ交換法の不具合の修正、マニュアルの一部修正 +- 2013.01.10 Ver.1.1.14 メモリ増大の不具合の修正、マニュアルの一部修正 +- 2012.10.03 Ver.1.1.13 サンプルの追加、その他微修正 +- 2012.7.12 Ver.1.1.12 物性研システムBのMPI環境に対応したマクロを生成 +- 2012.6.7 Ver.1.1.11 doxygen,sphinxの自動生成makeの作成,その他微修正 +- 2012.3.25 Ver.1.1.10 exact_H.ccの修正、実行モジュール名hamgen_Hに変更 +- 2012.3.23 Ver.1.1.9 runConfigure、dla.ccの不具合修正 +- 2012.3.14 Ver.1.1.8 コードdla_alg.ccのコメント文修正 +- 2012.2.29 Ver.1.1.6 バグ修正、マニュアルの整備追加 +- 2011.9.30 Ver.1.1 レプリカ交換計算機能の追加 +- 2011.9.25 Ver.1.0.20 温度の規格化、GNU拡張の廃止等修正 +- 2011.3.31 Ver.1.0 + +開発者 +**************** + +- 加藤康之(東京大学工学系研究科) +- 川島直輝(東京大学物性研究所) +- 坂倉耕太(NEC) +- 鈴木隆史(兵庫県立大学工学研究科) +- 原田健自(京都大学情報学研究科) +- 正木晶子(日立研究所) +- 本山裕一(東京大学物性研究所) +- 吉見一慶(東京大学物性研究所) + +2018/08/10 現在 + +協力者 +**************** +- 大久保毅 (東京大学理学系研究科) +- 加藤岳生 (東京大学物性研究所) + +2018/08/10 現在 + +ライセンス +**************** +- GNU General Public License (GPL)に基づきます。 +- 利用のための必須条件ではありませんが,利用実態を把握したいので,科学計算などに使用した場合,関連公表論文の書誌情報などをアプリケーション管理者までお知らせ下さることを希望します.また,論文などによる成果公開に際して謝辞に記載していただければ幸いです. + +.. topic:: Acknowledgment Sample + + Numerical results in the present paper were obtained by the quantum Monte Carlo program DSQSS(https://github.com/qmc/dsqss/wiki). This package is distributed under GNU General Public License version 3 (GPL v3) or later. + + +謝辞 +**************** +本ソフトウェアの研究開発は、一部、次世代スパコンプロジェクト「次世代ナノ統合シミュレーションソフトウェア研究開発」および2018年度東京大学物性研究所ソフトウェア開発・高度化プロジェクトの援助によって行われました。ここに感謝の意を記します。 + +連絡・問い合わせ先 +**************** +GitHubページのissueもしくはDSQSS開発者用メーリングリストにご連絡ください。 +dsqss-dev@issp.u-tokyo.ac.jp diff --git a/doc/_build/html/_sources/dsqss/algorithm.rst.txt b/doc/_build/html/_sources/dsqss/algorithm.rst.txt new file mode 100755 index 00000000..7d720d25 --- /dev/null +++ b/doc/_build/html/_sources/dsqss/algorithm.rst.txt @@ -0,0 +1,12 @@ +.. -*- coding: utf-8 -*- +.. highlight:: none + +アルゴリズム +--------------- +経路積分サンプリング +******************** + +DSQSSでは,分配関数を + +と経路積分表示したのち,マルコフ過程によって状態 ''S'' を確率的時系列的に発生し,これをサンプリングしている. +ここで ''H'' は系を記述するハミルトニアンであり,「状態」とは ''d+1''次元時空上で定義された古典変数の 場である.(モデルが定義されている空間次元を ''d''として,これに虚数時間軸を加えたものを ''d+1'' 次元時空と呼ぶことにする.)「状態」を1つ定めることは,スピンや粒子の空間的な配置が虚数時間の増加に伴って変化>する経路を1つ定めることと等価であることから,状態 ''S'' は「経路」とも呼ばれる.ボーズ粒子系のように局所的な粒子数保存則が成立する場合に,状態を粒子の存在位置を実線でつないだ軌跡(=世界線)の集まりとして視 覚化することが多いため,経路積分のサンプリングによるモンテカルロ法は「世界線モンテカルロ法」とも呼ばれる.マルコフ過程の遷移確率は,定常分布における状態の出現頻度が上記の経路積分表示における重み ''W(S)'' に比例するように定義される.マルコフ過程で順次出現する状態を ''St(t=1,2,3....)'' としたとき,演算子 ''Q'' の期待値 diff --git a/doc/_build/html/_sources/dsqss/index.rst.txt b/doc/_build/html/_sources/dsqss/index.rst.txt new file mode 100755 index 00000000..3d7a367b --- /dev/null +++ b/doc/_build/html/_sources/dsqss/index.rst.txt @@ -0,0 +1,6 @@ +.. toctree:: + :maxdepth: 2 + + about_dsqss + install + diff --git a/doc/_build/html/_sources/dsqss/install.rst.txt b/doc/_build/html/_sources/dsqss/install.rst.txt new file mode 100755 index 00000000..459bf057 --- /dev/null +++ b/doc/_build/html/_sources/dsqss/install.rst.txt @@ -0,0 +1,93 @@ +.. -*- coding: utf-8 -*- +.. highlight:: none + +インストール +--------------- + +ダウンロード +******************** +- zipファイルをダウンロードする場合 + + DSQSSの最新版かは `こちら `_ からダウンロードできます。 + 「Clone or download」をクリックし、「Download ZIP」を選ぶとダウンロードが開始されます。 + +- gitを利用する場合 + + Gitを利用されている方は、端末から以下のコマンドを打つことで直接ダウンロードできます。 + + ``$ git clone https://github.com/qmc/dsqss.git`` + +フォルダ構造 +******************** +DSQSSのダウンロード後にzipファイルを解凍すると、以下のフォルダ構成で展開されます(gitを利用された方は、cloneを行ったファイル直下のフォルダ構成になります)。 + +:: + + ├── CMakeLists.txt + ├── LICENSE + ├── README.md + ├── config + │   ├── gcc.cmake + │   └── intel.cmake + ├── doc + │   ├── CMakeLists.txt + │   ├── _static + │   ├── conf.py + │   ├── dla + │   ├── dsqss + │   ├── index.rst + │   └── pmwa + ├── sample + │   ├── dla + │   └── pmwa + ├── src + │   ├── dla + │   ├── pmwa + │   └── third-party + │   └── boost + ├── test + │   ├── CMakeLists.txt + │   ├── dla + │   └── pmwa + └── tool +    ├── CMakeLists.txt +    └── dsqss_pre.py + + +インストール +******************** + +インストールは以下の手順で行うことが出来ます。 +以下、ダウンロードしたファイルの直下にいることを想定しています。 + +:: + + $ mkdir dsqss.build && cd dsqss.build + $ cmake ../ + $ make + + +デフォルト設定では ``/usr/local/bin`` がインストールディレクトリに設定されています。インストールするディレクトリを変更したい場合は、cmakeのコマンドを以下のように変更してください( ``cmake -DCMAKE_INSTALL_PREFIX=/path/to/install/to`` をインストールしたい先のパスに設定してください)。 + +:: + + $ cmake -DCMAKE_INSTALL_PREFIX=/path/to/install/to + + +これにより各実行ファイルが ``src`` フォルダ以下に作成されます。 +次に作成された実行ファイルが正常に動作するかテストするため、以下のコマンドを打ちます。 + + +:: + + $ make test + + +テストが100%通過したことが確認できた後、以下のコマンドを入力しインストールします。 + +:: + + $ make install + +インストール作業は以上で終了です。 +なお、インストール先のパスを変更した場合には、変更先のパスをexportすることでその場で実行できるようになります。 diff --git a/doc/_build/html/_sources/dsqss/tutorial.rst.txt b/doc/_build/html/_sources/dsqss/tutorial.rst.txt new file mode 100755 index 00000000..0d81293c --- /dev/null +++ b/doc/_build/html/_sources/dsqss/tutorial.rst.txt @@ -0,0 +1,8 @@ +.. -*- coding: utf-8 -*- +.. highlight:: none + +チュートリアル +--------------- +.. toctree:: + + sample_Heisenberg diff --git a/doc/_build/html/_sources/en/index.rst.txt b/doc/_build/html/_sources/en/index.rst.txt new file mode 100755 index 00000000..78c1caac --- /dev/null +++ b/doc/_build/html/_sources/en/index.rst.txt @@ -0,0 +1,50 @@ +.. DSQSS documentation master file, created by + sphinx-quickstart on Mon Jun 11 16:12:51 2018. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to DSQSS's documentation! +================================= + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + +About DSQSS +--------------------------------- +DSQSS is a program package for solving quantum many-body problems defined on lattices. It is based on the quantum Monte Carlo method in Feynman's path integral representation. It covers a broad range of problems taking input files that define arbitrary unit cells in arbitrary dimensions, and arbitrary matrix elements of the interactions among arbitrary number of degrees of freedom. + +License +-------------- +GNU General Public License (GPL) +The users are kindly requested to acknowledge the usage of this software in their publication, if any, based on the software, and let the developers know its reference information. + +.. topic:: Acknowledgment Sample + + Numerical results in the present paper were obtained by the quantum Monte Carlo program DSQSS(https://github.com/qmc/dsqss/wiki). This package is distributed under GNU General Public License version 3 (GPL v3) or later. + + +Acknowledgement +--------------- +Development of this software was and is being supported by K-computer project, and post-K computer projects. + +Download +-------- +You can download software and source codes of DSQSS from `GitHub page `_. + + +Contents +-------- +.. toctree:: + :maxdepth: 4 + :numbered: 4 + + dla/users-manual/index + pmwa/tutorial/tu-index + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`search` diff --git a/doc/_build/html/_sources/index.rst.txt b/doc/_build/html/_sources/index.rst.txt new file mode 100755 index 00000000..3f909026 --- /dev/null +++ b/doc/_build/html/_sources/index.rst.txt @@ -0,0 +1,28 @@ +.. DSQSS documentation master file, created by + sphinx-quickstart on Mon Jun 11 16:12:51 2018. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to DSQSS's documentation! +================================= + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + +Contents +-------- +.. toctree:: + :maxdepth: 4 + :numbered: 4 + + dsqss/index + dla/users-manual/index + pmwa/tutorial/tu-index + dsqss/algorithm + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`search` diff --git a/doc/_build/html/_sources/pmwa/tutorial/input.rst.txt b/doc/_build/html/_sources/pmwa/tutorial/input.rst.txt new file mode 100755 index 00000000..e39117b7 --- /dev/null +++ b/doc/_build/html/_sources/pmwa/tutorial/input.rst.txt @@ -0,0 +1,73 @@ +.. -*- coding: utf-8 -*- +.. highlight:: none + +入力ファイル +============================== + +DLAとPMWAの入力ファイルでは、共通するパラメータが多い。 +ここでDLAと使用方法が異なるもしくは新規に追加されたパラメータについて記載する。 + +- 計算条件のパラメータ + +.. csv-table:: + :header-rows: 1 + :widths: 1,1,4 + + Parameter, type, 備考 + RUNTYPE, int, 計算モード(0: 通常計算、1: リスタート計算) + CB, int , 初期配置 (0: Vacuum、1: Checker-Board、2: Random) + NTEST, int, ワーム数 (Number of Test) + NMCSE, int, 空回しをする数 (Number of Monte Carlo Steps Empty) + NMCS, int, 測定する際のモンテカルロステップ (Number of Monte Carlo Steps) + NMCSD, int, 測定間の間隔数 (Number of Monte Carlo Depart?) + SEED, int, 0以上の場合は実際に使用するシード、負の場合は乱数でシードを与える。 + NVERMAX, int, バーテックスの最大数 (デフォルト数 :math:`10^8` )、-1の場合は上限なし。 + NWORMAX, int, ワームの最大数 (デフォルト数 :math:`10^3` )、-1の場合は上限なし。 + SFINPFILE, str, 入力された場合、本ファイルで指定されたStructure Factorsを計算する。 + SFOUTFILE, str, 入力された場合、Structure Factorsを指定したファイルに出力する(デフォルトはsf.out)。 + Step_x, int, 相関関数を計算する場合の空間幅を与える(デフォルト:1)。 + Step_k, int, 波数表示の相関関数を計算する場合の波数空間幅を与える(デフォルト:1)。 + CFOUTFILE, str, 入力された場合、相関関数を指定したファイルに出力する(デフォルトはcf.out)。 + +ここで、NVERMAX、NWORMAXについては自動でリサイズして決定する(ver. 1.2.0で実装)。 + +- 相互作用関連のパラメータ + +.. csv-table:: + :header-rows: 1 + :widths: 1,1,4 + + Parameter, type, 備考 + tb, double , ボソン系では :math:`t_b` を、スピン系では :math:`J_{xy}` を表す。 + UBB, double, ボソン系で :math:`U_{BB}` を表す。スピン系では使用されない。 + VB1, double, ボソン系で :math:`V_{B1}` を、スピン系では :math:`J_{z}` を表す。 + VB2, double, ボソン系で :math:`V_{B2}` を表す。スピン系では使用されない。 + MU, double, ボソン系では :math:`\mu` を、スピン系では :math:`H` を表す。 + G, double, ボソン系では :math:`\Gamma` を、スピン系では :math:`\Gamma/2` を表す。 + NMAX, \-, 1に固定 + + +以下、入力ファイル例を記載する:: + + RUNTYPE = 0 + NSET = 10 + NMCSE = 10000 + NMCSD = 10000 + NMCS = 10000 + NTEST = 10000 + SEED = 31415 + NC = 0 + NVERMAX = 10000000 + NWORMAX = 1000 + algfile = algorithm.xml + latfile = lattice.xml + outfile = sample.log + CB = 2 + G = 0.3 + UBB = 0 + VB1 = 3 + VB2 = 0 + tb = 1 + MU = 2 + NMAX = 1 + diff --git a/doc/_build/html/_sources/pmwa/tutorial/intro.rst.txt b/doc/_build/html/_sources/pmwa/tutorial/intro.rst.txt new file mode 100755 index 00000000..ad2cecf5 --- /dev/null +++ b/doc/_build/html/_sources/pmwa/tutorial/intro.rst.txt @@ -0,0 +1,6 @@ +.. -*- coding: utf-8 -*- +.. highlight:: none + +PMWAとは? +--------------- +大規模並列計算向け非局所更新アルゴリズムを実装した世界線量子モンテカルロ法のパッケージ。有限温度の大規模格子系を取り扱うことができ、S=1/2量子多体系(XXZスピン模型、Heisenberg模型、横磁場Ising摸型などのスピン摸型やハードコア・ボース粒子系など)を統計誤差の範囲内で厳密に計算することができる。基本的には任意の物理量が測定可能だが、デフォルトではワームソース場有限の下でのエネルギー、縦磁化、横磁化、ワインディングナンバーなどの物理量だけでなく、虚時間S^zS^zスピン相関関数も測定できる。 diff --git a/doc/_build/html/_sources/pmwa/tutorial/lattgene.rst.txt b/doc/_build/html/_sources/pmwa/tutorial/lattgene.rst.txt new file mode 100755 index 00000000..f9008731 --- /dev/null +++ b/doc/_build/html/_sources/pmwa/tutorial/lattgene.rst.txt @@ -0,0 +1,35 @@ +.. -*- coding: utf-8 -*- +.. highlight:: none + +格子生成ツール:lattgene +============================== + +DSQSSでは標準的な模型に対して格子定義ファイル ``lattice.xml`` を生成するための簡易ツールとして ``lattgene`` を用意してあります。ここでは ``lattgene`` の使用方法について説明します。 + +``lattgene`` ではcubic latticeに関する格子定義ファイルを作成することが出来ます。 +指定するパラメータは下記の通りです。 + +.. csv-table:: + :header-rows: 1 + :widths: 1,1,4 + + Parameter, type, 備考 + D, int, 次元数 + L, int, 格子のサイズ(各次元について連続で指定します) + B, double, 逆温度 + NLdiv, int, Lの分割数 (各次元についてNLdivで等分割します) + NBdiv, int, Bの分割数 + NFIELD, int, 磁場の種類の数(デフォルト値は0) + + +分割数はMPIで使用するプロセス数に対応します(要確認)。 +使用例を以下に記載します。 + +1. 1次元8サイト, 逆温度10.0, 分割数は1の場合の格子ファイルを定義 + + ``$ lattgene 1 8 10.0 1 1`` + +2. 2次元4*4サイト, 逆温度10.0, 分割数は1の場合の格子ファイルを定義 + + ``$ lattgene 2 4 4 10.0 1 1`` + diff --git a/doc/_build/html/_sources/pmwa/tutorial/model.rst.txt b/doc/_build/html/_sources/pmwa/tutorial/model.rst.txt new file mode 100755 index 00000000..a7b198a0 --- /dev/null +++ b/doc/_build/html/_sources/pmwa/tutorial/model.rst.txt @@ -0,0 +1,32 @@ +.. -*- coding: utf-8 -*- +.. highlight:: none + +PMWAで扱える模型 +============================== +PMWAではハードコアボソン系(サイトに最大1つのボソン)とS=1/2のXXZ模型について計算可能である。ハードコアボソン系のハミルトニアンは + +.. math:: + {\cal H} &= -t_{b} \sum_{\langle i, j\rangle}b_i^{\dagger} b_j + U_{BB}\sum_i n_i(n_i -1) + +V_{B1}\sum_{\langle i, j\rangle} n_i n_j + V_{B2}\sum_{\langle\langle i, j\rangle\rangle} n_i n_j\\ + &+\mu\sum_i n_i-\Gamma\sum_i(b_i^{\dagger}+b_i), + +で与えられる。ここで、 :math:`\langle i,j \rangle` は最近接のペア、 :math:`\langle\langle i,j \rangle\rangle` は次次近接のペアをそれぞれ表す。 +S=1/2のXXZ模型は + +.. math:: + {\cal H}^{XXZ} = -J_{xy} \sum_{\langle i, j\rangle}(S_i^x S_j^x + S_i^y S_j^y)-J_z\sum_{\langle i, j\rangle}S_i^zS_j^z-H \sum_{i}S_{i}^z -\Gamma \sum_i S_i^x, + +で与えられる。 +入力ファイルで指定するパラメータと上記式のパラメータは以下のように対応する。 + + .. csv-table:: + :header-rows: 1 + :widths: 1,1,1 + + Parameter, Boson, Spin + tb, :math:`t_b`, :math:`J_{xy}` + UBB, :math:`U_{BB}`, `-` + VB1, :math:`V_{B1}`, :math:`J_{z}` + VB2, :math:`V_{B2}`, `-` + MU, :math:`\mu`, :math:`H` + G, :math:`\Gamma`, :math:`\Gamma/2` diff --git a/doc/_build/html/_sources/pmwa/tutorial/output.rst.txt b/doc/_build/html/_sources/pmwa/tutorial/output.rst.txt new file mode 100755 index 00000000..df7d3013 --- /dev/null +++ b/doc/_build/html/_sources/pmwa/tutorial/output.rst.txt @@ -0,0 +1,63 @@ +.. -*- coding: utf-8 -*- +.. highlight:: none + +出力ファイル +============================== +PMWAでは計算後、結果ファイル1つとリスタート用の一時ファイル2つ(evout_sample.log, RND_evout_sample.log)が出力される。 + +- 結果ファイル + + 多くのパラメータはDSQSSと同じである。ここではPMWAに特有もしくはDSQSSと異なったパラメータについて記載する。 + + .. csv-table:: + :header-rows: 1 + :widths: 1,1,4 + + 種別, Parameter, Description + P, L, 三次元の格子情報 + P, DOML, 並列化により分割されたドメインの大きさ + P, DOMBETA, 並列化により分割された逆温度のドメインサイズ + P, NDIVL, 格子の分割数 + P, NTEST, テストをするサンプルの数(詳細はモンテカルロ計算の箇所で説明) + I, the maximum number of vertices, バーテックスの最大数 + I, the maximum number of worms, ワームの最大数 + R, nver, キンクとワームの数 + R, nkin, キンクの数 + R, wndx, x方向のワインディング数の二乗の期待値 + R, wndy, y方向のワインディング数の二乗の期待値 + R, wndz, z方向のワインディング数の二乗の期待値 + R, wnd2, ワインディング数の二乗の総数(wndx+wndy+wndz) + R, bmxu, :math:`S_x` の期待値 (uniform :math:`\tau` 積分) + R, bmpu, :math:`S_+` の期待値 (uniform :math:`\tau` 積分) + R, bmmu, :math:`S_-` の期待値 (uniform :math:`\tau` 積分) + R, comp, 圧縮率 + R, lxmx, 各サイトの局所的なワーム数の揺らぎ + + ここで種別はP, I, RはParameter, Information, Resultをそれぞれ表す。 + +- リスタート用のファイル + + PMWAではリスタート機能が実装されており、下記の2ファイルが存在する場合には強制的にリスタートが行われる。 + 以下、各ファイルの出力内容について簡単に説明する。 + + 1. evout_sample.log + + 計算終了時のサイクル数、ワールドラインの情報、バーテックスの情報について出力したファイル。再計算時には読み込んだ配置を始条件として計算が行われる。:: + + 26 : 計算終了時のサイクル数 + 0 1 : ドメイン内のサイト0のワールドラインの情報 + i/N beta, (i+1)/N beta 区間のワールドラインの情報;0: down, 1: up + 0 0:ドメイン内のサイト1のワールドラインの情報 + 1 1:ドメイン内のサイト2のワールドラインの情報 + ... + 8 0.056997107 2 1 4 :バーテックスのラベル, tau, バーテックスの種類 , ワールドラインの本数, ボンド番号 + 9 0.056997107 2 0 5 + 44 0.28066013 2 1 3 + + ここでバーテックスの種類は-3: , -1: , 2: キンク, 4: , 5:にそれぞれ対応する。 + + 2. RNDevout_sample.log + + 乱数生成を行っているオブジェクトをバイナリ形式で出力したファイル。 + 再計算時には読み込んだ乱数情報を始条件として計算が行われる。 + diff --git a/doc/_build/html/_sources/pmwa/tutorial/reference.rst.txt b/doc/_build/html/_sources/pmwa/tutorial/reference.rst.txt new file mode 100755 index 00000000..37a6a501 --- /dev/null +++ b/doc/_build/html/_sources/pmwa/tutorial/reference.rst.txt @@ -0,0 +1,9 @@ +.. -*- coding: utf-8 -*- +.. highlight:: none + +リファレンス +---------- +.. toctree:: + + input + output diff --git a/doc/_build/html/_sources/pmwa/tutorial/sample_Heisenberg.rst.txt b/doc/_build/html/_sources/pmwa/tutorial/sample_Heisenberg.rst.txt new file mode 100755 index 00000000..56e20da8 --- /dev/null +++ b/doc/_build/html/_sources/pmwa/tutorial/sample_Heisenberg.rst.txt @@ -0,0 +1,31 @@ +.. -*- coding: utf-8 -*- +.. highlight:: none + +Sample1 : S=1/2 Heisenberg model +================================ +PMWAではS=1/2のXXZ模型について計算可能である。ハミルトニアンは下記のように与えられる。 +:math:`{\cal H}^{XXZ} = -J_{xy} \sum_{\langle i, j\rangle}(S_i^x S_j^x + S_i^y S_j^y)-J_z\sum_{\langle i, j\rangle}S_i^zS_j^z-H \sum_{i}S_{i}^z -\Gamma \sum_i S_i^x` + +現状ではボソン系のパラメータとの対応関係上、以下のパラメータで指定する。 + + .. csv-table:: + :header-rows: 1 + :widths: 1,1,1 + + Parameter, Spin, Boson + tb, :math:`J_{xy}`, :math:`t_b` + VB1, :math:`J_{z}`, :math:`V_{B1}` + MU, :math:`H`, :math:`\mu` + G, :math:`\Gamma/2`, :math:`2G` + + + +In the following, we consider the 2-site S=1/2 Heisenberg model given by +:math:`{\cal H} = J (S_0 \cdot S_1 + S_1 \cdot S_0) = 2J S_0\cdot S_1`, where :math:`J=0.5`. + +1. Generate input files + To execute DSQSS, we must make the input files for Hamiltonian, algorithm and lattice information. + For simple models, the executable files ``hamgen_H, dla_alg, latgene`` are prepared to generate the input files. + + - Generate a file for Hamiltonian. + ``$ hamgen_H 1 -0.5 0.0``. diff --git a/doc/_build/html/_sources/pmwa/tutorial/tu-index.rst.txt b/doc/_build/html/_sources/pmwa/tutorial/tu-index.rst.txt new file mode 100755 index 00000000..2015c173 --- /dev/null +++ b/doc/_build/html/_sources/pmwa/tutorial/tu-index.rst.txt @@ -0,0 +1,11 @@ +*************************** +PMWAのユーザーマニュアル +*************************** + +.. toctree:: + :maxdepth: 2 + + intro + usage + tutorial + reference diff --git a/doc/_build/html/_sources/pmwa/tutorial/tutorial.rst.txt b/doc/_build/html/_sources/pmwa/tutorial/tutorial.rst.txt new file mode 100755 index 00000000..0d81293c --- /dev/null +++ b/doc/_build/html/_sources/pmwa/tutorial/tutorial.rst.txt @@ -0,0 +1,8 @@ +.. -*- coding: utf-8 -*- +.. highlight:: none + +チュートリアル +--------------- +.. toctree:: + + sample_Heisenberg diff --git a/doc/_build/html/_sources/pmwa/tutorial/usage.rst.txt b/doc/_build/html/_sources/pmwa/tutorial/usage.rst.txt new file mode 100755 index 00000000..049bbf6b --- /dev/null +++ b/doc/_build/html/_sources/pmwa/tutorial/usage.rst.txt @@ -0,0 +1,20 @@ +.. -*- coding: utf-8 -*- +.. highlight:: none + +使用方法 +--------------- + +PMWAは以下の手順で使用します。 + +1. 格子定義ファイルの作成 (``lattgene_P`` を利用) +2. 入力ファイルの作成 +3. PMWAの実行 (ボソン系:``pmwa_B`` 、スピン系:``pmwa_H`` の実行) +4. 出力ファイルの生成 + +また、1, 2を同時に行うための簡易ツール ``dsqss_pre.py`` も用意されています。 +ここでは1-4について使用方法やパラメータについて順に説明します。 + +.. toctree:: + lattgene + model + diff --git a/doc/_build/html/_static/ajax-loader.gif b/doc/_build/html/_static/ajax-loader.gif new file mode 100755 index 00000000..61faf8ca Binary files /dev/null and b/doc/_build/html/_static/ajax-loader.gif differ diff --git a/doc/_build/html/_static/alabaster.css b/doc/_build/html/_static/alabaster.css new file mode 100755 index 00000000..07d15813 --- /dev/null +++ b/doc/_build/html/_static/alabaster.css @@ -0,0 +1,688 @@ +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: Georgia; + font-size: 17px; + background-color: #fff; + color: #000; + margin: 0; + padding: 0; +} + + +div.document { + width: 940px; + margin: 30px auto 0 auto; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 220px; +} + +div.sphinxsidebar { + width: 220px; + font-size: 14px; + line-height: 1.5; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + background-color: #fff; + color: #3E4349; + padding: 0 30px 0 30px; +} + +div.body > .section { + text-align: left; +} + +div.footer { + width: 940px; + margin: 20px auto 30px auto; + font-size: 14px; + color: #888; + text-align: right; +} + +div.footer a { + color: #888; +} + +p.caption { + font-family: inherit; + font-size: inherit; +} + + +div.relations { + display: none; +} + + +div.sphinxsidebar a { + color: #444; + text-decoration: none; + border-bottom: 1px dotted #999; +} + +div.sphinxsidebar a:hover { + border-bottom: 1px solid #999; +} + +div.sphinxsidebarwrapper { + padding: 18px 10px; +} + +div.sphinxsidebarwrapper p.logo { + padding: 0; + margin: -10px 0 0 0px; + text-align: center; +} + +div.sphinxsidebarwrapper h1.logo { + margin-top: -10px; + text-align: center; + margin-bottom: 5px; + text-align: left; +} + +div.sphinxsidebarwrapper h1.logo-name { + margin-top: 0px; +} + +div.sphinxsidebarwrapper p.blurb { + margin-top: 0; + font-style: normal; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: Georgia; + color: #444; + font-size: 24px; + font-weight: normal; + margin: 0 0 5px 0; + padding: 0; +} + +div.sphinxsidebar h4 { + font-size: 20px; +} + +div.sphinxsidebar h3 a { + color: #444; +} + +div.sphinxsidebar p.logo a, +div.sphinxsidebar h3 a, +div.sphinxsidebar p.logo a:hover, +div.sphinxsidebar h3 a:hover { + border: none; +} + +div.sphinxsidebar p { + color: #555; + margin: 10px 0; +} + +div.sphinxsidebar ul { + margin: 10px 0; + padding: 0; + color: #000; +} + +div.sphinxsidebar ul li.toctree-l1 > a { + font-size: 120%; +} + +div.sphinxsidebar ul li.toctree-l2 > a { + font-size: 110%; +} + +div.sphinxsidebar input { + border: 1px solid pink_1; + font-family: Georgia; + font-size: 1em; +} + +div.sphinxsidebar hr { + border: none; + height: 1px; + color: #AAA; + background: #AAA; + + text-align: left; + margin-left: 0; + width: 50%; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + text-decoration: underline; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: Georgia; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #DDD; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #EAEAEA; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + margin: 20px 0px; + padding: 10px 30px; + background-color: #EEE; + border: 1px solid #CCC; +} + +div.admonition tt.xref, div.admonition code.xref, div.admonition a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fafafa; +} + +div.admonition p.admonition-title { + font-family: Georgia; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight { + background-color: #fff; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.warning { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.danger { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.error { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.caution { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.attention { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.important { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.note { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.tip { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.hint { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.seealso { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.topic { + background-color: #EEE; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt, code { + font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.9em; +} + +.hll { + background-color: #FFC; + margin: 0 -12px; + padding: 0 12px; + display: block; +} + +img.screenshot { +} + +tt.descname, tt.descclassname, code.descname, code.descclassname { + font-size: 0.95em; +} + +tt.descname, code.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #EEE; + background: #FDFDFD; + font-size: 0.9em; +} + +table.footnote + table.footnote { + margin-top: -15px; + border-top: none; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.field-list p { + margin-bottom: 0.8em; +} + +/* Cloned from + * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68 + */ +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +table.footnote td.label { + width: .1px; + padding: 0.3em 0 0.3em 0.5em; +} + +table.footnote td { + padding: 0.3em 0.5em; +} + +dl { + margin: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +blockquote { + margin: 0 0 0 30px; + padding: 0; +} + +ul, ol { + /* Matches the 30px from the narrow-screen "li > ul" selector below */ + margin: 10px 0 10px 30px; + padding: 0; +} + +pre { + background: #EEE; + padding: 7px 30px; + margin: 15px 0px; + line-height: 1.3em; +} + +div.viewcode-block:target { + background: #ffd; +} + +dl pre, blockquote pre, li pre { + margin-left: 0; + padding-left: 30px; +} + +tt, code { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, code.xref, a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fff; +} + +a.reference { + text-decoration: none; + border-bottom: 1px dotted #004B6B; +} + +/* Don't put an underline on images */ +a.image-reference, a.image-reference:hover { + border-bottom: none; +} + +a.reference:hover { + border-bottom: 1px solid #6D4100; +} + +a.footnote-reference { + text-decoration: none; + font-size: 0.7em; + vertical-align: top; + border-bottom: 1px dotted #004B6B; +} + +a.footnote-reference:hover { + border-bottom: 1px solid #6D4100; +} + +a:hover tt, a:hover code { + background: #EEE; +} + + +@media screen and (max-width: 870px) { + + div.sphinxsidebar { + display: none; + } + + div.document { + width: 100%; + + } + + div.documentwrapper { + margin-left: 0; + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + } + + div.bodywrapper { + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + margin-left: 0; + } + + ul { + margin-left: 0; + } + + li > ul { + /* Matches the 30px from the "ul, ol" selector above */ + margin-left: 30px; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .bodywrapper { + margin: 0; + } + + .footer { + width: auto; + } + + .github { + display: none; + } + + + +} + + + +@media screen and (max-width: 875px) { + + body { + margin: 0; + padding: 20px 30px; + } + + div.documentwrapper { + float: none; + background: #fff; + } + + div.sphinxsidebar { + display: block; + float: none; + width: 102.5%; + margin: 50px -30px -20px -30px; + padding: 10px 20px; + background: #333; + color: #FFF; + } + + div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, + div.sphinxsidebar h3 a { + color: #fff; + } + + div.sphinxsidebar a { + color: #AAA; + } + + div.sphinxsidebar p.logo { + display: none; + } + + div.document { + width: 100%; + margin: 0; + } + + div.footer { + display: none; + } + + div.bodywrapper { + margin: 0; + } + + div.body { + min-height: 0; + padding: 0; + } + + .rtd_doc_footer { + display: none; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .footer { + width: auto; + } + + .github { + display: none; + } +} + + +/* misc. */ + +.revsys-inline { + display: none!important; +} + +/* Make nested-list/multi-paragraph items look better in Releases changelog + * pages. Without this, docutils' magical list fuckery causes inconsistent + * formatting between different release sub-lists. + */ +div#changelog > div.section > ul > li > p:only-child { + margin-bottom: 0; +} + +/* Hide fugly table cell borders in ..bibliography:: directive output */ +table.docutils.citation, table.docutils.citation td, table.docutils.citation th { + border: none; + /* Below needed in some edge cases; if not applied, bottom shadows appear */ + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + + +/* relbar */ + +.related { + line-height: 30px; + width: 100%; + font-size: 0.9rem; +} + +.related.top { + border-bottom: 1px solid #EEE; + margin-bottom: 20px; +} + +.related.bottom { + border-top: 1px solid #EEE; +} + +.related ul { + padding: 0; + margin: 0; + list-style: none; +} + +.related li { + display: inline; +} + +nav#rellinks { + float: right; +} + +nav#rellinks li+li:before { + content: "|"; +} + +nav#breadcrumbs li+li:before { + content: "\00BB"; +} + +/* Hide certain items when printing */ +@media print { + div.related { + display: none; + } +} \ No newline at end of file diff --git a/doc/_build/html/_static/basic.css b/doc/_build/html/_static/basic.css new file mode 100755 index 00000000..6df76b0a --- /dev/null +++ b/doc/_build/html/_static/basic.css @@ -0,0 +1,639 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox input[type="text"] { + width: 170px; +} + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li div.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px 7px 0 7px; + background-color: #ffe; + width: 40%; + float: right; +} + +p.sidebar-title { + font-weight: bold; +} + +/* -- topics ---------------------------------------------------------------- */ + +div.topic { + border: 1px solid #ccc; + padding: 7px 7px 0 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +div.admonition dl { + margin-bottom: 0; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + border: 0; + border-collapse: collapse; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +table.footnote td, table.footnote th { + border: 0 !important; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +dl { + margin-bottom: 15px; +} + +dd p { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dt:target, .highlighted { + background-color: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; +} + +td.linenos pre { + padding: 5px 0px; + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + margin-left: 0.5em; +} + +table.highlighttable td { + padding: 0 0.5em 0 0.5em; +} + +div.code-block-caption { + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +div.code-block-caption + div > div.highlight > pre { + margin-top: 0; +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + padding: 1em 1em 0; +} + +div.literal-block-wrapper div.highlight { + margin: 0; +} + +code.descname { + background-color: transparent; + font-weight: bold; + font-size: 1.2em; +} + +code.descclassname { + background-color: transparent; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: relative; + left: 0px; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/doc/_build/html/_static/comment-bright.png b/doc/_build/html/_static/comment-bright.png new file mode 100755 index 00000000..15e27edb Binary files /dev/null and b/doc/_build/html/_static/comment-bright.png differ diff --git a/doc/_build/html/_static/comment-close.png b/doc/_build/html/_static/comment-close.png new file mode 100755 index 00000000..4d91bcf5 Binary files /dev/null and b/doc/_build/html/_static/comment-close.png differ diff --git a/doc/_build/html/_static/comment.png b/doc/_build/html/_static/comment.png new file mode 100755 index 00000000..dfbc0cbd Binary files /dev/null and b/doc/_build/html/_static/comment.png differ diff --git a/doc/_build/html/_static/custom.css b/doc/_build/html/_static/custom.css new file mode 100755 index 00000000..2a924f1d --- /dev/null +++ b/doc/_build/html/_static/custom.css @@ -0,0 +1 @@ +/* This file intentionally left blank. */ diff --git a/doc/_build/html/_static/doctools.js b/doc/_build/html/_static/doctools.js new file mode 100755 index 00000000..56549772 --- /dev/null +++ b/doc/_build/html/_static/doctools.js @@ -0,0 +1,287 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for all documentation. + * + * :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/** + * select a different prefix for underscore + */ +$u = _.noConflict(); + +/** + * make the code below compatible with browsers without + * an installed firebug like debugger +if (!window.console || !console.firebug) { + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", + "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", + "profile", "profileEnd"]; + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {}; +} + */ + +/** + * small helper function to urldecode strings + */ +jQuery.urldecode = function(x) { + return decodeURIComponent(x).replace(/\+/g, ' '); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s == 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node) { + if (node.nodeType == 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { + var span = document.createElement("span"); + span.className = className; + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this); + }); + } + } + return this.each(function() { + highlight(this); + }); +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} + +/** + * Small JavaScript module for the documentation. + */ +var Documentation = { + + init : function() { + this.fixFirefoxAnchorBug(); + this.highlightSearchWords(); + this.initIndexTable(); + + }, + + /** + * i18n support + */ + TRANSLATIONS : {}, + PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, + LOCALE : 'unknown', + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext : function(string) { + var translated = Documentation.TRANSLATIONS[string]; + if (typeof translated == 'undefined') + return string; + return (typeof translated == 'string') ? translated : translated[0]; + }, + + ngettext : function(singular, plural, n) { + var translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated == 'undefined') + return (n == 1) ? singular : plural; + return translated[Documentation.PLURALEXPR(n)]; + }, + + addTranslations : function(catalog) { + for (var key in catalog.messages) + this.TRANSLATIONS[key] = catalog.messages[key]; + this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); + this.LOCALE = catalog.locale; + }, + + /** + * add context elements like header anchor links + */ + addContextElements : function() { + $('div[id] > :header:first').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this headline')). + appendTo(this); + }); + $('dt[id]').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this definition')). + appendTo(this); + }); + }, + + /** + * workaround a firefox stupidity + * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 + */ + fixFirefoxAnchorBug : function() { + if (document.location.hash) + window.setTimeout(function() { + document.location.href += ''; + }, 10); + }, + + /** + * highlight the search words provided in the url in the text + */ + highlightSearchWords : function() { + var params = $.getQueryParameters(); + var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; + if (terms.length) { + var body = $('div.body'); + if (!body.length) { + body = $('body'); + } + window.setTimeout(function() { + $.each(terms, function() { + body.highlightText(this.toLowerCase(), 'highlighted'); + }); + }, 10); + $('') + .appendTo($('#searchbox')); + } + }, + + /** + * init the domain index toggle buttons + */ + initIndexTable : function() { + var togglers = $('img.toggler').click(function() { + var src = $(this).attr('src'); + var idnum = $(this).attr('id').substr(7); + $('tr.cg-' + idnum).toggle(); + if (src.substr(-9) == 'minus.png') + $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); + else + $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); + }).css('display', ''); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { + togglers.click(); + } + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords : function() { + $('#searchbox .highlight-link').fadeOut(300); + $('span.highlighted').removeClass('highlighted'); + }, + + /** + * make the url absolute + */ + makeURL : function(relativeURL) { + return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; + }, + + /** + * get the current relative url + */ + getCurrentURL : function() { + var path = document.location.pathname; + var parts = path.split(/\//); + $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { + if (this == '..') + parts.pop(); + }); + var url = parts.join('/'); + return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + }, + + initOnKeyListeners: function() { + $(document).keyup(function(event) { + var activeElementType = document.activeElement.tagName; + // don't navigate when in search box or textarea + if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { + switch (event.keyCode) { + case 37: // left + var prevHref = $('link[rel="prev"]').prop('href'); + if (prevHref) { + window.location.href = prevHref; + return false; + } + case 39: // right + var nextHref = $('link[rel="next"]').prop('href'); + if (nextHref) { + window.location.href = nextHref; + return false; + } + } + } + }); + } +}; + +// quick alias for translations +_ = Documentation.gettext; + +$(document).ready(function() { + Documentation.init(); +}); \ No newline at end of file diff --git a/doc/_build/html/_static/down-pressed.png b/doc/_build/html/_static/down-pressed.png new file mode 100755 index 00000000..5756c8ca Binary files /dev/null and b/doc/_build/html/_static/down-pressed.png differ diff --git a/doc/_build/html/_static/down.png b/doc/_build/html/_static/down.png new file mode 100755 index 00000000..1b3bdad2 Binary files /dev/null and b/doc/_build/html/_static/down.png differ diff --git a/doc/_build/html/_static/file.png b/doc/_build/html/_static/file.png new file mode 100755 index 00000000..a858a410 Binary files /dev/null and b/doc/_build/html/_static/file.png differ diff --git a/doc/_build/html/_static/jquery-3.1.0.js b/doc/_build/html/_static/jquery-3.1.0.js new file mode 100755 index 00000000..f2fc2747 --- /dev/null +++ b/doc/_build/html/_static/jquery-3.1.0.js @@ -0,0 +1,10074 @@ +/*eslint-disable no-unused-vars*/ +/*! + * jQuery JavaScript Library v3.1.0 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2016-07-07T21:44Z + */ +( function( global, factory ) { + + "use strict"; + + if ( typeof module === "object" && typeof module.exports === "object" ) { + + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 +// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode +// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common +// enough that all such attempts are guarded in a try block. +"use strict"; + +var arr = []; + +var document = window.document; + +var getProto = Object.getPrototypeOf; + +var slice = arr.slice; + +var concat = arr.concat; + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var fnToString = hasOwn.toString; + +var ObjectFunctionString = fnToString.call( Object ); + +var support = {}; + + + + function DOMEval( code, doc ) { + doc = doc || document; + + var script = doc.createElement( "script" ); + + script.text = code; + doc.head.appendChild( script ).parentNode.removeChild( script ); + } +/* global Symbol */ +// Defining this global in .eslintrc would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module + + + +var + version = "3.1.0", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }, + + // Support: Android <=4.0 only + // Make sure we trim BOM and NBSP + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num != null ? + + // Return just the one element from the set + ( num < 0 ? this[ num + this.length ] : this[ num ] ) : + + // Return all the elements in a clean array + slice.call( this ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // Skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { + target = {}; + } + + // Extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = jQuery.isArray( copy ) ) ) ) { + + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray( src ) ? src : []; + + } else { + clone = src && jQuery.isPlainObject( src ) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + isFunction: function( obj ) { + return jQuery.type( obj ) === "function"; + }, + + isArray: Array.isArray, + + isWindow: function( obj ) { + return obj != null && obj === obj.window; + }, + + isNumeric: function( obj ) { + + // As of jQuery 3.0, isNumeric is limited to + // strings and numbers (primitives or objects) + // that can be coerced to finite numbers (gh-2662) + var type = jQuery.type( obj ); + return ( type === "number" || type === "string" ) && + + // parseFloat NaNs numeric-cast false positives ("") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + !isNaN( obj - parseFloat( obj ) ); + }, + + isPlainObject: function( obj ) { + var proto, Ctor; + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if ( !obj || toString.call( obj ) !== "[object Object]" ) { + return false; + } + + proto = getProto( obj ); + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if ( !proto ) { + return true; + } + + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; + return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; + }, + + isEmptyObject: function( obj ) { + + /* eslint-disable no-unused-vars */ + // See https://github.com/eslint/eslint/issues/6125 + var name; + + for ( name in obj ) { + return false; + } + return true; + }, + + type: function( obj ) { + if ( obj == null ) { + return obj + ""; + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; + }, + + // Evaluates a script in a global context + globalEval: function( code ) { + DOMEval( code ); + }, + + // Convert dashed to camelCase; used by the css and data modules + // Support: IE <=9 - 11, Edge 12 - 13 + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + // Support: Android <=4.0 only + trim: function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var tmp, args, proxy; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + now: Date.now, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; +} + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), +function( i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +} ); + +function isArrayLike( obj ) { + + // Support: real iOS 8.2 only (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = jQuery.type( obj ); + + if ( type === "function" || jQuery.isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.3.0 + * https://sizzlejs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2016-01-04 + */ +(function( window ) { + +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf as it's faster than native + // https://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + + // CSS escapes + // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // CSS string/identifier serialization + // https://drafts.csswg.org/cssom/#common-serializing-idioms + rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g, + fcssescape = function( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }, + + disabledAncestor = addCombinator( + function( elem ) { + return elem.disabled === true; + }, + { dir: "parentNode", next: "legend" } + ); + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var m, i, elem, nid, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { + + // ID selector + if ( (m = match[1]) ) { + + // Document context + if ( nodeType === 9 ) { + if ( (elem = context.getElementById( m )) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && (elem = newContext.getElementById( m )) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( (m = match[3]) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !compilerCache[ selector + " " ] && + (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + + if ( nodeType !== 1 ) { + newContext = context; + newSelector = selector; + + // qSA looks outside Element context, which is not what we want + // Thanks to Andrew Dupont for this workaround technique + // Support: IE <=8 + // Exclude object elements + } else if ( context.nodeName.toLowerCase() !== "object" ) { + + // Capture the context ID, setting it first if necessary + if ( (nid = context.getAttribute( "id" )) ) { + nid = nid.replace( rcssescape, fcssescape ); + } else { + context.setAttribute( "id", (nid = expando) ); + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + while ( i-- ) { + groups[i] = "#" + nid + " " + toSelector( groups[i] ); + } + newSelector = groups.join( "," ); + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key + " " ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */ +function assert( fn ) { + var el = document.createElement("fieldset"); + + try { + return !!fn( el ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( el.parentNode ) { + el.parentNode.removeChild( el ); + } + // release memory in IE + el = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = arr.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + a.sourceIndex - b.sourceIndex; + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */ +function createDisabledPseudo( disabled ) { + // Known :disabled false positives: + // IE: *[disabled]:not(button, input, select, textarea, optgroup, option, menuitem, fieldset) + // not IE: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function( elem ) { + + // Check form elements and option elements for explicit disabling + return "label" in elem && elem.disabled === disabled || + "form" in elem && elem.disabled === disabled || + + // Check non-disabled form elements for fieldset[disabled] ancestors + "form" in elem && elem.disabled === false && ( + // Support: IE6-11+ + // Ancestry is covered for us + elem.isDisabled === disabled || + + // Otherwise, assume any non-