<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>C++ on A Moment's Rest</title><link>https://a-moment096.github.io/zh/tags/c++/</link><description>Recent content in C++ on A Moment's Rest</description><generator>Hugo -- gohugo.io</generator><language>zh</language><lastBuildDate>Fri, 26 Jun 2026 15:20:58 +0000</lastBuildDate><atom:link href="https://a-moment096.github.io/zh/tags/c++/index.xml" rel="self" type="application/rss+xml"/><item><title>相场模拟，但是用很多语言 I</title><link>https://a-moment096.github.io/zh/posts/pf_note/impl_spinodal/impl_spinodal_1/</link><pubDate>Tue, 24 Mar 2026 00:00:00 +0800</pubDate><guid>https://a-moment096.github.io/zh/posts/pf_note/impl_spinodal/impl_spinodal_1/</guid><description>&lt;img src="https://a-moment096.github.io/images/Alice-2.png" alt="Featured image of post 相场模拟，但是用很多语言 I" /&gt;&lt;p&gt;&lt;em&gt;目前做相场的大家似乎都在用 C++ 或者 Python 来跑相场，可是明明程序语言这么多……对吧？Why not？本系列就来整个小活儿，用各种各样的语言来实现某个相场模拟~ 不过千里之行始于足下，我们就从最常用的 C++ 开始吧！~&lt;/em&gt;&lt;/p&gt;</description></item><item><title>如何解析 C/C++（比较）复杂的类型？</title><link>https://a-moment096.github.io/zh/posts/cpp_note/simple_type_parsing/</link><pubDate>Thu, 15 Jan 2026 19:35:50 +0800</pubDate><guid>https://a-moment096.github.io/zh/posts/cpp_note/simple_type_parsing/</guid><description>&lt;img src="https://a-moment096.github.io/images/Science.png" alt="Featured image of post 如何解析 C/C++（比较）复杂的类型？" /&gt;&lt;p&gt;&lt;em&gt;从可爱群友 &lt;a class="link" href="https://mahiro.ink/" target="_blank" rel="noopener"
 &gt;@0xa7973908&lt;/a&gt;的&lt;a class="link" href="https://mahiro.ink/archives/homework" target="_blank" rel="noopener"
 &gt;博客&lt;/a&gt;里了解到了数组指针和指针数组的类型区别，但是这种单纯的记号真的很难背，背后的逻辑究竟是什么样的呢？探究一下吧~&lt;/em&gt;&lt;/p&gt;</description></item><item><title>C++ Vector 的内存布局</title><link>https://a-moment096.github.io/zh/posts/cpp_note/vector_memory_layout/</link><pubDate>Tue, 27 May 2025 09:53:29 +0800</pubDate><guid>https://a-moment096.github.io/zh/posts/cpp_note/vector_memory_layout/</guid><description>&lt;img src="https://a-moment096.github.io/images/Bamboo_Reimu.jpg" alt="Featured image of post C++ Vector 的内存布局" /&gt;&lt;p&gt;&lt;em&gt;探索一下 C++ 的容器 &lt;code&gt;vector&lt;/code&gt; 的内存布局，也算是解答我自己的一些疑虑咯&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;头图是从网上搜的，尝试寻找出处，未果。很可惜。选曲尝试选择了一首听着比较清淡的曲子 &lt;strong&gt;泪苔&lt;/strong&gt;，感觉比较符合头图清新淡雅的神社氛围。希望你喜欢。&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Phase Field: 相场模拟学习笔记 V</title><link>https://a-moment096.github.io/zh/posts/pf_tutorial/pf_tutorial_5/</link><pubDate>Wed, 25 Dec 2024 00:00:00 +0800</pubDate><guid>https://a-moment096.github.io/zh/posts/pf_tutorial/pf_tutorial_5/</guid><description>&lt;img src="https://a-moment096.github.io/images/Skadi.png" alt="Featured image of post Phase Field: 相场模拟学习笔记 V" /&gt;&lt;p&gt;&lt;em&gt;其实这节就是换成 Allen-Cahn 方程，然后多个变量而已，主要是俺不想实现 Voronoi 结构（逃&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="简介"&gt;简介
&lt;/h2&gt;&lt;p&gt;上一部分我们以调幅分解为基础讨论了浓度场在 Cahn-Hilliard 方程下的演化过程。对相场方法而言，另一个无法绕开的演化方程则是针对非保守场变量的 Allen-Cahn 方程。这一部分我们将对晶粒长大过程进行分析，了解 Allen-Cahn 方程并使用它进行晶粒长大过程的模拟。&lt;/p&gt;</description></item><item><title>Phase Field: 相场模拟学习笔记 IV</title><link>https://a-moment096.github.io/zh/posts/pf_tutorial/pf_tutorial_4/</link><pubDate>Tue, 24 Dec 2024 00:00:00 +0800</pubDate><guid>https://a-moment096.github.io/zh/posts/pf_tutorial/pf_tutorial_4/</guid><description>&lt;img src="https://a-moment096.github.io/images/Skadi.png" alt="Featured image of post Phase Field: 相场模拟学习笔记 IV" /&gt;&lt;p&gt;&lt;em&gt;终于，真的要做相场模拟了。先从最软的柿子，调幅分解开始吧&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="简介"&gt;简介
&lt;/h2&gt;&lt;p&gt;所以，经过前面三个部分的学习，利用 C++ 进行相场模拟的所有前置几乎全部获得了：公式推导，编程基础，基础算法等，几乎全都拿到手了。这部分开始，我们就正式开始用 C++ 实现相场模拟。我们先从一个很经典且简单的例子开始：A-B 合金的调幅分解。&lt;/p&gt;</description></item><item><title>Phase Field: 相场模拟学习笔记 III</title><link>https://a-moment096.github.io/zh/posts/pf_tutorial/pf_tutorial_3/</link><pubDate>Mon, 23 Dec 2024 00:00:00 +0800</pubDate><guid>https://a-moment096.github.io/zh/posts/pf_tutorial/pf_tutorial_3/</guid><description>&lt;img src="https://a-moment096.github.io/images/Skadi.png" alt="Featured image of post Phase Field: 相场模拟学习笔记 III" /&gt;&lt;p&gt;&lt;em&gt;接上一节内容，这节会简单介绍 C++ 的一些语法知识，然后用 C++ 实现一维传热方程的模拟。&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="c一门高效的适宜科学计算的程序语言"&gt;C++：一门高效的，适宜科学计算的程序语言
&lt;/h2&gt;&lt;p&gt;C++ 是一门经典的编程语言，于 1979 年由 Bjarne Stroustrup 设计，最初目的是为了成为更好的 C 语言，而后随着自身发展，成为了一门和 C 语言有许多相似之处，而又截然不同的一门语言。C++ 支持多种编程范式，包括但不限于面向过程，面向对象，函数式，模板元编程等等。其丰富的生态，高效的算法库以及&lt;em&gt;零成本抽象&lt;/em&gt;的理念让 C++ 极为适合进行各类科学运算。此外，C++ 的语法较为亲民，其多种编程范式也便于不同背景的开发者上手，故我们在这里引入 C++ 作为后续计算使用的程序语言。&lt;/p&gt;</description></item></channel></rss>