<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[植入边界条件时遇到了tmp类型的问题]]></title><description><![CDATA[<p dir="auto">各位大佬好！<br />
在下小白一枚，最近正在学着植入自己的边界条件。我在nutUSpaldingWallFunction.C中看到了作者用如下语句，在边界面上定义一个新标量场：</p>
<pre><code>tmp&lt;scalarField&gt; tuTau(new scalarField(patch().size(), 0.0));
scalarField&amp; uTau = tuTau.ref();
</code></pre>
<p dir="auto">我本想用类似方式来写定义自己的变量，但是运行后发现，程序好像会清除某些tmp变量（我感觉是这样？），导致最后输出为0。</p>
<p dir="auto">请问各位大佬：<br />
怎么样做才能避免这样的问题？<br />
如果我不想用tmp变量，以上语句应该怎么写？</p>
]]></description><link>https://cfd-china.com/topic/4478/植入边界条件时遇到了tmp类型的问题</link><generator>RSS for Node</generator><lastBuildDate>Tue, 16 Jun 2026 21:52:02 GMT</lastBuildDate><atom:link href="https://cfd-china.com/topic/4478.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 10 Jan 2021 13:13:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 植入边界条件时遇到了tmp类型的问题 on Sun, 10 Jan 2021 16:42:34 GMT]]></title><description><![CDATA[<p dir="auto">谢谢李老师！帮了我大忙。</p>
]]></description><link>https://cfd-china.com/post/23886</link><guid isPermaLink="true">https://cfd-china.com/post/23886</guid><dc:creator><![CDATA[摇滚小鱼1007]]></dc:creator><pubDate>Sun, 10 Jan 2021 16:42:34 GMT</pubDate></item><item><title><![CDATA[Reply to 植入边界条件时遇到了tmp类型的问题 on Sun, 10 Jan 2021 14:18:17 GMT]]></title><description><![CDATA[<pre><code>scalarField tuTau(patch().size(), 0.0);
scalarField&amp; uTau = tuTau;
</code></pre>
]]></description><link>https://cfd-china.com/post/23884</link><guid isPermaLink="true">https://cfd-china.com/post/23884</guid><dc:creator><![CDATA[李东岳]]></dc:creator><pubDate>Sun, 10 Jan 2021 14:18:17 GMT</pubDate></item></channel></rss>