Skip to content

Commit 7226b37

Browse files
committed
Create Atom feed for posts with Julia tag.
1 parent 8e97091 commit 7226b37

File tree

3 files changed

+51
-8
lines changed

3 files changed

+51
-8
lines changed

_config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ excerpt_separator: "<!--more-->"
1212
owner:
1313
name: Yi-Xin Liu
1414
avatar: avatar.jpg
15-
bio: "Dr. Yi-Xin Liu is a polymer physicist working in the field of polymer physics at Fudan University since 2012. Before that, he is a postdoctoral fellow at Fudan University since 2009. He received his PhD at 2009 from Peking University and BS at 2004 from Nanjing University. He has spent two years from 2014 to 2016 at University of California, Santa Barbara in Prof. Glenn H. Fredrickson's group as a visiting researcher."
15+
bio: "Dr. Yi-Xin Liu is a polymer physicist working at Fudan University since 2012. Before that, he is a postdoctoral fellow at Fudan University since 2009. He received his PhD at 2009 from Peking University and BS at 2004 from Nanjing University. He has spent two years from 2014 to 2016 at University of California, Santa Barbara in Prof. Glenn H. Fredrickson's group as a visiting researcher."
1616
email: lyx@fudan.edu.cn
1717
# Social networking links used in footer. Update and remove as you like.
1818
twitter: lyxfudan

_posts/2020-04-04-scattering-3.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
layout: post
33
title: "Julia in Practice: Building Scattering.jl from Scratch (3)"
4-
description: In this post we will implement a submodule translation.jl to perform transformation of a vector in the reference coordinate to the internal coordinate of a scatterer.
4+
description: In this post we will implement a submodule translation.jl to perform transformation of a vector in the reference coordinate to the internal coordinate of a scatterer. The internal coordinate system is obtained by translating the origin of the reference coordinate system to scatterer's center of mass.
55
author: Yi-Xin Liu
66
date: 2020-04-04
7-
modified: 2019-04-04
7+
modified: 2019-04-06
88
image:
99
feature: abstract-2.jpg
1010
twitter: scattering3/translation.png
@@ -36,7 +36,7 @@ $
3636
$
3737
</div>
3838

39-
In this post we will implement a submodule translation.jl to perform transformation of a vector in the reference coordinate to the internal coordinate of a scatterer. Translation and coordinate transformation will be discussed in detail.
39+
In this post we will implement a submodule `translation.jl` to perform transformation of a vector in the reference coordinate to the internal coordinate of a scatterer. Translation and coordinate transformation will be discussed in detail.
4040

4141
<!--more-->
4242

@@ -274,7 +274,7 @@ Translation(x::Real, y::Real, z::Real) = Translation([promote(x,y,z)...])
274274

275275
The `promote` method is provided by the Julia `Base`. It ensures the input `x,y,z` have same type which is required by the default constructor.
276276

277-
The **chaining operator** `|>` is extremely useful to increase the readability of the code. The output of the left operand of `|>` will be sent to the right operand as its input arguments. We can chain as many as methods together.
277+
The **chaining operator** `|>` is extremely useful to increase the readability of the code. The output of the left operand of `|>` will be sent to the right operand as its input arguments. We can chain as many methods as possible together.
278278

279279
### Conversion
280280
A `Translation` instance is merely a three-component column vector. Thus it is sensible to convert any three-component column (or row) vector into a `Translation` instance. Julia provides a consistent way to deal with such situation. What we do is to provide additional `convert` method to the Julia `Base`:
@@ -318,8 +318,7 @@ $$
318318
T_2T_1\vr &= T_2(\vr-T_1) \\
319319
&= (\vr - T_1) - T_2 \\
320320
&= \vr - (T_1 + T_2) \\
321-
&= \vr - T_3 \\
322-
&= T_3\vr
321+
&= (T_1 + T_2)\vr
323322
\end{split}
324323
\end{equation}\label{eq:chain_translation}
325324
$$
@@ -328,7 +327,7 @@ Therefore, we have
328327

329328
$$
330329
\begin{equation}
331-
T_3 = T_2T_1
330+
T_2T_1 = T_1 + T_2
332331
\end{equation}\label{eq:chain_translation2}
333332
$$
334333

feed_julia.xml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
layout: null
3+
---
4+
<?xml version="1.0" encoding="UTF-8"?>
5+
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
6+
<title type="text">Julia Posts by Yi-Xin Liu, A Polymer Physicist</title>
7+
<generator uri="https://github.com/jekyll/jekyll">Jekyll</generator>
8+
<link rel="self" type="application/atom+xml" href="{{ site.url }}/feed_julia.xml" />
9+
<link rel="alternate" type="text/html" href="Julia Posts by Yi-Xin Liu, A Polymer Physicist" />
10+
<updated>{{ site.time | date_to_xmlschema }}</updated>
11+
<id>{{ site.url }}/</id>
12+
<author>
13+
<name>{{ site.owner.name }}</name>
14+
<uri>{{ site.url }}/</uri>
15+
{% if site.owner.email %}<email>{{ site.owner.email }}</email>{% endif %}
16+
</author>
17+
{% for post in site.posts limit:20 %}
18+
{% unless post.draft %}
19+
{% for tag in post.tags %}
20+
{% if tag == 'Julia' %}
21+
<entry>
22+
<title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title>
23+
<link rel="alternate" type="text/html" href="{% if post.link %}{{ post.link }}{% else %}{{ site.url }}{{ post.url }}{% endif %}" />
24+
<id>{{ site.url }}{{ post.id }}</id>
25+
{% if post.modified %}<updated>{{ post.modified | to_xmlschema }}T00:00:00-00:00</updated>
26+
<published>{{ post.date | date_to_xmlschema }}</published>
27+
{% else %}<published>{{ post.date | date_to_xmlschema }}</published>
28+
<updated>{{ post.date | date_to_xmlschema }}</updated>{% endif %}
29+
<author>
30+
<name>{{ site.owner.name }}</name>
31+
<uri>{{ site.url }}</uri>
32+
<email>{{ site.owner.email }}</email>
33+
</author>
34+
<content type="html">
35+
{{ post.content | xml_escape }}
36+
{% include feed-footer.html %}
37+
</content>
38+
</entry>
39+
40+
{% endif %}
41+
{% endfor %}
42+
{% endunless %}
43+
{% endfor %}
44+
</feed>

0 commit comments

Comments
 (0)