1. ( ) SPH 1. 1: 2: 2.

Similar documents
£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² –

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裱£²²ó ¡Ý½ÉÂꣲ¤Î²òÀ⡤±é½¬£²¡Ý

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裶²ó ¨¡ À©¸æ¹½Â¤¡§·«¤êÊÖ¤· ¨¡

2.2 h h l L h L = l cot h (1) (1) L l L l l = L tan h (2) (2) L l 2 l 3 h 2.3 a h a h (a, h)

REALV5_A4…p_Ł\1_4A_OCF

untitled

「都市から地方への人材誘致・移住促進に関する調査」

<91498EE88CA D815B2E786C73>

〔 大 会 役 員 〕

橡本体資料+参考条文.PDF

Lecture on

WinHPC ppt

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡


新版明解C言語 実践編

SystemC言語概論


programmingII2019-v01

1.ppt

ex01.dvi

1 (Berry,1975) 2-6 p (S πr 2 )p πr 2 p 2πRγ p p = 2γ R (2.5).1-1 : : : : ( ).2 α, β α, β () X S = X X α X β (.1) 1 2

para02-2.dvi

1 CUI CUI CUI 1.1 cout cin redirect.cpp #i n c l u d e <s t r i n g > 3 using namespace std ; 5 6 i n t main ( void ) 7 { 8 s t r i n g s ; 10 c

comment.dvi

2 KH Coder KH Coder KH Coder KH Coder

5 5.1 E 1, E 2 N 1, N 2 E tot N tot E tot = E 1 + E 2, N tot = N 1 + N 2 S 1 (E 1, N 1 ), S 2 (E 2, N 2 ) E 1, E 2 S tot = S 1 + S 2 2 S 1 E 1 = S 2 E

A B A E

2.5 (Gauss) (flux) v(r)( ) S n S v n v n (1) v n S = v n S = v S, n S S. n n S v S v Minoru TANAKA (Osaka Univ.) I(2012), Sec p. 1/30

( CUDA CUDA CUDA CUDA ( NVIDIA CUDA I

2

untitled

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

chap03.dvi

30

C

BW BW

GIZMO ¤ÇÍ·¤ó¤Ç¤ß¤ë

PowerPoint プレゼンテーション

Java (7) Lesson = (1) 1 m 3 /s m 2 5 m 2 4 m 2 1 m 3 m 1 m 0.5 m 3 /ms 0.3 m 3 /ms 0.6 m 3 /ms 1 1 3

,,..,. 1


ex01.dvi

memo

p12.dvi


lexex.dvi


-5 -

別冊 各分野における虐待事例と分析

2 T ax 2 + 2bxy + cy 2 + dx + ey + f = 0 a + b + c > 0 a, b, c A xy ( ) ( ) ( ) ( ) u = u 0 + a cos θ, v = v 0 + b sin θ 0 θ 2π u = u 0 ± a

untitled

2008 ( 13 ) C LAPACK 2008 ( 13 )C LAPACK p. 1

±é½¬£²¡§£Í£Ð£É½éÊâ


やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF

日本外傷歯学会認定医(平成24年11月30日付) H

海生研ニュース

XMPによる並列化実装2


( : December 27, 2015) CONTENTS I. 1 II. 2 III. 2 IV. 3 V. 5 VI. 6 VII. 7 VIII. 9 I. 1 f(x) f (x) y = f(x) x ϕ(r) (gradient) ϕ(r) (gradϕ(r) ) ( ) ϕ(r)

r02.dvi

ohp02.dvi

Kroneher Levi-Civita 1 i = j δ i j = i j 1 if i jk is an even permutation of 1,2,3. ε i jk = 1 if i jk is an odd permutation of 1,2,3. otherwise. 3 4

untitled

No.004 [1] J. ( ) ( ) (1968) [2] Morse (1997) [3] (1988) 1

Hanbury-Brown Twiss (ver. 2.0) van Cittert - Zernike mutual coherence

文庫●注文一覧表2016c(7月)/岩波文庫


PowerPoint プレゼンテーション

ex12.dvi

SystemC 2.0を用いた簡易CPUバスモデルの設計

joho07-1.ppt

Condition DAQ condition condition 2 3 XML key value

6 6.1 sound_wav_files flu00.wav.wav 44.1 khz 1/44100 spwave Text with Time spwave t T = N t N 44.1 khz t = 1 sec j t f j {f 0, f 1, f 2,, f N 1

Microsoft PowerPoint - masayukiakiyama_ pptx


102

: , 2.0, 3.0, 2.0, (%) ( 2.

1 4 2 EP) (EP) (EP)

r07.dvi

p = 1, 2, cos 2n + p)πj = cos 2nπj 2n + p)πj, sin = sin 2nπj 7.1) f j = a ) 0 + a p + a n+p cos 2nπj p=1 p=0 1 + ) b n+p p=0 sin 2nπj 1 2 a 0 +

ohp07.dvi

Java演習(4) -- 変数と型 --

ohp03.dvi

#A A A F, F d F P + F P = d P F, F y P F F x A.1 ( α, 0), (α, 0) α > 0) (x, y) (x + α) 2 + y 2, (x α) 2 + y 2 d (x + α)2 + y 2 + (x α) 2 + y 2 =

重力方向に基づくコントローラの向き決定方法

- 1 -

%

2

ID010-2

slide5.pptx

r3.dvi

01

No.28

sec13.dvi


untitled

ohp11.dvi

r11.dvi

r08.dvi

Transcription:

SPH 2014/08/06 2014

1. ( ) 2. 3. 4. SPH 1. 1: 2: 2.

1. ( ) 2. 3. 4.

MPI SIMD

:

1. MPI : 2. ( ) MPI :

( ) : DRY (Don t Repeat Yourself)

( ) : DRY (Don t Repeat Yourself) ( 2014 7 )

(SPH MPS MLS ) ( : Tree, FMM, PME ) ( ) ( ) ( )

API C++ ( ) (I/O )

SPH MPI

Recursive Multisection (JM 2004) Tofu ( 2009 2012)

1. #include<particle_simulator.h> // class ResultForce{ // public: void clear(){ // acc = 0.0; pot = 0.0; } // PS::F64vec acc; PS::F64 pot; };

(1) class RealPtcl{ // public: PS::F64vec getpos() const { // return this->pos; } PS::F64 getcharge() const { // return this->mass; } void copyfromforce(const ResultForce & force){ // this->acc = force.acc; this->pot = force.pot; }

(2) // PS::S64 id; PS::F64 mass; PS::F64vec pos; PS::F64vec vel; PS::F64vec acc; PS::F64 pot; PS::S32 loadoneparticle(file * fp) { PS::S32 ret = 0; ret = fscanf(fp, "%lf%lf%lf%lf%lf%lf%lf", &this->mass, &this->pos[0], &this->pos[1], &this->pos[2 &this->vel[0], &this->vel[1], &this->vel[2 std::cout<<"this->mass"<<this->mass<<std::endl; return ret; }

(3) void dumponeparticle(file * fp){ fprintf(fp, "%lf %lf %lf %lf %lf %lf %lf this->mass, this->pos[0], this->pos[1], this->pos[2], this->vel[0], this->vel[1], this->vel[2]); } }; class EssentialPtclI{ public: void copyfromrp(const RealPtcl & rp){ // pos = rp.pos; id = rp.id; } }; // PS::F64vec pos; PS::S64 id;

(4) class EssentialPtclJ{ public: void copyfromrp(const RealPtcl & rp){ // mass = rp.mass; pos = rp.pos; id = rp.id; } }; // PS::S64 id; PS::F64 mass; PS::F64vec pos;

void CalcForceEpEp(const EssentialPtclI * ep_i, const PS::S32 n_ip, const EssentialPtclJ * ep_j, const PS::S32 n_jp, ResultForce * force){ for(ps::s32 i=0; i<n_ip; i++){ PS::F64vec xi = ep_i[i].pos; PS::F64vec ai = 0.0; PS::F64 poti = 0.0; PS::S64 idi = ep_i[i].id; for(ps::s32 j=0; j<n_jp; j++){ if( idi == ep_j[j].id ) continue; PS::F64vec rij = xi - ep_j[j].pos; PS::F64 r3_inv = rij * rij; PS::F64 r_inv = 1.0/sqrt(r3_inv); r3_inv = r_inv * r_inv; r_inv *= ep_j[j].mass; r3_inv *= r_inv; ai -= r3_inv * rij; poti -= r_inv;

} } ( ) } force[i].acc = ai; force[i].pot = poti;

( ) // (Leapfrog) void Kick(PS::ParticleSystem<RealPtcl> system, const PS::F64 dt){ RealPtcl * rp = system.getparticlepointer(); PS::S32 ni = system.getnumberofparticlelocal(); for(int i=0; i<ni; i++){ rp[i].vel = rp[i].acc * dt; } } void Drift(PS::ParticleSystem<RealPtcl> system, const PS::F64 dt){ RealPtcl * rp = system.getparticlepointer(); PS::S32 ni = system.getnumberofparticlelocal(); for(int i=0; i<ni; i++){ rp[i].pos = rp[i].vel * dt; } }

int main(int argc, char *argv[]){ PS::Initialize(argc, argv); // PS::ParticleSystem<RealPtcl> nbody_system; // nbody_system.loadparticlesingle(argv[1], "r", &RealPtcl::lo PS::DomainInfo dinfo; dinfo.initialize("domain_info.para"); dinfo.decomposedomainall(nbody_system); // PS::TreeType<ResultForce, EssentialPtclI, EssentialPtclJ>:: PS::F32 theta = 0.5; PS::S32 n_leaf_max = 8; PS::S32 n_grp_max = 64; // grav_tree.initialize(nbody_system.getnumberofparticletotal(

// LT LET GT nbody_system grav_tree.calcforceallandwriteback(calcforceepep, dinfo, nb PS::F64 dt = 0.125; PS::F64 tend = 100.0; PS::F64 tsys = 0.0; Kick(nbody_system, dt*0.5); while(tsys < tend){ tsys += dt; Drift(nbody_system, dt); if( fmod(tsys, 1.0) == 0){ // dinfo.decomposedomainall(nbody_system); } grav_tree.calcforceallandwriteback(calcforceepep, dinfo Kick(nbody_system, dt); }

} PS::Finalize(); return 0;

150 ( )

1: 2:

: : v v = 0 t + (v )v = p + 1 Re 2 v CFL

1 2 3 CG ( )

: : CFL 1 : ( )

( ) Explicit-MPS ( 2011, MPS S semiimplicit ) (Fan et al. 2003, Hotta et al. 2012)

0 1 ξ ξ

: : ( ) ( )

: : 1

ρ dv dt = p ρge z + Π ρc p dt dt = λ dp dt = (k T ) + (others) ξρ dv dt = p ρge z + 1 c Π ρc p dt dt = λ dp dt = (ck T ) + (others)

ξ: c: Q: 1 2 A: 1 Q: A: R R 1/3

( )

SPH SPH ( ) ( )3

1000

1000 1/1000 1

2

( ) ( )

( ) ( )

SPH

SPH f f ( x) = f( x )W ( x x )d x. (1) ρ( x) = j m j W ( x x j ), (2) SPH f = j m j f j ρ( x) W ( x x j). (3)

SPH (1) f : f = f 1 = j f ( x) j m j 1 ρ( x) W ( x x j). (4) m j f( x j ) ρ( x j ) W ( x x j). (5)

SPH (2) 1 P ρ 1 ρ P = P ρ 2 ρ + P ρ2. (6) v i = j m j ( Pi ρ 2 i + P j ρ 2 j ) W (x i x j ), (7) x i

SPH KH Agertz et al (MN 2007, 380,963) SPH Grid Brob test Kelvin-Helmholtz ( 3 ) SPH

(1) ( 1/10 10 ) 3 Grid 2 Gasoline ( 10M ) SPH

(2) SPH KH

(3) 2

SPH 2 ρ 2 1 = 1 m j ρ( x) W ( x x j). (8) j 1 ρ P = P ρ 2 ρ + P ρ2. (9) SPH

: ρ u ( ) u u u ( ) ( )

( ) : f ( x) = j m j f( x j ) ρ( x j ) W ( x x j). (10) d x m j /ρ( x j )

(Saito and Makino 2013, Hosono et al. 2013) (SM13, Hosono et al. 2014) (Yamamoto et al. submitted) ( )

(1) : : =1 : =

(2) KHI : : =1 : =

( ) SPH 0