From 469f4274a69638e721ef4f1cfa2ec8a000e5d70c Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Tue, 5 Mar 2024 16:59:54 +0000 Subject: [PATCH] build based on e34b34d --- dev/.documenter-siteinfo.json | 2 +- dev/assets/documenter.js | 923 ++++++++++-------- dev/assets/themes/documenter-dark.css | 2 +- dev/developing/index.html | 2 +- dev/generated/polynomial_inversion/index.html | 4 +- dev/generated/sine/index.html | 4 +- dev/index.html | 2 +- dev/objects.inv | 6 + dev/search_index.js | 2 +- 9 files changed, 557 insertions(+), 390 deletions(-) create mode 100644 dev/objects.inv diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index f1d0b25..2d99631 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-01-24T00:39:33","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-03-05T16:59:51","documenter_version":"1.3.0"}} \ No newline at end of file diff --git a/dev/assets/documenter.js b/dev/assets/documenter.js index f531160..c6562b5 100644 --- a/dev/assets/documenter.js +++ b/dev/assets/documenter.js @@ -4,7 +4,6 @@ requirejs.config({ 'highlight-julia': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/languages/julia.min', 'headroom': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.12.0/headroom.min', 'jqueryui': 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min', - 'minisearch': 'https://cdn.jsdelivr.net/npm/minisearch@6.1.0/dist/umd/index.min', 'katex-auto-render': 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/contrib/auto-render.min', 'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min', 'headroom-jquery': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.12.0/jQuery.headroom.min', @@ -103,9 +102,10 @@ $(document).on("click", ".docstring header", function () { }); }); -$(document).on("click", ".docs-article-toggle-button", function () { +$(document).on("click", ".docs-article-toggle-button", function (event) { let articleToggleTitle = "Expand docstring"; let navArticleToggleTitle = "Expand all docstrings"; + let animationSpeed = event.noToggleAnimation ? 0 : 400; debounce(() => { if (isExpanded) { @@ -116,7 +116,7 @@ $(document).on("click", ".docs-article-toggle-button", function () { isExpanded = false; - $(".docstring section").slideUp(); + $(".docstring section").slideUp(animationSpeed); } else { $(this).removeClass("fa-chevron-down").addClass("fa-chevron-up"); $(".docstring-article-toggle-button") @@ -127,7 +127,7 @@ $(document).on("click", ".docs-article-toggle-button", function () { articleToggleTitle = "Collapse docstring"; navArticleToggleTitle = "Collapse all docstrings"; - $(".docstring section").slideDown(); + $(".docstring section").slideDown(animationSpeed); } $(this).prop("title", navArticleToggleTitle); @@ -224,224 +224,465 @@ $(document).ready(function () { }) //////////////////////////////////////////////////////////////////////////////// -require(['jquery', 'minisearch'], function($, minisearch) { - -// In general, most search related things will have "search" as a prefix. -// To get an in-depth about the thought process you can refer: https://hetarth02.hashnode.dev/series/gsoc +require(['jquery'], function($) { -let results = []; -let timer = undefined; +$(document).ready(function () { + let meta = $("div[data-docstringscollapsed]").data(); -let data = documenterSearchIndex["docs"].map((x, key) => { - x["id"] = key; // minisearch requires a unique for each object - return x; + if (meta?.docstringscollapsed) { + $("#documenter-article-toggle-button").trigger({ + type: "click", + noToggleAnimation: true, + }); + } }); -// list below is the lunr 2.1.3 list minus the intersect with names(Base) -// (all, any, get, in, is, only, which) and (do, else, for, let, where, while, with) -// ideally we'd just filter the original list but it's not available as a variable -const stopWords = new Set([ - "a", - "able", - "about", - "across", - "after", - "almost", - "also", - "am", - "among", - "an", - "and", - "are", - "as", - "at", - "be", - "because", - "been", - "but", - "by", - "can", - "cannot", - "could", - "dear", - "did", - "does", - "either", - "ever", - "every", - "from", - "got", - "had", - "has", - "have", - "he", - "her", - "hers", - "him", - "his", - "how", - "however", - "i", - "if", - "into", - "it", - "its", - "just", - "least", - "like", - "likely", - "may", - "me", - "might", - "most", - "must", - "my", - "neither", - "no", - "nor", - "not", - "of", - "off", - "often", - "on", - "or", - "other", - "our", - "own", - "rather", - "said", - "say", - "says", - "she", - "should", - "since", - "so", - "some", - "than", - "that", - "the", - "their", - "them", - "then", - "there", - "these", - "they", - "this", - "tis", - "to", - "too", - "twas", - "us", - "wants", - "was", - "we", - "were", - "what", - "when", - "who", - "whom", - "why", - "will", - "would", - "yet", - "you", - "your", -]); - -let index = new minisearch({ - fields: ["title", "text"], // fields to index for full-text search - storeFields: ["location", "title", "text", "category", "page"], // fields to return with search results - processTerm: (term) => { - let word = stopWords.has(term) ? null : term; - if (word) { - // custom trimmer that doesn't strip @ and !, which are used in julia macro and function names - word = word - .replace(/^[^a-zA-Z0-9@!]+/, "") - .replace(/[^a-zA-Z0-9@!]+$/, ""); - } +}) +//////////////////////////////////////////////////////////////////////////////// +require(['jquery'], function($) { - return word ?? null; - }, - // add . as a separator, because otherwise "title": "Documenter.Anchors.add!", would not find anything if searching for "add!", only for the entire qualification - tokenize: (string) => string.split(/[\s\-\.]+/), - // options which will be applied during the search - searchOptions: { - boost: { title: 100 }, - fuzzy: 2, +/* +To get an in-depth about the thought process you can refer: https://hetarth02.hashnode.dev/series/gsoc + +PSEUDOCODE: + +Searching happens automatically as the user types or adjusts the selected filters. +To preserve responsiveness, as much as possible of the slow parts of the search are done +in a web worker. Searching and result generation are done in the worker, and filtering and +DOM updates are done in the main thread. The filters are in the main thread as they should +be very quick to apply. This lets filters be changed without re-searching with minisearch +(which is possible even if filtering is on the worker thread) and also lets filters be +changed _while_ the worker is searching and without message passing (neither of which are +possible if filtering is on the worker thread) + +SEARCH WORKER: + +Import minisearch + +Build index + +On message from main thread + run search + find the first 200 unique results from each category, and compute their divs for display + note that this is necessary and sufficient information for the main thread to find the + first 200 unique results from any given filter set + post results to main thread + +MAIN: + +Launch worker + +Declare nonconstant globals (worker_is_running, last_search_text, unfiltered_results) + +On text update + if worker is not running, launch_search() + +launch_search + set worker_is_running to true, set last_search_text to the search text + post the search query to worker + +on message from worker + if last_search_text is not the same as the text in the search field, + the latest search result is not reflective of the latest search query, so update again + launch_search() + otherwise + set worker_is_running to false + + regardless, display the new search results to the user + save the unfiltered_results as a global + update_search() + +on filter click + adjust the filter selection + update_search() + +update_search + apply search filters by looping through the unfiltered_results and finding the first 200 + unique results that match the filters + + Update the DOM +*/ + +/////// SEARCH WORKER /////// + +function worker_function(documenterSearchIndex, documenterBaseURL, filters) { + importScripts( + "https://cdn.jsdelivr.net/npm/minisearch@6.1.0/dist/umd/index.min.js" + ); + + let data = documenterSearchIndex.map((x, key) => { + x["id"] = key; // minisearch requires a unique for each object + return x; + }); + + // list below is the lunr 2.1.3 list minus the intersect with names(Base) + // (all, any, get, in, is, only, which) and (do, else, for, let, where, while, with) + // ideally we'd just filter the original list but it's not available as a variable + const stopWords = new Set([ + "a", + "able", + "about", + "across", + "after", + "almost", + "also", + "am", + "among", + "an", + "and", + "are", + "as", + "at", + "be", + "because", + "been", + "but", + "by", + "can", + "cannot", + "could", + "dear", + "did", + "does", + "either", + "ever", + "every", + "from", + "got", + "had", + "has", + "have", + "he", + "her", + "hers", + "him", + "his", + "how", + "however", + "i", + "if", + "into", + "it", + "its", + "just", + "least", + "like", + "likely", + "may", + "me", + "might", + "most", + "must", + "my", + "neither", + "no", + "nor", + "not", + "of", + "off", + "often", + "on", + "or", + "other", + "our", + "own", + "rather", + "said", + "say", + "says", + "she", + "should", + "since", + "so", + "some", + "than", + "that", + "the", + "their", + "them", + "then", + "there", + "these", + "they", + "this", + "tis", + "to", + "too", + "twas", + "us", + "wants", + "was", + "we", + "were", + "what", + "when", + "who", + "whom", + "why", + "will", + "would", + "yet", + "you", + "your", + ]); + + let index = new MiniSearch({ + fields: ["title", "text"], // fields to index for full-text search + storeFields: ["location", "title", "text", "category", "page"], // fields to return with results processTerm: (term) => { let word = stopWords.has(term) ? null : term; if (word) { + // custom trimmer that doesn't strip @ and !, which are used in julia macro and function names word = word .replace(/^[^a-zA-Z0-9@!]+/, "") .replace(/[^a-zA-Z0-9@!]+$/, ""); + + word = word.toLowerCase(); } return word ?? null; }, + // add . as a separator, because otherwise "title": "Documenter.Anchors.add!", would not + // find anything if searching for "add!", only for the entire qualification tokenize: (string) => string.split(/[\s\-\.]+/), - }, -}); + // options which will be applied during the search + searchOptions: { + prefix: true, + boost: { title: 100 }, + fuzzy: 2, + }, + }); -index.addAll(data); + index.addAll(data); + + /** + * Used to map characters to HTML entities. + * Refer: https://github.com/lodash/lodash/blob/main/src/escape.ts + */ + const htmlEscapes = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + }; + + /** + * Used to match HTML entities and HTML characters. + * Refer: https://github.com/lodash/lodash/blob/main/src/escape.ts + */ + const reUnescapedHtml = /[&<>"']/g; + const reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** + * Escape function from lodash + * Refer: https://github.com/lodash/lodash/blob/main/src/escape.ts + */ + function escape(string) { + return string && reHasUnescapedHtml.test(string) + ? string.replace(reUnescapedHtml, (chr) => htmlEscapes[chr]) + : string || ""; + } -let filters = [...new Set(data.map((x) => x.category))]; -var modal_filters = make_modal_body_filters(filters); -var filter_results = []; + /** + * Make the result component given a minisearch result data object and the value + * of the search input as queryString. To view the result object structure, refer: + * https://lucaong.github.io/minisearch/modules/_minisearch_.html#searchresult + * + * @param {object} result + * @param {string} querystring + * @returns string + */ + function make_search_result(result, querystring) { + let search_divider = `
`; + let display_link = + result.location.slice(Math.max(0), Math.min(50, result.location.length)) + + (result.location.length > 30 ? "..." : ""); // To cut-off the link because it messes with the overflow of the whole div + + if (result.page !== "") { + display_link += ` (${result.page})`; + } -$(document).on("keyup", ".documenter-search-input", function (event) { - // Adding a debounce to prevent disruptions from super-speed typing! - debounce(() => update_search(filter_results), 300); + let textindex = new RegExp(`${querystring}`, "i").exec(result.text); + let text = + textindex !== null + ? result.text.slice( + Math.max(textindex.index - 100, 0), + Math.min( + textindex.index + querystring.length + 100, + result.text.length + ) + ) + : ""; // cut-off text before and after from the match + + text = text.length ? escape(text) : ""; + + let display_result = text.length + ? "..." + + text.replace( + new RegExp(`${escape(querystring)}`, "i"), // For first occurrence + '$&' + ) + + "..." + : ""; // highlights the match + + let in_code = false; + if (!["page", "section"].includes(result.category.toLowerCase())) { + in_code = true; + } + + // We encode the full url to escape some special characters which can lead to broken links + let result_div = ` + +
+
${escape(result.title)}
+
${result.category}
+
+

+ ${display_result} +

+
+ ${display_link} +
+
+ ${search_divider} + `; + + return result_div; + } + + self.onmessage = function (e) { + let query = e.data; + let results = index.search(query, { + filter: (result) => { + // Only return relevant results + return result.score >= 1; + }, + }); + + // Pre-filter to deduplicate and limit to 200 per category to the extent + // possible without knowing what the filters are. + let filtered_results = []; + let counts = {}; + for (let filter of filters) { + counts[filter] = 0; + } + let present = {}; + + for (let result of results) { + cat = result.category; + cnt = counts[cat]; + if (cnt < 200) { + id = cat + "---" + result.location; + if (present[id]) { + continue; + } + present[id] = true; + filtered_results.push({ + location: result.location, + category: cat, + div: make_search_result(result, query), + }); + } + } + + postMessage(filtered_results); + }; +} + +// `worker = Threads.@spawn worker_function(documenterSearchIndex)`, but in JavaScript! +const filters = [ + ...new Set(documenterSearchIndex["docs"].map((x) => x.category)), +]; +const worker_str = + "(" + + worker_function.toString() + + ")(" + + JSON.stringify(documenterSearchIndex["docs"]) + + "," + + JSON.stringify(documenterBaseURL) + + "," + + JSON.stringify(filters) + + ")"; +const worker_blob = new Blob([worker_str], { type: "text/javascript" }); +const worker = new Worker(URL.createObjectURL(worker_blob)); + +/////// SEARCH MAIN /////// + +// Whether the worker is currently handling a search. This is a boolean +// as the worker only ever handles 1 or 0 searches at a time. +var worker_is_running = false; + +// The last search text that was sent to the worker. This is used to determine +// if the worker should be launched again when it reports back results. +var last_search_text = ""; + +// The results of the last search. This, in combination with the state of the filters +// in the DOM, is used compute the results to display on calls to update_search. +var unfiltered_results = []; + +// Which filter is currently selected +var selected_filter = ""; + +$(document).on("input", ".documenter-search-input", function (event) { + if (!worker_is_running) { + launch_search(); + } }); +function launch_search() { + worker_is_running = true; + last_search_text = $(".documenter-search-input").val(); + worker.postMessage(last_search_text); +} + +worker.onmessage = function (e) { + if (last_search_text !== $(".documenter-search-input").val()) { + launch_search(); + } else { + worker_is_running = false; + } + + unfiltered_results = e.data; + update_search(); +}; + $(document).on("click", ".search-filter", function () { if ($(this).hasClass("search-filter-selected")) { - $(this).removeClass("search-filter-selected"); + selected_filter = ""; } else { - $(this).addClass("search-filter-selected"); + selected_filter = $(this).text().toLowerCase(); } - // Adding a debounce to prevent disruptions from crazy clicking! - debounce(() => get_filters(), 300); + // This updates search results and toggles classes for UI: + update_search(); }); -/** - * A debounce function, takes a function and an optional timeout in milliseconds - * - * @function callback - * @param {number} timeout - */ -function debounce(callback, timeout = 300) { - clearTimeout(timer); - timer = setTimeout(callback, timeout); -} - /** * Make/Update the search component - * - * @param {string[]} selected_filters */ -function update_search(selected_filters = []) { - let initial_search_body = ` -
Type something to get started!
- `; - +function update_search() { let querystring = $(".documenter-search-input").val(); if (querystring.trim()) { - results = index.search(querystring, { - filter: (result) => { - // Filtering results - if (selected_filters.length === 0) { - return result.score >= 1; - } else { - return ( - result.score >= 1 && selected_filters.includes(result.category) - ); - } - }, - }); + if (selected_filter == "") { + results = unfiltered_results; + } else { + results = unfiltered_results.filter((result) => { + return selected_filter == result.category.toLowerCase(); + }); + } let search_result_container = ``; + let modal_filters = make_modal_body_filters(); let search_divider = `
`; if (results.length) { @@ -449,19 +690,23 @@ function update_search(selected_filters = []) { let count = 0; let search_results = ""; - results.forEach(function (result) { - if (result.location) { - // Checking for duplication of results for the same page - if (!links.includes(result.location)) { - search_results += make_search_result(result, querystring); - count++; - } - + for (var i = 0, n = results.length; i < n && count < 200; ++i) { + let result = results[i]; + if (result.location && !links.includes(result.location)) { + search_results += result.div; + count++; links.push(result.location); } - }); + } - let result_count = `
${count} result(s)
`; + if (count == 1) { + count_str = "1 result"; + } else if (count == 200) { + count_str = "200+ results"; + } else { + count_str = count + " results"; + } + let result_count = `
${count_str}
`; search_result_container = `
@@ -490,125 +735,37 @@ function update_search(selected_filters = []) { $(".search-modal-card-body").html(search_result_container); } else { - filter_results = []; - modal_filters = make_modal_body_filters(filters, filter_results); - if (!$(".search-modal-card-body").hasClass("is-justify-content-center")) { $(".search-modal-card-body").addClass("is-justify-content-center"); } - $(".search-modal-card-body").html(initial_search_body); + $(".search-modal-card-body").html(` +
Type something to get started!
+ `); } } /** * Make the modal filter html * - * @param {string[]} filters - * @param {string[]} selected_filters * @returns string */ -function make_modal_body_filters(filters, selected_filters = []) { - let str = ``; - - filters.forEach((val) => { - if (selected_filters.includes(val)) { - str += `${val}`; - } else { - str += `${val}`; - } - }); +function make_modal_body_filters() { + let str = filters + .map((val) => { + if (selected_filter == val.toLowerCase()) { + return `${val}`; + } else { + return `${val}`; + } + }) + .join(""); - let filter_html = ` + return `
Filters: ${str} -
- `; - - return filter_html; -} - -/** - * Make the result component given a minisearch result data object and the value of the search input as queryString. - * To view the result object structure, refer: https://lucaong.github.io/minisearch/modules/_minisearch_.html#searchresult - * - * @param {object} result - * @param {string} querystring - * @returns string - */ -function make_search_result(result, querystring) { - let search_divider = `
`; - let display_link = - result.location.slice(Math.max(0), Math.min(50, result.location.length)) + - (result.location.length > 30 ? "..." : ""); // To cut-off the link because it messes with the overflow of the whole div - - if (result.page !== "") { - display_link += ` (${result.page})`; - } - - let textindex = new RegExp(`\\b${querystring}\\b`, "i").exec(result.text); - let text = - textindex !== null - ? result.text.slice( - Math.max(textindex.index - 100, 0), - Math.min( - textindex.index + querystring.length + 100, - result.text.length - ) - ) - : ""; // cut-off text before and after from the match - - let display_result = text.length - ? "..." + - text.replace( - new RegExp(`\\b${querystring}\\b`, "i"), // For first occurrence - '$&' - ) + - "..." - : ""; // highlights the match - - let in_code = false; - if (!["page", "section"].includes(result.category.toLowerCase())) { - in_code = true; - } - - // We encode the full url to escape some special characters which can lead to broken links - let result_div = ` - -
-
${result.title}
-
${result.category}
-
-

- ${display_result} -

-
- ${display_link} -
-
- ${search_divider} - `; - - return result_div; -} - -/** - * Get selected filters, remake the filter html and lastly update the search modal - */ -function get_filters() { - let ele = $(".search-filters .search-filter-selected").get(); - filter_results = ele.map((x) => $(x).text().toLowerCase()); - modal_filters = make_modal_body_filters(filters, filter_results); - update_search(filter_results); +
`; } }) @@ -635,103 +792,107 @@ $(document).ready(function () { //////////////////////////////////////////////////////////////////////////////// require(['jquery'], function($) { -let search_modal_header = ` - -`; - -let initial_search_body = ` -
Type something to get started!
-`; - -let search_modal_footer = ` - -`; - -$(document.body).append( - ` - diff --git a/dev/generated/sine/index.html b/dev/generated/sine/index.html index 973cdad..034ca81 100644 --- a/dev/generated/sine/index.html +++ b/dev/generated/sine/index.html @@ -1,7 +1,7 @@ Sine function · DACE.jl

Sine example

This is a simple DACE example using the sine function, which demonstrates:

  • How to load DACE.jl
  • How to initialise the DACE library
  • How to create a DA object
  • How to compute the sine of a DA object
  • How to print a DA object to screen
  • How to evaluate a DA object

Install dependencies

Make sure the required packages are installed

using Pkg
 Pkg.add("https://github.com/chrisdjscott/DACE_jll.jl.git")
-Pkg.add("https://github.com/chrisdjscott/DACE.jl.git")

Using DACE

Write

using DACE

to load DACE functions and objects into our script.

Initialise DACE for 20th-order computations in 1 variable

DACE.init(20, 1)

Initialise x as a DA object

x = DACE.DA(1)
     I  COEFFICIENT              ORDER EXPONENTS
+Pkg.add("https://github.com/chrisdjscott/DACE.jl.git")

Using DACE

Write

using DACE

to load DACE functions and objects into our script.

Initialise DACE for 20th-order computations in 1 variable

DACE.init(20, 1)

Initialise x as a DA object

x = DACE.DA(1, 1)
     I  COEFFICIENT              ORDER EXPONENTS
      1    1.0000000000000000e+00   1   1
 ------------------------------------------------
 

Initialise y as the Taylor expansion of sin(x)

y = sin(x)
     I  COEFFICIENT              ORDER EXPONENTS
@@ -39,4 +39,4 @@
 

Evaluate y at 1.0 and compare with the builtin sin function.

println("  y(1.0) = $(DACE.evalScalar(y, 1.0))")
 println("sin(1.0) = $(sin(1.0))")
  y(1.0) = 0.8414709848078965
 sin(1.0) = 0.8414709848078965
-

This page was generated using Literate.jl.

+

This page was generated using Literate.jl.

diff --git a/dev/index.html b/dev/index.html index 7a1e9b3..c77477c 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,3 +1,3 @@ Home · DACE.jl

DACE.jl

Warning

This package is still in development, is not complete and instructions may change significantly

This is the documentation page for DACE.jl, a Julia interface to the DACE library.

Getting started

DACE.jl can be installed using the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run

pkg> add https://github.com/chrisdjscott/DACE_jll.jl.git
-pkg> add https://github.com/chrisdjscott/DACE.jl.git

Note: the second add command above may not be needed if you are running from main directory of the repository.

Notes about the interface

  • The Julia interface is built using CxxWrap.jl
  • The C++ source for the interface is currently in this fork of the DACE library
  • The C++ code gets built and released to the DACE_jll package
    • DACE_jll is located here
    • the build recipe is currently here
  • The Julia component of the interface is currently here

The above may change, in particular we hope to:

  • merge the forked DACE library back to upstream, if possible
  • release the DACE_jll package with Yggdrasil
  • move the DACE.jl package under the dacelib organisation on GitHub, if possible
+pkg> add https://github.com/chrisdjscott/DACE.jl.git

Note: the second add command above may not be needed if you are running from main directory of the repository.

Notes about the interface

The above may change, in particular we hope to:

diff --git a/dev/objects.inv b/dev/objects.inv new file mode 100644 index 0000000..5202190 --- /dev/null +++ b/dev/objects.inv @@ -0,0 +1,6 @@ +# Sphinx inventory version 2 +# Project: DACE.jl +# Version: 0.1.0 +# The remainder of this file is compressed using zlib. +xuQMO0 WXk(BL^ 7o4TYۅ[a ] ߀~x)Cgb[α봂:UK2U%Rv'׈n=8YugB>%fy +y> Vewd~8R=*=d1D10՘EWN-垸j4HC/k(X.*^Id,"Q|zaU: {TuBِTn \ No newline at end of file diff --git a/dev/search_index.js b/dev/search_index.js index 16214ea..2c9d888 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"developing/#Developing","page":"Developing","title":"Developing","text":"","category":"section"},{"location":"developing/#Releasing-the-DACE_jll.jl-package","page":"Developing","title":"Releasing the DACE_jll.jl package","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"warning: Warning\nThis will change once released to upstream Yggdrasil","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The DACE_jll build recipe is currently in my fork/branch of the Yggdrasil repo here.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"In that directory there is a build_tarballs.jl file which defines the build, including the CMake command and options to build the DACE C++ library.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"To build the library and deploy it, run:","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"julia --color=yes build_tarballs.jl --verbose --deploy=\"chrisdjscott/DACE_jll.jl\"","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"EditURL = \"../../../examples/polynomial_inversion.jl\"","category":"page"},{"location":"generated/polynomial_inversion/#Polynomial-inversion","page":"Polynomial inversion","title":"Polynomial inversion","text":"","category":"section"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"This is a DACE example showing polynomial inversion, demonstrating:","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"How to load DACE.jl\nHow to initialise the DACE library\nHow to create a DA object\nHow to create an AlgebraicVector\nHow to invert a Taylor polynomial","category":"page"},{"location":"generated/polynomial_inversion/#Install-dependencies","page":"Polynomial inversion","title":"Install dependencies","text":"","category":"section"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Make sure the required packages are installed","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"using Pkg\nPkg.add(\"https://github.com/chrisdjscott/DACE_jll.jl.git\")\nPkg.add(\"https://github.com/chrisdjscott/DACE.jl.git\")","category":"page"},{"location":"generated/polynomial_inversion/#Using-DACE","page":"Polynomial inversion","title":"Using DACE","text":"","category":"section"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Write","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"using DACE","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"to load DACE functions and objects into our script.","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Initialise DACE for 10th-order computations in 1 variable","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"DACE.init(10, 1)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Initialise x as a DA object","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"x = DACE.DA(1)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":" I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n------------------------------------------------\n","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Create y as AlgebraicVector of type DA and size 1","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"y = AlgebraicVector{DA}(1)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"1-element DACE.AlgebraicVectorAllocated{DA}:\n ALL COEFFICIENTS ZERO\n------------------------------------------------\n","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Store the Taylor expansion of sin(x) in the first element of y","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"y[1] = sin(x)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":" I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n 2 -1.6666666666666666e-01 3 3\n 3 8.3333333333333332e-03 5 5\n 4 -1.9841269841269841e-04 7 7\n 5 2.7557319223985893e-06 9 9\n------------------------------------------------\n","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Invert the Taylor polynomial","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"inv_y = DACE.invert(y)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"1-element DACE.AlgebraicVectorAllocated{DA}:\n I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n 2 1.6666666666666666e-01 3 3\n 3 7.4999999999999997e-02 5 5\n 4 4.4642857142857137e-02 7 7\n 5 3.0381944444444437e-02 9 9\n------------------------------------------------\n","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Finally compare the polynomial inversion of sin(x)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"println(\"polynomial inversion of sin(x)\")\nprintln(inv_y)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"polynomial inversion of sin(x)\n[[[ 1 vector\n I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n 2 1.6666666666666666e-01 3 3\n 3 7.4999999999999997e-02 5 5\n 4 4.4642857142857137e-02 7 7\n 5 3.0381944444444437e-02 9 9\n------------------------------------------------\n\n]]]\n\n\n","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"with asin(x)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"println(\"asin(x)\")\nprintln(asin(x))","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"asin(x)\n I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n 2 1.6666666666666669e-01 3 3\n 3 7.5000000000000067e-02 5 5\n 4 4.4642857142857206e-02 7 7\n 5 3.0381944444444586e-02 9 9\n------------------------------------------------\n\n","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"This page was generated using Literate.jl.","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"EditURL = \"../../../examples/sine.jl\"","category":"page"},{"location":"generated/sine/#Sine-example","page":"Sine function","title":"Sine example","text":"","category":"section"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"This is a simple DACE example using the sine function, which demonstrates:","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"How to load DACE.jl\nHow to initialise the DACE library\nHow to create a DA object\nHow to compute the sine of a DA object\nHow to print a DA object to screen\nHow to evaluate a DA object","category":"page"},{"location":"generated/sine/#Install-dependencies","page":"Sine function","title":"Install dependencies","text":"","category":"section"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"Make sure the required packages are installed","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"using Pkg\nPkg.add(\"https://github.com/chrisdjscott/DACE_jll.jl.git\")\nPkg.add(\"https://github.com/chrisdjscott/DACE.jl.git\")","category":"page"},{"location":"generated/sine/#Using-DACE","page":"Sine function","title":"Using DACE","text":"","category":"section"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"Write","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"using DACE","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"to load DACE functions and objects into our script.","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"Initialise DACE for 20th-order computations in 1 variable","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"DACE.init(20, 1)","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"Initialise x as a DA object","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"x = DACE.DA(1)","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":" I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n------------------------------------------------\n","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"Initialise y as the Taylor expansion of sin(x)","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"y = sin(x)","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":" I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n 2 -1.6666666666666666e-01 3 3\n 3 8.3333333333333332e-03 5 5\n 4 -1.9841269841269841e-04 7 7\n 5 2.7557319223985893e-06 9 9\n 6 -2.5052108385441720e-08 11 11\n 7 1.6059043836821616e-10 13 13\n 8 -7.6471637318198174e-13 15 15\n 9 2.8114572543455210e-15 17 17\n 10 -8.2206352466243310e-18 19 19\n------------------------------------------------\n","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"Print x and y to screen","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"println(\"x\")\nprint(x)\nprintln(\"y = sin(x)\")\nprint(y)","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"x\n I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n------------------------------------------------\ny = sin(x)\n I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n 2 -1.6666666666666666e-01 3 3\n 3 8.3333333333333332e-03 5 5\n 4 -1.9841269841269841e-04 7 7\n 5 2.7557319223985893e-06 9 9\n 6 -2.5052108385441720e-08 11 11\n 7 1.6059043836821616e-10 13 13\n 8 -7.6471637318198174e-13 15 15\n 9 2.8114572543455210e-15 17 17\n 10 -8.2206352466243310e-18 19 19\n------------------------------------------------\n","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"Evaluate y at 1.0 and compare with the builtin sin function.","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"println(\" y(1.0) = $(DACE.evalScalar(y, 1.0))\")\nprintln(\"sin(1.0) = $(sin(1.0))\")","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":" y(1.0) = 0.8414709848078965\nsin(1.0) = 0.8414709848078965\n","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"This page was generated using Literate.jl.","category":"page"},{"location":"#DACE.jl","page":"Home","title":"DACE.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"warning: Warning\nThis package is still in development, is not complete and instructions may change significantly","category":"page"},{"location":"","page":"Home","title":"Home","text":"This is the documentation page for DACE.jl, a Julia interface to the DACE library.","category":"page"},{"location":"#Getting-started","page":"Home","title":"Getting started","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"DACE.jl can be installed using the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run","category":"page"},{"location":"","page":"Home","title":"Home","text":"pkg> add https://github.com/chrisdjscott/DACE_jll.jl.git\npkg> add https://github.com/chrisdjscott/DACE.jl.git","category":"page"},{"location":"","page":"Home","title":"Home","text":"Note: the second add command above may not be needed if you are running from main directory of the repository.","category":"page"},{"location":"#Notes-about-the-interface","page":"Home","title":"Notes about the interface","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"The Julia interface is built using CxxWrap.jl\nThe C++ source for the interface is currently in this fork of the DACE library\nThe C++ code gets built and released to the DACE_jll package\nDACE_jll is located here\nthe build recipe is currently here\nThe Julia component of the interface is currently here","category":"page"},{"location":"","page":"Home","title":"Home","text":"The above may change, in particular we hope to:","category":"page"},{"location":"","page":"Home","title":"Home","text":"merge the forked DACE library back to upstream, if possible\nrelease the DACE_jll package with Yggdrasil\nmove the DACE.jl package under the dacelib organisation on GitHub, if possible","category":"page"}] +[{"location":"developing/#Developing","page":"Developing","title":"Developing","text":"","category":"section"},{"location":"developing/#Releasing-the-DACE_jll.jl-package","page":"Developing","title":"Releasing the DACE_jll.jl package","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"warning: Warning\nThis will change once released to upstream Yggdrasil","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The DACE_jll build recipe is currently in my fork/branch of the Yggdrasil repo here.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"In that directory there is a build_tarballs.jl file which defines the build, including the CMake command and options to build the DACE C++ library.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"To build the library and deploy it, run:","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"julia --color=yes build_tarballs.jl --verbose --deploy=\"chrisdjscott/DACE_jll.jl\"","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"EditURL = \"../../../examples/polynomial_inversion.jl\"","category":"page"},{"location":"generated/polynomial_inversion/#Polynomial-inversion","page":"Polynomial inversion","title":"Polynomial inversion","text":"","category":"section"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"This is a DACE example showing polynomial inversion, demonstrating:","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"How to load DACE.jl\nHow to initialise the DACE library\nHow to create a DA object\nHow to create an AlgebraicVector\nHow to invert a Taylor polynomial","category":"page"},{"location":"generated/polynomial_inversion/#Install-dependencies","page":"Polynomial inversion","title":"Install dependencies","text":"","category":"section"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Make sure the required packages are installed","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"using Pkg\nPkg.add(\"https://github.com/chrisdjscott/DACE_jll.jl.git\")\nPkg.add(\"https://github.com/chrisdjscott/DACE.jl.git\")","category":"page"},{"location":"generated/polynomial_inversion/#Using-DACE","page":"Polynomial inversion","title":"Using DACE","text":"","category":"section"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Write","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"using DACE","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"to load DACE functions and objects into our script.","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Initialise DACE for 10th-order computations in 1 variable","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"DACE.init(10, 1)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Initialise x as a DA object","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"x = DACE.DA(1, 1)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":" I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n------------------------------------------------\n","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Create y as AlgebraicVector of type DA and size 1","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"y = AlgebraicVector{DA}(1)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"1-element DACE.AlgebraicVectorAllocated{DA}:\n ALL COEFFICIENTS ZERO\n------------------------------------------------\n","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Store the Taylor expansion of sin(x) in the first element of y","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"y[1] = sin(x)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":" I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n 2 -1.6666666666666666e-01 3 3\n 3 8.3333333333333332e-03 5 5\n 4 -1.9841269841269841e-04 7 7\n 5 2.7557319223985893e-06 9 9\n------------------------------------------------\n","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Invert the Taylor polynomial","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"inv_y = DACE.invert(y)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"1-element DACE.AlgebraicVectorAllocated{DA}:\n I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n 2 1.6666666666666666e-01 3 3\n 3 7.4999999999999997e-02 5 5\n 4 4.4642857142857137e-02 7 7\n 5 3.0381944444444437e-02 9 9\n------------------------------------------------\n","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"Finally compare the polynomial inversion of sin(x)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"println(\"polynomial inversion of sin(x)\")\nprintln(inv_y)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"polynomial inversion of sin(x)\n[[[ 1 vector\n I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n 2 1.6666666666666666e-01 3 3\n 3 7.4999999999999997e-02 5 5\n 4 4.4642857142857137e-02 7 7\n 5 3.0381944444444437e-02 9 9\n------------------------------------------------\n\n]]]\n\n\n","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"with asin(x)","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"println(\"asin(x)\")\nprintln(asin(x))","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"asin(x)\n I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n 2 1.6666666666666669e-01 3 3\n 3 7.5000000000000067e-02 5 5\n 4 4.4642857142857206e-02 7 7\n 5 3.0381944444444586e-02 9 9\n------------------------------------------------\n\n","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"","category":"page"},{"location":"generated/polynomial_inversion/","page":"Polynomial inversion","title":"Polynomial inversion","text":"This page was generated using Literate.jl.","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"EditURL = \"../../../examples/sine.jl\"","category":"page"},{"location":"generated/sine/#Sine-example","page":"Sine function","title":"Sine example","text":"","category":"section"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"This is a simple DACE example using the sine function, which demonstrates:","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"How to load DACE.jl\nHow to initialise the DACE library\nHow to create a DA object\nHow to compute the sine of a DA object\nHow to print a DA object to screen\nHow to evaluate a DA object","category":"page"},{"location":"generated/sine/#Install-dependencies","page":"Sine function","title":"Install dependencies","text":"","category":"section"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"Make sure the required packages are installed","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"using Pkg\nPkg.add(\"https://github.com/chrisdjscott/DACE_jll.jl.git\")\nPkg.add(\"https://github.com/chrisdjscott/DACE.jl.git\")","category":"page"},{"location":"generated/sine/#Using-DACE","page":"Sine function","title":"Using DACE","text":"","category":"section"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"Write","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"using DACE","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"to load DACE functions and objects into our script.","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"Initialise DACE for 20th-order computations in 1 variable","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"DACE.init(20, 1)","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"Initialise x as a DA object","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"x = DACE.DA(1, 1)","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":" I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n------------------------------------------------\n","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"Initialise y as the Taylor expansion of sin(x)","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"y = sin(x)","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":" I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n 2 -1.6666666666666666e-01 3 3\n 3 8.3333333333333332e-03 5 5\n 4 -1.9841269841269841e-04 7 7\n 5 2.7557319223985893e-06 9 9\n 6 -2.5052108385441720e-08 11 11\n 7 1.6059043836821616e-10 13 13\n 8 -7.6471637318198174e-13 15 15\n 9 2.8114572543455210e-15 17 17\n 10 -8.2206352466243310e-18 19 19\n------------------------------------------------\n","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"Print x and y to screen","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"println(\"x\")\nprint(x)\nprintln(\"y = sin(x)\")\nprint(y)","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"x\n I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n------------------------------------------------\ny = sin(x)\n I COEFFICIENT ORDER EXPONENTS\n 1 1.0000000000000000e+00 1 1\n 2 -1.6666666666666666e-01 3 3\n 3 8.3333333333333332e-03 5 5\n 4 -1.9841269841269841e-04 7 7\n 5 2.7557319223985893e-06 9 9\n 6 -2.5052108385441720e-08 11 11\n 7 1.6059043836821616e-10 13 13\n 8 -7.6471637318198174e-13 15 15\n 9 2.8114572543455210e-15 17 17\n 10 -8.2206352466243310e-18 19 19\n------------------------------------------------\n","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"Evaluate y at 1.0 and compare with the builtin sin function.","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"println(\" y(1.0) = $(DACE.evalScalar(y, 1.0))\")\nprintln(\"sin(1.0) = $(sin(1.0))\")","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":" y(1.0) = 0.8414709848078965\nsin(1.0) = 0.8414709848078965\n","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"","category":"page"},{"location":"generated/sine/","page":"Sine function","title":"Sine function","text":"This page was generated using Literate.jl.","category":"page"},{"location":"#DACE.jl","page":"Home","title":"DACE.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"warning: Warning\nThis package is still in development, is not complete and instructions may change significantly","category":"page"},{"location":"","page":"Home","title":"Home","text":"This is the documentation page for DACE.jl, a Julia interface to the DACE library.","category":"page"},{"location":"#Getting-started","page":"Home","title":"Getting started","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"DACE.jl can be installed using the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run","category":"page"},{"location":"","page":"Home","title":"Home","text":"pkg> add https://github.com/chrisdjscott/DACE_jll.jl.git\npkg> add https://github.com/chrisdjscott/DACE.jl.git","category":"page"},{"location":"","page":"Home","title":"Home","text":"Note: the second add command above may not be needed if you are running from main directory of the repository.","category":"page"},{"location":"#Notes-about-the-interface","page":"Home","title":"Notes about the interface","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"The Julia interface is built using CxxWrap.jl\nThe C++ source for the interface is currently in this fork of the DACE library\nThe C++ code gets built and released to the DACE_jll package\nDACE_jll is located here\nthe build recipe is currently here\nThe Julia component of the interface is currently here","category":"page"},{"location":"","page":"Home","title":"Home","text":"The above may change, in particular we hope to:","category":"page"},{"location":"","page":"Home","title":"Home","text":"merge the forked DACE library back to upstream, if possible\nrelease the DACE_jll package with Yggdrasil\nmove the DACE.jl package under the dacelib organisation on GitHub, if possible","category":"page"}] }