-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathalgebra__debug__writer_8h_source.html
256 lines (254 loc) · 35.8 KB
/
algebra__debug__writer_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ug4: ugbase/lib_algebra/operator/algebra_debug_writer.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">ug4
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('algebra__debug__writer_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">algebra_debug_writer.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="algebra__debug__writer_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2012-2015: G-CSC, Goethe University Frankfurt</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Author: Andreas Vogel</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * </span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * This file is part of UG4.</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * </span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * UG4 is free software: you can redistribute it and/or modify it under the</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * terms of the GNU Lesser General Public License version 3 (as published by the</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * Free Software Foundation) with the following additional attribution</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * requirements (according to LGPL/GPL v3 §7):</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * </span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * (1) The following notice must be displayed in the Appropriate Legal Notices</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * of covered and combined works: "Based on UG4 (www.ug4.org/license)".</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * </span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * (2) The following notice must be displayed at a prominent place in the</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * terminal output of covered works: "Based on UG4 (www.ug4.org/license)".</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * </span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * (3) The following bibliography is recommended for citation and must be</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * preserved in all covered files:</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * "Reiter, S., Vogel, A., Heppner, I., Rupp, M., and Wittum, G. A massively</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * parallel geometric multigrid solver on hierarchically distributed grids.</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * Computing and visualization in science 16, 4 (2013), 151-164"</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> * "Vogel, A., Reiter, S., Rupp, M., Nägel, A., and Wittum, G. UG4 -- a novel</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> * flexible software system for simulating pde based models on high performance</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> * computers. Computing and visualization in science 16, 4 (2013), 165-179"</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> * </span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> * This program is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"> * GNU Lesser General Public License for more details.</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  </div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#ifndef __H__LIB_ALGEBRA__OPERATOR__ALGEBRA_DEBUG_WRITER__</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#define __H__LIB_ALGEBRA__OPERATOR__ALGEBRA_DEBUG_WRITER__</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  </div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#include "<a class="code" href="debug__writer_8h.html">debug_writer.h</a>"</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include "<a class="code" href="connection__viewer__output_8h.html">lib_algebra/common/connection_viewer_output.h</a>"</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#include "<a class="code" href="file__util_8h.html">common/util/file_util.h</a>"</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  </div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">namespace </span><a class="code" href="namespaceug.html">ug</a>{</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  </div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  </div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="keyword">template</span> <<span class="keyword">typename</span> TAlgebra></div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classug_1_1_algebra_debug_writer.html"> 45</a></span> <span class="keyword">class </span><a class="code" href="classug_1_1_algebra_debug_writer.html">AlgebraDebugWriter</a> : <span class="keyword">public</span> <a class="code" href="classug_1_1_i_debug_writer.html">IDebugWriter</a><TAlgebra></div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> {</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keyword">public</span>:</div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="classug_1_1_algebra_debug_writer.html#a9c46ed79f42aed00fe4ddebb8bfb4744"> 49</a></span>  <span class="keyword">typedef</span> TAlgebra <a class="code" href="classug_1_1_algebra_debug_writer.html#a9c46ed79f42aed00fe4ddebb8bfb4744">algebra_type</a>;</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  </div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classug_1_1_algebra_debug_writer.html#a7dc47df2cd49467bc3b6ce227ebd7d52"> 52</a></span>  <span class="keyword">typedef</span> <span class="keyword">typename</span> algebra_type::vector_type <a class="code" href="classug_1_1_algebra_debug_writer.html#a7dc47df2cd49467bc3b6ce227ebd7d52">vector_type</a>;</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  </div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classug_1_1_algebra_debug_writer.html#a63043328ee22759851d061140ea6f893"> 55</a></span>  <span class="keyword">typedef</span> <span class="keyword">typename</span> algebra_type::matrix_type <a class="code" href="classug_1_1_algebra_debug_writer.html#a63043328ee22759851d061140ea6f893">matrix_type</a>;</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  </div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classug_1_1_algebra_debug_writer.html#a8b9cf343e5825f1522864d768af15fa8"> 58</a></span>  <span class="keyword">typedef</span> <a class="code" href="classug_1_1_i_debug_writer.html">IDebugWriter<TAlgebra></a> <a class="code" href="classug_1_1_algebra_debug_writer.html#a8b9cf343e5825f1522864d768af15fa8">base_type</a>;</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keyword">using</span> <a class="code" href="classug_1_1_i_vector_debug_writer.html#a152ddeb1dca0e0010b60012f856624cc">base_type::get_base_dir</a>;</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  </div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keyword">public</span>:</div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classug_1_1_algebra_debug_writer.html#a4371508813aa9b874f950834361b1b09"> 63</a></span>  <a class="code" href="classug_1_1_algebra_debug_writer.html#a4371508813aa9b874f950834361b1b09">AlgebraDebugWriter</a>() : <a class="code" href="classug_1_1_i_debug_writer.html">base_type</a>() {}</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  </div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classug_1_1_algebra_debug_writer.html#aee6f3a94bf32b4554ad7f15c05ab5cf1"> 66</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classug_1_1_algebra_debug_writer.html#aee6f3a94bf32b4554ad7f15c05ab5cf1">write_vector</a>(<span class="keyword">const</span> <a class="code" href="classug_1_1_algebra_debug_writer.html#a7dc47df2cd49467bc3b6ce227ebd7d52">vector_type</a>& vec,</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keyword">const</span> <span class="keywordtype">char</span>* filename)</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  {</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keywordflow">switch</span> (<a class="code" href="classug_1_1_i_vector_debug_writer.html#afcdf77e0aa06776bae17b81874969504">base_type::current_dimension</a>())</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  {</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="keywordflow">case</span> 1: write_vector_dim<1>(vec, filename); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">case</span> 2: write_vector_dim<2>(vec, filename); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keywordflow">case</span> 3: write_vector_dim<3>(vec, filename); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordflow">default</span>: <a class="code" href="group__ugbase__common.html#ga0b928ef153b78f1b5e025638cf28f841">UG_ASSERT</a>(0, <span class="stringliteral">"Dimension not implemented."</span>);</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  }</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  }</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  </div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classug_1_1_algebra_debug_writer.html#a0777c74ad0bba57c90f93d4a2e30c13c"> 79</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classug_1_1_algebra_debug_writer.html#a0777c74ad0bba57c90f93d4a2e30c13c">write_matrix</a>(<span class="keyword">const</span> <a class="code" href="classug_1_1_algebra_debug_writer.html#a63043328ee22759851d061140ea6f893">matrix_type</a>& mat,</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keyword">const</span> <span class="keywordtype">char</span>* filename)</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  {</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="comment">// check name</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keywordflow">if</span>( !<a class="code" href="group__ugbase__common__io.html#ga31f29d12272a9504d5a0bc678b65156c">FileTypeIs</a>( filename, <span class="stringliteral">".mat"</span> ) ) {</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <a class="code" href="group__ugbase__common.html#ga43687df88af405f6ac7058dd3639993d">UG_THROW</a>( <span class="stringliteral">"Only '.mat' format supported for matrices, but"</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="stringliteral">" filename is '"</span> << filename << <span class="stringliteral">"'."</span>);</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  }</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="comment">// write to file</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keywordflow">switch</span> (<a class="code" href="classug_1_1_i_vector_debug_writer.html#afcdf77e0aa06776bae17b81874969504">base_type::current_dimension</a>())</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  {</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keywordflow">case</span> 1: write_matrix_dim<1>(mat, filename); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordflow">case</span> 2: write_matrix_dim<2>(mat, filename); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="keywordflow">case</span> 3: write_matrix_dim<3>(mat, filename); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordflow">default</span>: <a class="code" href="group__ugbase__common.html#ga0b928ef153b78f1b5e025638cf28f841">UG_ASSERT</a>(0, <span class="stringliteral">"Dimension not implemented."</span>);</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  }</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  </div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  }</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keyword">private</span>:</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keyword">template</span> <<span class="keywordtype">int</span> dim></div>
<div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="classug_1_1_algebra_debug_writer.html#a68d0846511a1b4c1777cee3ecb159e9b"> 100</a></span>  <span class="keywordtype">void</span> <a class="code" href="classug_1_1_algebra_debug_writer.html#a68d0846511a1b4c1777cee3ecb159e9b">write_vector_dim</a>(<span class="keyword">const</span> <a class="code" href="classug_1_1_algebra_debug_writer.html#a7dc47df2cd49467bc3b6ce227ebd7d52">vector_type</a>& vec, <span class="keyword">const</span> <span class="keywordtype">char</span>* filename)</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  {</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  std::string <a class="code" href="checkpoint__util_8lua.html#a3c1958e225ed64db3e56badcbdcc8df7">name</a> = <a class="code" href="classug_1_1_i_vector_debug_writer.html#a152ddeb1dca0e0010b60012f856624cc">get_base_dir</a>() + <span class="stringliteral">"/"</span> + filename;</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keyword">const</span> std::vector<MathVector<dim> > &posvec = base_type::template get_positions<dim>();</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="comment">// check size</span></div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="keywordflow">if</span>(vec.size() > posvec.size())</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <a class="code" href="group__ugbase__common.html#ga43687df88af405f6ac7058dd3639993d">UG_THROW</a>(<span class="stringliteral">"'AlgebraDebugWriter::write_vector':"</span></div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="stringliteral">" Number of positions does not match. Vector has "</span> </div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  << vec.size() << <span class="stringliteral">" elements, but "</span> << posvec.size() << <span class="stringliteral">" positions were supplied!\n"</span>);</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  </div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="comment">// write connection viewer output to file</span></div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  ConnectionViewer::WriteVectorPar<vector_type, MathVector<dim> >(<a class="code" href="checkpoint__util_8lua.html#a3c1958e225ed64db3e56badcbdcc8df7">name</a>, vec, &posvec[0], <a class="codeRef" href="../plugins/group__small__strain__mechanics.html#ga425548c7b0fe054612f37d1f3a4826b6">dim</a>);</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  </div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  }</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  </div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keyword">template</span> <<span class="keywordtype">int</span> dim></div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="classug_1_1_algebra_debug_writer.html#ac9f7f40e9f2c5c39824deefd6ee5bb8b"> 117</a></span>  <span class="keywordtype">void</span> <a class="code" href="classug_1_1_algebra_debug_writer.html#ac9f7f40e9f2c5c39824deefd6ee5bb8b">write_matrix_dim</a>(<span class="keyword">const</span> <a class="code" href="classug_1_1_algebra_debug_writer.html#a63043328ee22759851d061140ea6f893">matrix_type</a>& mat,</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keyword">const</span> <span class="keywordtype">char</span>* filename)</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  {</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  std::string <a class="code" href="checkpoint__util_8lua.html#a3c1958e225ed64db3e56badcbdcc8df7">name</a> = <a class="code" href="classug_1_1_i_vector_debug_writer.html#a152ddeb1dca0e0010b60012f856624cc">get_base_dir</a>() + <span class="stringliteral">"/"</span> + filename;</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="keyword">const</span> std::vector<MathVector<dim> > &posvec = base_type::template get_positions<dim>();</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="comment">// check size</span></div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="keywordflow">if</span>(mat.num_rows() > posvec.size() || mat.num_cols() > posvec.size())</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <a class="code" href="group__ugbase__common.html#ga43687df88af405f6ac7058dd3639993d">UG_THROW</a>(<span class="stringliteral">"'AlgebraDebugWriter::write_matrix':"</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="stringliteral">" Number of positions does not match: Matrix has "</span></div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  << mat.num_rows() << <span class="stringliteral">" rows, "</span> << mat.num_cols() << <span class="stringliteral">" cols, but "</span></div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  << posvec.size()<< <span class="stringliteral">"positions were supplied."</span> << <span class="stringliteral">"\n"</span>);</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="comment">// write to connection viewer</span></div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  ConnectionViewer::WriteMatrixPar<matrix_type, MathVector<dim> ></div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  ( <a class="code" href="checkpoint__util_8lua.html#a3c1958e225ed64db3e56badcbdcc8df7">name</a>, mat, &base_type::template get_positions<dim>()[0], <a class="codeRef" href="../plugins/group__small__strain__mechanics.html#ga425548c7b0fe054612f37d1f3a4826b6">dim</a>);</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  </div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  }</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  </div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span> };</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  </div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span> } <span class="comment">// end namespace ug</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  </div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span> <span class="preprocessor">#endif </span><span class="comment">/* __H__LIB_ALGEBRA__OPERATOR__ALGEBRA_DEBUG_WRITER__ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="acheckpoint__util_8lua_html_a3c1958e225ed64db3e56badcbdcc8df7"><div class="ttname"><a href="checkpoint__util_8lua.html#a3c1958e225ed64db3e56badcbdcc8df7">name</a></div><div class="ttdeci">location name</div><div class="ttdef"><b>Definition:</b> checkpoint_util.lua:128</div></div>
<div class="ttc" id="aclassug_1_1_algebra_debug_writer_html"><div class="ttname"><a href="classug_1_1_algebra_debug_writer.html">ug::AlgebraDebugWriter</a></div><div class="ttdoc">Debug writer for connection viewer (based on algebraic information + vector positions only)</div><div class="ttdef"><b>Definition:</b> algebra_debug_writer.h:46</div></div>
<div class="ttc" id="aclassug_1_1_algebra_debug_writer_html_a0777c74ad0bba57c90f93d4a2e30c13c"><div class="ttname"><a href="classug_1_1_algebra_debug_writer.html#a0777c74ad0bba57c90f93d4a2e30c13c">ug::AlgebraDebugWriter::write_matrix</a></div><div class="ttdeci">virtual void write_matrix(const matrix_type &mat, const char *filename)</div><div class="ttdoc">write matrix</div><div class="ttdef"><b>Definition:</b> algebra_debug_writer.h:79</div></div>
<div class="ttc" id="aclassug_1_1_algebra_debug_writer_html_a4371508813aa9b874f950834361b1b09"><div class="ttname"><a href="classug_1_1_algebra_debug_writer.html#a4371508813aa9b874f950834361b1b09">ug::AlgebraDebugWriter::AlgebraDebugWriter</a></div><div class="ttdeci">AlgebraDebugWriter()</div><div class="ttdoc">Constructor.</div><div class="ttdef"><b>Definition:</b> algebra_debug_writer.h:63</div></div>
<div class="ttc" id="aclassug_1_1_algebra_debug_writer_html_a63043328ee22759851d061140ea6f893"><div class="ttname"><a href="classug_1_1_algebra_debug_writer.html#a63043328ee22759851d061140ea6f893">ug::AlgebraDebugWriter::matrix_type</a></div><div class="ttdeci">algebra_type::matrix_type matrix_type</div><div class="ttdoc">type of matrix</div><div class="ttdef"><b>Definition:</b> algebra_debug_writer.h:55</div></div>
<div class="ttc" id="aclassug_1_1_algebra_debug_writer_html_a68d0846511a1b4c1777cee3ecb159e9b"><div class="ttname"><a href="classug_1_1_algebra_debug_writer.html#a68d0846511a1b4c1777cee3ecb159e9b">ug::AlgebraDebugWriter::write_vector_dim</a></div><div class="ttdeci">void write_vector_dim(const vector_type &vec, const char *filename)</div><div class="ttdoc">auxiliary function for vectors</div><div class="ttdef"><b>Definition:</b> algebra_debug_writer.h:100</div></div>
<div class="ttc" id="aclassug_1_1_algebra_debug_writer_html_a7dc47df2cd49467bc3b6ce227ebd7d52"><div class="ttname"><a href="classug_1_1_algebra_debug_writer.html#a7dc47df2cd49467bc3b6ce227ebd7d52">ug::AlgebraDebugWriter::vector_type</a></div><div class="ttdeci">algebra_type::vector_type vector_type</div><div class="ttdoc">type of vector</div><div class="ttdef"><b>Definition:</b> algebra_debug_writer.h:52</div></div>
<div class="ttc" id="aclassug_1_1_algebra_debug_writer_html_a8b9cf343e5825f1522864d768af15fa8"><div class="ttname"><a href="classug_1_1_algebra_debug_writer.html#a8b9cf343e5825f1522864d768af15fa8">ug::AlgebraDebugWriter::base_type</a></div><div class="ttdeci">IDebugWriter< TAlgebra > base_type</div><div class="ttdoc">type of base</div><div class="ttdef"><b>Definition:</b> algebra_debug_writer.h:58</div></div>
<div class="ttc" id="aclassug_1_1_algebra_debug_writer_html_a9c46ed79f42aed00fe4ddebb8bfb4744"><div class="ttname"><a href="classug_1_1_algebra_debug_writer.html#a9c46ed79f42aed00fe4ddebb8bfb4744">ug::AlgebraDebugWriter::algebra_type</a></div><div class="ttdeci">TAlgebra algebra_type</div><div class="ttdoc">type of matrix</div><div class="ttdef"><b>Definition:</b> algebra_debug_writer.h:49</div></div>
<div class="ttc" id="aclassug_1_1_algebra_debug_writer_html_ac9f7f40e9f2c5c39824deefd6ee5bb8b"><div class="ttname"><a href="classug_1_1_algebra_debug_writer.html#ac9f7f40e9f2c5c39824deefd6ee5bb8b">ug::AlgebraDebugWriter::write_matrix_dim</a></div><div class="ttdeci">void write_matrix_dim(const matrix_type &mat, const char *filename)</div><div class="ttdoc">auxiliary function for matrices</div><div class="ttdef"><b>Definition:</b> algebra_debug_writer.h:117</div></div>
<div class="ttc" id="aclassug_1_1_algebra_debug_writer_html_aee6f3a94bf32b4554ad7f15c05ab5cf1"><div class="ttname"><a href="classug_1_1_algebra_debug_writer.html#aee6f3a94bf32b4554ad7f15c05ab5cf1">ug::AlgebraDebugWriter::write_vector</a></div><div class="ttdeci">virtual void write_vector(const vector_type &vec, const char *filename)</div><div class="ttdoc">write vector</div><div class="ttdef"><b>Definition:</b> algebra_debug_writer.h:66</div></div>
<div class="ttc" id="aclassug_1_1_i_debug_writer_html"><div class="ttname"><a href="classug_1_1_i_debug_writer.html">ug::IDebugWriter</a></div><div class="ttdoc">base class for all debug writer</div><div class="ttdef"><b>Definition:</b> debug_writer.h:244</div></div>
<div class="ttc" id="aclassug_1_1_i_vector_debug_writer_html_a152ddeb1dca0e0010b60012f856624cc"><div class="ttname"><a href="classug_1_1_i_vector_debug_writer.html#a152ddeb1dca0e0010b60012f856624cc">ug::IVectorDebugWriter< TAlgebra::vector_type >::get_base_dir</a></div><div class="ttdeci">std::string get_base_dir()</div><div class="ttdef"><b>Definition:</b> debug_writer.h:192</div></div>
<div class="ttc" id="aclassug_1_1_i_vector_debug_writer_html_afcdf77e0aa06776bae17b81874969504"><div class="ttname"><a href="classug_1_1_i_vector_debug_writer.html#afcdf77e0aa06776bae17b81874969504">ug::IVectorDebugWriter< TAlgebra::vector_type >::current_dimension</a></div><div class="ttdeci">int current_dimension() const</div><div class="ttdoc">returns the current dimension</div><div class="ttdef"><b>Definition:</b> debug_writer.h:135</div></div>
<div class="ttc" id="aconnection__viewer__output_8h_html"><div class="ttname"><a href="connection__viewer__output_8h.html">connection_viewer_output.h</a></div></div>
<div class="ttc" id="adebug__writer_8h_html"><div class="ttname"><a href="debug__writer_8h.html">debug_writer.h</a></div></div>
<div class="ttc" id="afile__util_8h_html"><div class="ttname"><a href="file__util_8h.html">file_util.h</a></div><div class="ttdoc">File utility functions.</div></div>
<div class="ttc" id="agroup__small__strain__mechanics_html_ga425548c7b0fe054612f37d1f3a4826b6"><div class="ttname"><a href="../plugins/group__small__strain__mechanics.html#ga425548c7b0fe054612f37d1f3a4826b6">dim</a></div><div class="ttdeci">static const int dim</div></div>
<div class="ttc" id="agroup__ugbase__common__io_html_ga31f29d12272a9504d5a0bc678b65156c"><div class="ttname"><a href="group__ugbase__common__io.html#ga31f29d12272a9504d5a0bc678b65156c">ug::FileTypeIs</a></div><div class="ttdeci">bool FileTypeIs(const char *filename, const char *extension)</div><div class="ttdoc">!!! Serial i/o version !!!</div><div class="ttdef"><b>Definition:</b> file_util.cpp:86</div></div>
<div class="ttc" id="agroup__ugbase__common_html_ga0b928ef153b78f1b5e025638cf28f841"><div class="ttname"><a href="group__ugbase__common.html#ga0b928ef153b78f1b5e025638cf28f841">UG_ASSERT</a></div><div class="ttdeci">#define UG_ASSERT(expr, msg)</div><div class="ttdef"><b>Definition:</b> assert.h:70</div></div>
<div class="ttc" id="agroup__ugbase__common_html_ga43687df88af405f6ac7058dd3639993d"><div class="ttname"><a href="group__ugbase__common.html#ga43687df88af405f6ac7058dd3639993d">UG_THROW</a></div><div class="ttdeci">#define UG_THROW(msg)</div><div class="ttdef"><b>Definition:</b> error.h:57</div></div>
<div class="ttc" id="anamespaceug_html"><div class="ttname"><a href="namespaceug.html">ug</a></div><div class="ttdoc">the ug namespace</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_80abd05104fe5ed4636c8ba64911e654.html">ugbase</a></li><li class="navelem"><a class="el" href="dir_2e5eee3e6a2607df2611cb3dc665a6d5.html">lib_algebra</a></li><li class="navelem"><a class="el" href="dir_3ec088f778c44889f52dc602c90557d0.html">operator</a></li><li class="navelem"><a class="el" href="algebra__debug__writer_8h.html">algebra_debug_writer.h</a></li>
<li class="footer">Generated on Mon Jan 6 2025 01:15:08 for ug4 by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
</ul>
</div>
</body>
</html>