저는 Documents에 docker-django 폴더를 만들고 그 안에 django app을 만들었습니다.
user@user-ui-MacBook-Pro:~/Documents$ mkdir docker-django
user@user-ui-MacBook-Pro:~/Documents$ cd docker-django
user@user-ui-MacBook-Pro:~/Documents/docker-django$ django-admin startproject testapp
그러면 평소에 하던데로 장고 앱이 생기고 그걸 편집기로 열겠죠
도커에 올릴 장고 앱이 있으면 4번을 생략하고 그 장고 앱에 바로 도커 파일과 requirement.txt를 만들면 됩니다.
5. django app에 도커파일 만들기
만든 장고앱에 Dockerfile이라는 이름의 파일을 만들고 다음과 같이 쓴다.
ARG PROJECT_DIR이 중요합니다.
이것은 도커의 directory를 만드는 것이고, 나중 단계인 내 컴퓨터의 directory와 docker 컨테이너의 directory를 정확하게 연결하는 과정에 쓰입니다. (testapp이라는 이름 대신 다른 directory를 만들어도 당연히 됩니다. "/자신이정한이름" )
6. requirements.txt 만들기
도커는 새로 컴퓨터를 만드는 것 같다고 위에 설명했는데 docker에는 django가 없으니 설치를 해주어야 합니다.
그러므로 django를 requirements.txt의 목록에 넣어줍니다.
7. 도커의 3가지 단계
도커를 돌리는 것은 3가지 단계로 나눌 수 있다.
1) 내가 만든 app을 이미지로 만드는 단계 (명령어: build)
docker build -t kyuran-django .
-t는 --tag의 줄임말로 이미지에 이름을 붙여주는 것이다.
cf) 명령어 맨 뒤는 언제나 위치를 나타낸다.
.은 현재 폴더에 있는 도커 파일을 이미지로 만들겠다는 의미다. (나의 현재 위치는 ~/Documents/docker-django)
The idea of this technique is to investigate critical points of a vector field, based on the eigenvalues of the Jacobian J at these critical points. A critical point is defined as an isolated point where the vector field vanishes, i.e., where u = 0. The following cases can be identified, based on the eigenvalues λ1 and λ2 of the Jacobian:
Trace[J] = a + d ( a, d are components of matrix J)
(Trace[J])^2 = 4 det[𝐽] is parabola
Attracting node:The eigenvalues are real and negative, corresponding to a sink.
벡터 필드의 벡터 v가 computational space에 정의되어 있다고 가정했을 때 유리한 점 (physical space와 비교하여)
Computational space는 기본적으로 Cartesian grid를 사용한다.Physical space는 가장 간단한 변환인 polar grid(극 좌표)부터 spherical coordinate(구면 좌표) curvilinear grid 등 어떤것이든(whatever) 될 수 있고 이것은 Cartesian grid보다 복잡하다.
i.e. Computational space를 base로 하면 상대적으로 이상한 physical space에 비해 간단한 cartesian grid를 사용하여 interpolate(보간)도 쉽게 할 수 있고, 점의 위치도 쉽게 결정 할 수 있다.
computational space에 있는 vector v와 Jacobian을 이용해서 physical space에 있는 vector u 계산하기
벡터 필드는 곡선 그리드에 극좌표로 표현되고 주어진 Φ는 coordinate function(c->p 변환 함수)이다. [A vector field is given on a curvilinear grid by polar coordinates with the coordinate function]
이 계산문제는 그닥 좋은 문제는 아니었다.
문제의 결과인 u는 cartesian grid가 된다. 즉 우리는 curvilinear한 C space에서 cartesian P space로 transfer 한 것이다. 그러나 C space는 보통 cartesian grid이므로 좀.. 이상한 문제가 된다.
핵심 개념은 rotation 파이와 Jacobian을 이용해서r in c space -> p space, v in c space -> u in p space 하는 것이다.
물리적 추론은 computational space에서 해야 할까 physical space에서 해야할까?
[Should physical reasoning be done in computational space or physical space and why? ]
결론: physical space에서 해야한다.
이유: computational space는 physical space를 단지 추상화(abstraction), 단순화(simplification한 관점이기 때문에, 우리가 실제 공간을 단순화시키면 우리는 물리적 현상의 중요한 특징을 놓칠 수 있다.
Because computational space is just a term of abstraction and simplification of physical space, you might miss an important feature.
What are possible problems for r = 0?
r = 0 is (0, 0) in cartesian coordinate. But If you express r = 0 in polar coordinates, you get an infinite number of cases. (0, pi), (0, pi/2).. and so on. Therefore, we cannot know the direction of the vector.
Show whether ∇Φ can be inverted at (r = 0, φ = 0). What are possible implications if this is not the case?
∇Φ 는 Jacobian이다.
It is impossible for the denominator to be zero. (분모가 0이 되는 것은 불가능)
We can go to physical space by Jacobian but inverse Jacobian is impossible so we can't transfer to computational space. (P space로 갈 수 있지만 C space로 갈 수 없음)
The source of the problem is Professor Filip Sadlo in University of Heidelberg