Files
MeanField_SERiF/docs/xml/linear_8cpp.xml

216 lines
15 KiB
XML
Raw Normal View History

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.13.2" xml:lang="en-US">
<compounddef id="linear_8cpp" kind="file" language="C++">
<compoundname>linear.cpp</compoundname>
<includes refid="linear_8hpp" local="yes">serif/solver/linear/linear.hpp</includes>
<includes local="no">algorithm</includes>
<includes local="no">cmath</includes>
<includes local="no">stdexcept</includes>
<includes refid="errors_8hpp" local="yes">serif/utils/error/errors.hpp</includes>
<incdepgraph>
<node id="23">
<label>serif/meta/enums.hpp</label>
<link refid="enums_8hpp"/>
<childnode refid="24" relation="include">
</childnode>
<childnode refid="19" relation="include">
</childnode>
<childnode refid="25" relation="include">
</childnode>
</node>
<node id="2">
<label>serif/solver/linear/linear.hpp</label>
<link refid="linear_8hpp"/>
<childnode refid="3" relation="include">
</childnode>
</node>
<node id="22">
<label>serif/utils/error/codes.hpp</label>
<link refid="codes_8hpp"/>
<childnode refid="3" relation="include">
</childnode>
<childnode refid="23" relation="include">
</childnode>
</node>
<node id="7">
<label>serif/utils/error/errors.hpp</label>
<link refid="errors_8hpp"/>
<childnode refid="8" relation="include">
</childnode>
<childnode refid="9" relation="include">
</childnode>
<childnode refid="10" relation="include">
</childnode>
<childnode refid="11" relation="include">
</childnode>
<childnode refid="3" relation="include">
</childnode>
<childnode refid="4" relation="include">
</childnode>
<childnode refid="12" relation="include">
</childnode>
<childnode refid="13" relation="include">
</childnode>
<childnode refid="17" relation="include">
</childnode>
<childnode refid="22" relation="include">
</childnode>
<childnode refid="26" relation="include">
</childnode>
</node>
<node id="17">
<label>serif/utils/misc/concepts/exceptions.hpp</label>
<link refid="utils_2misc_2concepts_2exceptions_8hpp"/>
<childnode refid="18" relation="include">
</childnode>
<childnode refid="19" relation="include">
</childnode>
<childnode refid="20" relation="include">
</childnode>
</node>
<node id="20">
<label>serif/utils/misc/concepts/numeric.hpp</label>
<link refid="numeric_8hpp"/>
<childnode refid="21" relation="include">
</childnode>
<childnode refid="19" relation="include">
</childnode>
</node>
<node id="13">
<label>serif/utils/misc/terminal/colors.hpp</label>
<link refid="colors_8hpp"/>
<childnode refid="8" relation="include">
</childnode>
<childnode refid="10" relation="include">
</childnode>
<childnode refid="14" relation="include">
</childnode>
<childnode refid="15" relation="include">
</childnode>
<childnode refid="16" relation="include">
</childnode>
</node>
<node id="26">
<label>serif/utils/types/strings.hpp</label>
<link refid="types_2strings_8hpp"/>
<childnode refid="4" relation="include">
</childnode>
<childnode refid="27" relation="include">
</childnode>
<childnode refid="8" relation="include">
</childnode>
</node>
<node id="1">
<label>src/lib/serif/solver/linear/linear.cpp</label>
<link refid="linear_8cpp"/>
<childnode refid="2" relation="include">
</childnode>
<childnode refid="4" relation="include">
</childnode>
<childnode refid="5" relation="include">
</childnode>
<childnode refid="6" relation="include">
</childnode>
<childnode refid="7" relation="include">
</childnode>
</node>
<node id="4">
<label>algorithm</label>
</node>
<node id="5">
<label>cmath</label>
</node>
<node id="21">
<label>concepts</label>
</node>
<node id="3">
<label>cstdint</label>
</node>
<node id="10">
<label>cstdio</label>
</node>
<node id="14">
<label>cstdlib</label>
</node>
<node id="18">
<label>exception</label>
</node>
<node id="9">
<label>format</label>
</node>
<node id="27">
<label>iostream</label>
</node>
<node id="25">
<label>magic_enum/magic_enum_all.hpp</label>
</node>
<node id="6">
<label>stdexcept</label>
</node>
<node id="11">
<label>string</label>
</node>
<node id="8">
<label>string_view</label>
</node>
<node id="19">
<label>type_traits</label>
</node>
<node id="16">
<label>unistd.h</label>
</node>
<node id="24">
<label>unordered_map</label>
</node>
<node id="15">
<label>utility</label>
</node>
<node id="12">
<label>version</label>
</node>
</incdepgraph>
<innernamespace refid="namespaceserif">serif</innernamespace>
<innernamespace refid="namespaceserif_1_1solver">serif::solver</innernamespace>
<innernamespace refid="namespaceserif_1_1solver_1_1linear">serif::solver::linear</innernamespace>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<programlisting>
<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&quot;<ref refid="linear_8hpp" kindref="compound">serif/solver/linear/linear.hpp</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;algorithm&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;cmath&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;stdexcept&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="errors_8hpp" kindref="compound">serif/utils/error/errors.hpp</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal"><ref refid="namespaceserif_1_1solver_1_1linear" kindref="compound">serif::solver::linear</ref><sp/>{</highlight></codeline>
<codeline lineno="9"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="structserif_1_1solver_1_1linear_1_1_control_1a53c5ceb8c91660b55b64ec13ba6dfdfd" kindref="member">Control::validate</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="10"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="namespaceserif_1_1utils_1_1errors_1a7fefa3a63ca7895a875f2672026df02d" kindref="member">utils::errors::serif_ensure&lt;utils::errors::SERiFErrorCode::SOLVER_ERROR, std::invalid_argument&gt;</ref>(</highlight></codeline>
<codeline lineno="11"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::isfinite(<ref refid="structserif_1_1solver_1_1linear_1_1_control_1a1dfa0bf223efb2e1c828f68926c2f544" kindref="member">relative_tolerance</ref>)<sp/>&amp;&amp;<sp/><ref refid="structserif_1_1solver_1_1linear_1_1_control_1a1dfa0bf223efb2e1c828f68926c2f544" kindref="member">relative_tolerance</ref><sp/>&gt;=<sp/>0.0<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="12"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::isfinite(<ref refid="structserif_1_1solver_1_1linear_1_1_control_1aee53a6c3a61ac1e76db6867800579382" kindref="member">absolute_tolerance</ref>)<sp/>&amp;&amp;<sp/><ref refid="structserif_1_1solver_1_1linear_1_1_control_1aee53a6c3a61ac1e76db6867800579382" kindref="member">absolute_tolerance</ref><sp/>&gt;=<sp/>0.0<sp/>&amp;&amp;<sp/><ref refid="structserif_1_1solver_1_1linear_1_1_control_1a40faab0885e0dbe0ae663e7d9764dce9" kindref="member">maximum_iterations</ref><sp/>&gt;<sp/>0,</highlight></codeline>
<codeline lineno="13"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;A<sp/>linear<sp/>solve<sp/>needs<sp/>finite<sp/>nonnegative<sp/>tolerances<sp/>and<sp/>a<sp/>positive<sp/>iteration<sp/>budget;<sp/>received<sp/>{},<sp/>{},<sp/>and<sp/>{}.&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="14"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structserif_1_1solver_1_1linear_1_1_control_1a1dfa0bf223efb2e1c828f68926c2f544" kindref="member">relative_tolerance</ref>,<sp/><ref refid="structserif_1_1solver_1_1linear_1_1_control_1aee53a6c3a61ac1e76db6867800579382" kindref="member">absolute_tolerance</ref>,<sp/><ref refid="structserif_1_1solver_1_1linear_1_1_control_1a40faab0885e0dbe0ae663e7d9764dce9" kindref="member">maximum_iterations</ref>);</highlight></codeline>
<codeline lineno="15"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="16"><highlight class="normal"></highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/><ref refid="structserif_1_1solver_1_1linear_1_1_control_1a95a5fcfd4cb1c4cdbf65100aad13fdc7" kindref="member">Control::convergence_threshold</ref>(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>right_hand_side_norm)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structserif_1_1solver_1_1linear_1_1_control_1a53c5ceb8c91660b55b64ec13ba6dfdfd" kindref="member">validate</ref>();</highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>relative_threshold<sp/>=<sp/><ref refid="structserif_1_1solver_1_1linear_1_1_control_1a1dfa0bf223efb2e1c828f68926c2f544" kindref="member">relative_tolerance</ref><sp/>*<sp/>right_hand_side_norm;</highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="namespaceserif_1_1utils_1_1errors_1a7fefa3a63ca7895a875f2672026df02d" kindref="member">utils::errors::serif_ensure&lt;utils::errors::SERiFErrorCode::SOLVER_ERROR, std::invalid_argument&gt;</ref>(</highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::isfinite(right_hand_side_norm)<sp/>&amp;&amp;<sp/>right_hand_side_norm<sp/>&gt;=<sp/>0.0<sp/>&amp;&amp;<sp/>std::isfinite(relative_threshold),</highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;A<sp/>linear<sp/>convergence<sp/>threshold<sp/>needs<sp/>a<sp/>finite<sp/>nonnegative<sp/>right-hand-side<sp/>norm<sp/>and<sp/>finite<sp/>product<sp/>with<sp/>the<sp/>relative<sp/>tolerance;<sp/>received<sp/>{}.&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>right_hand_side_norm);</highlight></codeline>
<codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>std::max(<ref refid="structserif_1_1solver_1_1linear_1_1_control_1aee53a6c3a61ac1e76db6867800579382" kindref="member">absolute_tolerance</ref>,<sp/>relative_threshold);</highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="26"><highlight class="normal"></highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="structserif_1_1solver_1_1linear_1_1_f_g_m_r_e_s_1af2f04b567453e5c175747f9eb815c29c" kindref="member">FGMRES::validate</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="namespaceserif_1_1utils_1_1errors_1a7fefa3a63ca7895a875f2672026df02d" kindref="member">utils::errors::serif_ensure&lt;utils::errors::SERiFErrorCode::SOLVER_ERROR, std::invalid_argument&gt;</ref>(</highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structserif_1_1solver_1_1linear_1_1_f_g_m_r_e_s_1a1acab699fb76610914b3a9bfcf916afc" kindref="member">restart_length</ref><sp/>&gt;<sp/>0<sp/>&amp;&amp;<sp/><ref refid="structserif_1_1solver_1_1linear_1_1_f_g_m_r_e_s_1a1c8ce46064a938ab2215f490e569a82c" kindref="member">print_level</ref><sp/>&gt;=<sp/>-1<sp/>&amp;&amp;<sp/><ref refid="structserif_1_1solver_1_1linear_1_1_f_g_m_r_e_s_1a1c8ce46064a938ab2215f490e569a82c" kindref="member">print_level</ref><sp/>&lt;=<sp/>3,</highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;FGMRES<sp/>needs<sp/>a<sp/>positive<sp/>restart<sp/>length<sp/>and<sp/>print<sp/>level<sp/>between<sp/>-1<sp/>and<sp/>3;<sp/>received<sp/>{}<sp/>and<sp/>{}.&quot;</highlight><highlight class="normal">,<sp/><ref refid="structserif_1_1solver_1_1linear_1_1_f_g_m_r_e_s_1a1acab699fb76610914b3a9bfcf916afc" kindref="member">restart_length</ref>,<sp/><ref refid="structserif_1_1solver_1_1linear_1_1_f_g_m_r_e_s_1a1c8ce46064a938ab2215f490e569a82c" kindref="member">print_level</ref>);</highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="32"><highlight class="normal">}</highlight></codeline>
</programlisting>
<location file="src/lib/serif/solver/linear/linear.cpp"/>
</compounddef>
</doxygen>