OHP.dvi
|
|
- さいぞう やすもと
- 5 years ago
- Views:
Transcription
1 0 7 4
2
3 Gauss PC 0 Gauss 3
4 Gauss Gauss u [] u [3] u [4] u [4] P 0 = P 0 (),3,4 (,), (3,), (4,) 0,,,3, u [] u [3] u [4] u [4] = P P 6 P 3 P 6 () 3,4 (3,), (4,) 0, 3, u [] u [3] u [4] u [4] = P P 6 5P 8 P 8 (3) 3 4 (4,3) u [] u [3] u [4] u [4] = P P 6 5P 8 0 (4) 4
5 u [4] = u [] u [3] u [4] = P P 6 5P 8 0 u [4] = P [ ]{ u [] u [3] = { { P P P = { 3P 4 0 (5) (6) u [3] =0 3 4 u[] = 3P (7) u [] = P u [] = u [4] = P
6 Gauss Gauss A = LU L U LU Gauss i i i +,,n k i+,i,,k n,i 0 i k i+,i /k ii i + i k i+,i /k ii i + n n f n k nn u n u n f i (i =,n ) f i = f i k in u n (8) n gauss.f, gauss.c bstiff f tdispl i 6
7 !########################################################################! gauss.f!######################################################################## implicit none real(8) :: bstiff(4,4), tdispl(4), f(4), a integer :: ntotdf, i, j, m ntotdf = 4 bstiff(,) = 3.D0 / 4.D0 bstiff(,) =.D0 / 4.D0 bstiff(3,) = -.D0 / 4.D0 bstiff(4,) = -.D0 / 4.D0 bstiff(,) =.D0 / 4.D0 bstiff(,) = 3.D0 / 4.D0 bstiff(3,) = -.D0 / 4.D0 bstiff(4,) = -.D0 / 4.D0 bstiff(,3) = -.D0 / 4.D0 bstiff(,3) = -.D0 / 4.D0 bstiff(3,3) = 3.D0 / 4.D0 bstiff(4,3) =.D0 / 4.D0 bstiff(,4) = -.D0 / 4.D0 bstiff(,4) = -.D0 / 4.D0 bstiff(3,4) =.D0 / 4.D0 bstiff(4,4) = 3.D0 / 4.D0 f(:4) = 0.D0 f() =.D0 /.D0 f(3) =.D0 /.D0 do i =, ntotdf do m = i+, ntotdf a = bstiff(m,i) / bstiff(i,i) do j = i, ntotdf bstiff(m, j) = bstiff(m, j) - a * bstiff(i, j) f(m) = f(m) - a * f(i) 7
8 do j =, 4 write(*,000) bstiff(j,:4),f(j) write(*,*) 000 format(x,e3.6,x,e3.6,x,e3.6,x,e3.6,x,e3.6) do i = ntotdf,, - tdispl(i) = f(i) / bstiff(i,i) do j =, i- f(j) = f(j) - tdispl(i) * bstiff(j,i) write(*,000) f(:4) do i =, 4 write(*,*) tdispl(i) stop end /************************************************************************* gauss.c *************************************************************************/ #include <stdio.h> main() { double bstiff[4][4], tdispl[4], f[4], a; int ntotdf, i, j, m, n; ntotdf = 4; bstiff[0][0] = 3.0 / 4.0; bstiff[][0] =.0 / 4.0; bstiff[][0] = -.0 / 4.0; bstiff[3][0] = -.0 / 4.0; bstiff[0][] =.0 / 4.0; bstiff[][] = 3.0 / 4.0; bstiff[][] = -.0 / 4.0; bstiff[3][] = -.0 / 4.0; bstiff[0][] = -.0 / 4.0; bstiff[][] = -.0 / 4.0; bstiff[][] = 3.0 / 4.0; bstiff[3][] =.0 / 4.0; bstiff[0][3] = -.0 / 4.0; bstiff[][3] = -.0 / 4.0; bstiff[][3] =.0 / 4.0; bstiff[3][3] = 3.0 / 4.0; f[0] =.0 /.0; f[] = 0.0; f[] =.0 /.0; f[3] = 0.0; for(i=0; i<ntotdf; i++){ for(m=i+; m<ntotdf; m++){ a = bstiff[m][i] / bstiff[i][i]; 8
9 for(j=i; j<ntotdf; j++){ bstiff[m][j] -= a * bstiff[i][j]; f[m] = f[m] - a * f[i]; for(j=0; j<ntotdf; j++){ for (n=0; n<ntotdf; n++){ printf("%4.5e", bstiff[j][n]); printf("%4.5e \n", f[j]); printf("\n"); for(i=ntotdf-; i>=0; i--){ tdispl[i] = f[i] / bstiff[i][i]; for (j=0; j<i; j++){ f[j] -= tdispl[i] * bstiff[j][i]; for(j=0; j<ntotdf; j++){ printf("%4.5e",f[j]); printf("\n"); for (n=0; n<ntotdf; n++){ printf("%4.5e \n", tdispl[n]); 9
10 [](0, 0), [](0, ), [3](, 0) k =,k = u [] [] () [] 45 u [] u [] u [3] u [3] [] [] u [] X [3] () X [3] () () [3] Gauss Owen, Hinton nnode (number of node) 0
11 coords(,nnode), coords[][nnode] iboun(,nnode), iboun[][nnode] load(,nnode), load[][nnode] nelem (number of element) lnods(,nelem) (link of node) k(nelem) load(,nnode), load[][nnode] truss.dat nnode, nelem idum, coords(,), coords(,), iboun(,), iboun(,) idum, coords(,), coords(,), iboun(,), iboun(,) idum, coords(,3), coords(,3), iboun(,3), iboun(,3) idum, lnods(,), lnods(,), k() idum, lnods(,), lnods(,), k() nload idum, inode, idir, load(idir,inode) idum, inode, idir, load(idir,inode) nnode, nelem coords, lnods, load nnode, nelem fortran allocate C malloc C
12 idum idum load coords inode ( )idir
13 0 C, fortran [k] k θ k cos θ kcos θ sin θ k cos θ k cos θ sin θ k cos θ sin θ ksin θ k cos θ sin θ k sin θ [k] = k cos θ k cos θ sin θ kcos (9) θ kcos θ sin θ k cos θ sin θ k sin θ kcos θ sin θ ksin θ θ θ cos θ, sin θ (), () cos θ, sin θ () () () cos θ = sin θ = X () X () ( ) ( ) (0) X () X () + X () X () X () X () ( ) ( ) () X () X () + X () X () C,, 3 lnods [k] astiff[4][4],.443 3
14 0 0 [k ]= 0 0, [k ]= () 4
15 merge merge merge estiff estiff sstiff,, 3, (, ), (3, 4), (5, 6), 3 (,, 3, 4) (,, 5, 6), 3 (,, 3, 4) (3, 4, 5, 6) [ k ], [ k ] [ k ]= , [ k ]= (3) [K] [K] = (4) 5
16 0 i u i =0 i 0 u +0 u + + u i + +0 u n = 0 (5) u i 0 i i 0 k ii =, X,X,, 3, 4,,, 3, 4,, 3, 4 0 K = K = K 33 = K 44 = [K] = (6)
17 truss.f, truss.c implicit none real(8) :: coords(,00), sstiff(00,00), $ bstiff(00,00), estiff(00,00), astiff(4,4), $ tdispl(00), cos, sin, x, y, x, y, k(00), a, $ load(,00), f(00) integer :: lnods(,00),iboun(,00), nnode, nelem, $ nload, inode, idir, ipos(4), ntotdf integer :: i, j, m, idum, ielem! input open(0,file= truss.dat ) read(0,*) nnode, nelem do i =, nnode read(0,*) idum, coords(:,i), iboun(:,i)! do i =, nnode! write(*,*) idum, coords(:,i), iboun(:,i)! do i =, nelem read(0,*) idum, lnods(:,i), k(i)! do i =, nelem! write(*,*) idum, lnods(:,i), k(i)! read(0,*) nload do i =, nload read(0,*) idum, inode, idir, load(idir, inode)! do i =, nnode! write(*,*) i, load(:,i)! close(0)! ntotdf = nnode * sstiff(:ntotdf, :ntotdf) = 0.D0 do ielem =, nelem! stiff x = coords(,lnods(,ielem)) y = coords(,lnods(,ielem)) 7
18 x = coords(,lnods(,ielem)) y = coords(,lnods(,ielem)) cos = (x - x) / dsqrt((x - x)** + (y - y)**) sin = (y - y) / dsqrt((x - x)** + (y - y)**)! write(*,*) cos, sin astiff(,) = k(ielem) * cos * cos astiff(,) = k(ielem) * cos * sin astiff(3,) = -k(ielem) * cos * cos astiff(4,) = -k(ielem) * cos * sin astiff(,) = k(ielem) * cos * sin astiff(,) = k(ielem) * sin * sin astiff(3,) = -k(ielem) * cos * sin astiff(4,) = -k(ielem) * sin * sin astiff(,3) = -k(ielem) * cos * cos astiff(,3) = -k(ielem) * cos * sin astiff(3,3) = k(ielem) * cos * cos astiff(4,3) = k(ielem) * cos * sin astiff(,4) = -k(ielem) * cos * sin astiff(,4) = -k(ielem) * sin * sin astiff(3,4) = k(ielem) * cos * sin astiff(4,4) = k(ielem) * sin * sin! do i =, 4! write(*,000) astiff(i,:4)!! write(*,*)! 000 format(x,e3.6,x,e3.6,x,e3.6,x,e3.6)! merge ipos() = (lnods(,ielem)-) * + ipos() = (lnods(,ielem)-) * + ipos(3) = (lnods(,ielem)-) * + ipos(4) = (lnods(,ielem)-) * +! write(*,*) ipos(:4) estiff(:ntotdf, :ntotdf) = 0.D0 do i =, 4 do j =, 4 estiff(ipos(i), ipos(j)) = astiff(i,j)! do i =, ntotdf! write(*,000) estiff(i,:6)!! write(*,*)! 000 format(x,e.5,x,e.5,x,e.5,x,e.5,x,e.5,x,e.5) do i =, ntotdf do j =, ntotdf sstiff(i,j) = sstiff(i,j) + estiff(i,j) 8
19 ! bound bstiff(:ntotdf,:ntotdf) = sstiff(:ntotdf, :ntotdf) do i =, nnode do j =, if (iboun(j,i).eq. ) then idum = (i-)* + j do m =, ntotdf bstiff(idum, m) = 0.D0 bstiff(m, idum) = 0.D0 bstiff(idum, idum) =.D0 end if! do i =, ntotdf! write(*,000) bstiff(i,:6)!! write(*,*)! 000 format(x,e.5,x,e.5,x,e.5,x,e.5,x,e.5,x,e.5)! do i =, nnode do j =, idum = (i-)* + j f(idum) = load(j,i)! gauss do i =, ntotdf do m = i+, ntotdf a = bstiff(m,i) / bstiff(i,i) do j = i, ntotdf bstiff(m, j) = bstiff(m, j) - a * bstiff(i, j) f(m) = f(m) - a * f(i) do i = ntotdf,, - tdispl(i) = f(i) / bstiff(i,i) do j =, i- f(j) = f(j) - tdispl(i) * bstiff(j,i)! do i =, ntotdf write(*,*) tdispl(i) stop end /************************************************************************* truss.c *************************************************************************/ 9
20 #include <stdio.h> main() { double coords[][00], k[00], load[][00], sstiff[00][00], x, x, y, y, cos, sin, astiff[4][4], estiff[00][00], bstiff[00][00], a, f[00], tdispl[00]; int nnode, nelem, iboun[][00], lnods[][00],i, j, idum, nload, inode, idir, ntotdf, ielem, ipos[4], m; FILE *fp; /* input */ if ((fp = fopen("truss.dat","r")) == NULL) exit(); fscanf(fp, "%d %d", &nnode, &nelem); for(i=0; i<nnode; i++ ){ fscanf(fp, "%d %lg %lg %d %d", &idum, &coords[0][i], &coords[][i], &iboun[0][i], &iboun[][i]); /* for(i=0; i<nnode; i++ ){ printf("%d %lg %lg %d %d \n", idum, coords[0][i], coords[][i], iboun[0][i], iboun[][i]); */ for(i=0; i<nelem; i++ ){ fscanf(fp, "%d %d %d %lg", &idum, &lnods[0][i], &lnods[][i], &k[i]); /*for(i=0; i<nelem; i++ ){ printf("%d %d %d %lg \n", idum, lnods[0][i], lnods[][i], k[i]); */ fscanf(fp, "%d", &nload); for(i=0; i<nload; i++){ fscanf(fp, "%d %d %d", &idum, &inode, &idir); fscanf(fp, "%lg", &load[idir-][inode-]); /* for(i=0; i<nnode; i++ ){ printf("%lg %lg \n", load[0][i], load[][i]); */ /* */ ntotdf = nnode * ; for(i=0; i<ntotdf; i++){ for(j=0; j<ntotdf; j++){ sstiff[i][j] = 0.0; for(ielem=0; ielem<nelem; ielem++){ /* stiff */ x = coords[0][lnods[0][ielem]-]; y = coords[][lnods[0][ielem]-]; x = coords[0][lnods[][ielem]-]; y = coords[][lnods[][ielem]-]; 0
21 cos = (x - x) / sqrt((x - x)*(x - x) + (y - y)*(y - y)); sin = (y - y) / sqrt((x - x)*(x - x) + (y - y)*(y - y)); /* printf("%lg %lg\n", cos, sin);*/ astiff[0][0] = k[ielem] * cos * cos; astiff[][0] = k[ielem] * cos * sin; astiff[][0] = -k[ielem] * cos * cos; astiff[3][0] = -k[ielem] * cos * sin; astiff[0][] = k[ielem] * cos * sin; astiff[][] = k[ielem] * sin * sin; astiff[][] = -k[ielem] * cos * sin; astiff[3][] = -k[ielem] * sin * sin; astiff[0][] = -k[ielem] * cos * cos; astiff[][] = -k[ielem] * cos * sin; astiff[][] = k[ielem] * cos * cos; astiff[3][] = k[ielem] * cos * sin; astiff[0][3] = -k[ielem] * cos * sin; astiff[][3] = -k[ielem] * sin * sin; astiff[][3] = k[ielem] * cos * sin; astiff[3][3] = k[ielem] * sin * sin; /* for(i=0; i<4; i++){ for(j=0; j<4; j++){ printf("%4.5e", astiff[i][j]); printf("\n"); printf("\n");*/ /* merge */ ipos[0] = (lnods[0][ielem]-) * ; ipos[] = (lnods[0][ielem]-) * + ; ipos[] = (lnods[][ielem]-) * ; ipos[3] = (lnods[][ielem]-) * + ; for(i=0; i<ntotdf; i++){ for(j=0; j<ntotdf; j++){ estiff[i][j] = 0.0; for(i=0; i<4; i++){ for(j=0; j<4; j++){ estiff[ipos[i]][ipos[j]] = astiff[i][j]; /* for(i=0; i<6; i++){ for(j=0; j<6; j++){ printf("%4.5e", estiff[i][j]); printf("\n"); printf("\n");*/
22 for(i=0; i<ntotdf; i++){ for(j=0; j<ntotdf; j++){ sstiff[i][j] += estiff[i][j]; /* bound */ for(i=0; i<ntotdf; i++){ for(j=0; j<ntotdf; j++){ bstiff[i][j] = sstiff[i][j]; for(i=0; i<nnode; i++){ for(j=0; j< ; j++){ if(iboun[j][i] == ){ idum = i* + j; for(m=0; m<ntotdf; m++){ bstiff[idum][m] = 0.0; bstiff[m][idum] = 0.0; bstiff[idum][idum] =.0; /*for(i=0; i<6; i++){ for(j=0; j<6; j++){ printf("%4.5e", bstiff[i][j]); printf("\n"); printf("\n");*/ /* */ for(i=0; i<nnode; i++){ for(j=0; j< ; j++){ idum = i* + j; f[idum] = load[j][i]; /* gauss */ for(i=0; i<ntotdf; i++){ for(m=i+; m<ntotdf; m++){ a = bstiff[m][i] / bstiff[i][i]; for(j=i; j<ntotdf; j++){ bstiff[m][j] -= a * bstiff[i][j]; f[m] = f[m] - a * f[i]; for(i=ntotdf-; i>=0; i--){ tdispl[i] = f[i] / bstiff[i][i];
23 for (j=0; j<i; j++){ f[j] -= tdispl[i] * bstiff[j][i]; /* */ for (m=0; m<ntotdf; m++){ printf("%4.5e \n", tdispl[m]); 3
第7章 有限要素法のプログラミング
April 3, 2019 1 / 34 7.1 ( ) 2 Poisson 2 / 34 7.2 femfp.c [1] main( ) input( ) assem( ) ecm( ) f( ) solve( ) gs { solve( ) output( ) 3 / 34 7.3 fopen() #include FILE *fopen(char *fname, char
More information1 5 13 4 1 41 1 411 1 412 2 413 3 414 3 415 4 42 6 43 LU 7 431 LU 10 432 11 433 LU 11 44 12 441 13 442 13 443 SOR ( ) 14 444 14 445 15 446 16 447 SOR 16 448 16 45 17 4 41 n x 1,, x n a 11 x 1 + a 1n x
More information. (.8.). t + t m ü(t + t) + c u(t + t) + k u(t + t) = f(t + t) () m ü f. () c u k u t + t u Taylor t 3 u(t + t) = u(t) + t! u(t) + ( t)! = u(t) + t u(
3 8. (.8.)............................................................................................3.............................................4 Nermark β..........................................
More information[1] #include<stdio.h> main() { printf("hello, world."); return 0; } (G1) int long int float ± ±
[1] #include printf("hello, world."); (G1) int -32768 32767 long int -2147483648 2147483647 float ±3.4 10 38 ±3.4 10 38 double ±1.7 10 308 ±1.7 10 308 char [2] #include int a, b, c, d,
More informationXMPによる並列化実装2
2 3 C Fortran Exercise 1 Exercise 2 Serial init.c init.f90 XMP xmp_init.c xmp_init.f90 Serial laplace.c laplace.f90 XMP xmp_laplace.c xmp_laplace.f90 #include int a[10]; program init integer
More information11042 計算機言語7回目 サポートページ:
11042 7 :https://goo.gl/678wgm November 27, 2017 10/2 1(print, ) 10/16 2(2, ) 10/23 (3 ) 10/31( ),11/6 (4 ) 11/13,, 1 (5 6 ) 11/20,, 2 (5 6 ) 11/27 (7 12/4 (9 ) 12/11 1 (10 ) 12/18 2 (10 ) 12/25 3 (11
More informationFortran90/95 [9]! (1 ) " " 5 "Hello!"! 3. (line) Fortran Fortran 1 2 * (1 ) 132 ( ) * 2 ( Fortran ) Fortran ,6 (continuation line) 1
Fortran90/95 2.1 Fortran 2-1 Hello! 1 program example2_01! end program 2! first test program ( ) 3 implicit none! 4 5 write(*,*) "Hello!"! write Hello! 6 7 stop! 8 end program example2_01 1 program 1!
More information9 8 7 (x-1.0)*(x-1.0) *(x-1.0) (a) f(a) (b) f(a) Figure 1: f(a) a =1.0 (1) a 1.0 f(1.0)
E-mail: takio-kurita@aist.go.jp 1 ( ) CPU ( ) 2 1. a f(a) =(a 1.0) 2 (1) a ( ) 1(a) f(a) a (1) a f(a) a =2(a 1.0) (2) 2 0 a f(a) a =2(a 1.0) = 0 (3) 1 9 8 7 (x-1.0)*(x-1.0) 6 4 2.0*(x-1.0) 6 2 5 4 0 3-2
More informationex01.dvi
,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) double
More information[ 1] 1 Hello World!! 1 #include <s t d i o. h> 2 3 int main ( ) { 4 5 p r i n t f ( H e l l o World!! \ n ) ; 6 7 return 0 ; 8 } 1:
005 9 7 1 1.1 1 Hello World!! 5 p r i n t f ( H e l l o World!! \ n ) ; 7 return 0 ; 8 } 1: 1 [ ] Hello World!! from Akita National College of Technology. 1 : 5 p r i n t f ( H e l l o World!! \ n ) ;
More informationsim98-8.dvi
8 12 12.1 12.2 @u @t = @2 u (1) @x 2 u(x; 0) = (x) u(0;t)=u(1;t)=0fort 0 1x, 1t N1x =1 x j = j1x, t n = n1t u(x j ;t n ) Uj n U n+1 j 1t 0 U n j =1t=(1x) 2 = U n j+1 0 2U n j + U n j01 (1x) 2 (2) U n+1
More information実際の株価データを用いたオプション料の計算
2002 2 20 1 1 3 2 3 2.1 : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5 2.1.1 : : : : : : : : : : : : : : : : : : : : 5 2.1.2 : : : : : : : : : : : : : : : : : : : : 6 2.2 : : : : : : : : : :
More informationuntitled
Fortran90 ( ) 17 12 29 1 Fortran90 Fortran90 FORTRAN77 Fortran90 1 Fortran90 module 1.1 Windows Windows UNIX Cygwin (http://www.cygwin.com) C\: Install Cygwin f77 emacs latex ps2eps dvips Fortran90 Intel
More informationMicrosoft Word - 資料 docx
y = Asin 2πt T t t = t i i 1 n+1 i i+1 Δt t t i = Δt i 1 ( ) y i = Asin 2πt i T 29 (x, y) t ( ) x = Asin 2πmt y = Asin( 2πnt + δ ) m, n δ (x, y) m, n 30 L A x y A L x 31 plot sine curve program sine implicit
More informationsim0004.dvi
4 : 1 f(x) Z b a dxf(x) (1) ( Double Exponential method=de ) 1 DE N = n T n h h =(b a)=n T n = b a f(a) +f(b) n f + f(a + j b a n )g n j=1 = b a f(a) +f(b) n f + f(a +j b a )g; n n+1 j=1 T n+1 = b a f(a)
More information< 中略 > 24 0 NNE 次に 指定した日時の時間降水量と気温を 観測地点の一覧表に載っているすべての地点について出力するプログラムを作成してみます 観測地点の一覧表は index.txt というファイルで与えられています このファイルを読みこむためのサブルーチンが AMD
地上気象観測データの解析 1 AMeDAS データの解析 研究を進めるにあたって データ解析用のプログラムを自分で作成する必要が生じることがあります ここでは 自分で FORTRAN または C でプログラムを作成し CD-ROM に入った気象観測データ ( 気象庁による AMeDAS の観測データ ) を読みこんで解析します データを読みこむためのサブルーチンや関数はあらかじめ作成してあります それらのサブルーチンや関数を使って自分でプログラムを書いてデータを解析していきます
More informationコンピュータ概論
4.1 For Check Point 1. For 2. 4.1.1 For (For) For = To Step (Next) 4.1.1 Next 4.1.1 4.1.2 1 i 10 For Next Cells(i,1) Cells(1, 1) Cells(2, 1) Cells(10, 1) 4.1.2 50 1. 2 1 10 3. 0 360 10 sin() 4.1.2 For
More information:30 12:00 I. I VI II. III. IV. a d V. VI
2017 2017 08 03 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF X [ S ] a S S ; X X X, S [, a, ], ; BNF X (parse tree) (1) [a;a] (2) [[a]] (3) [a;[a]] (4) [[a];a] : [a] X 2 222222
More informationPowerPoint プレゼンテーション
計算機実習 Ⅰ FORTRAN 担当 2018.05.29 本日の課題 プログラムの基本ルールを理解し 以下が含まれるプログラムを作成する (1) 文法の基礎 ( フローチャートなど ) (2) 変数宣言 (3) 入出力 (4) 四則演算 (5) 組込関数 (6) 判定文 (7) リダイレクション PROGRAM MAIN INTEGER I, J, K REAL A, B, C CHARACTER
More information(Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1
(Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1 17 Fortran Formular Tranlator Lapack Fortran FORTRAN, FORTRAN66, FORTRAN77, FORTRAN90, FORTRAN95 17.1 A Z ( ) 0 9, _, =, +, -, *,
More information1 4 2 EP) (EP) (EP)
2003 2004 2 27 1 1 4 2 EP) 5 3 6 3.1.............................. 6 3.2.............................. 6 3.3 (EP)............... 7 4 8 4.1 (EP).................... 8 4.1.1.................... 18 5 (EP)
More information超初心者用
3 1999 10 13 1. 2. hello.c printf( Hello, world! n ); cc hello.c a.out./a.out Hello, world printf( Hello, world! n ); 2 Hello, world printf n printf 3. ( ) int num; num = 100; num 100 100 num int num num
More informationex01.dvi
,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) { double
More informationmain.dvi
y () 5 C Fortran () Fortran 32bit 64bit 2 0 1 2 1 1bit bit 3 0 0 2 1 3 0 1 2 1 bit bit byte 8bit 1byte 3 0 10010011 2 1 3 0 01001011 2 1 byte Fortran A A 8byte double presicion y ( REAL*8) A 64bit 4byte
More informationII 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C main main 1 NULL NULL for 2 (a) Yacc 2 (b) 2 3 y
II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C 1 6 9 1 main main 1 NULL NULL 1 15 23 25 48 26 30 32 36 38 43 45 47 50 52 for 2 (a) 2 2 1 Yacc 2 (b) 2 3 yytext tmp2 ("") tmp2->next->word tmp2 yytext tmp2->next->word
More information< 中略 > 24 0 NNE 次に 指定した日時の時間降水量と気温を 観測地点の一覧表に載っているすべての地点について出力するプログラムを作成してみます 観測地点の一覧表は index.txt というファイルで与えられています このファイルを読みこむためのサブルーチンが AMD
気象観測データの解析 1 AMeDAS データの解析 研究を進めるにあたって データ解析用のプログラムを自分で作成する必要が生じることがあります ここでは 自分で FORTRAN または C でプログラムを作成し CD-ROM に入った気象観測データ ( 気象庁による AMeDAS の観測データ ) を読みこんで解析します データを読みこむためのサブルーチンや関数はあらかじめ作成してあります それらのサブルーチンや関数を使って自分でプログラムを書いてデータを解析していきます
More information6 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
6 6.1 sound_wav_files flu00.wav.wav 44.1 khz 1/44100 spwave Text with Time spwave t T = t 44.1 khz t = 1 sec 44100 j t f j {f 0, f 1, f 2,, f 1 6.2 T {f 0, f 1, f 2,, f 1 T ft) f j = fj t) j = 0, 1, 2,,
More informationp = 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 +
7 7.1 sound_wav_files flu00.wav.wav 44.1 khz 1/44100 spwave Text with Time spwave T > 0 t 44.1 khz t = 1 44100 j t f j {f 0, f 1, f 2,, f 1 = T t 7.2 T {f 0, f 1, f 2,, f 1 T ft) f j = fj t) j = 0, 1,
More informationcomment.dvi
( ) (sample1.c) (sample1.c) 2 2 Nearest Neighbor 1 (2D-class1.dat) 2 (2D-class2.dat) (2D-test.dat) 3 Nearest Neighbor Nearest Neighbor ( 1) 2 1: NN 1 (sample1.c) /* -----------------------------------------------------------------
More information1.. 1 ll a ii. 1i. i f 1 1 a. a. i. t. 1 fi fi. t i j fj i. j ;i 1. i. aa a
1.. 1 ll a ii. 1i. i f 1 1 a. a. i. t. 1 fi fi. t i j fj i. j ;i 1. i. aa 1 111 0 0 0 0 a I E l21 1fi i L < i i;i1=t ii 111 1; ai i ti a t T ;,, l 1i.... E 11fi i 1t l l t2 1i i1 t Ea li )2 0 u 0 1f )2
More information08 p Boltzmann I P ( ) principle of equal probability P ( ) g ( )g ( 0 ) (4 89) (4 88) eq II 0 g ( 0 ) 0 eq Taylor eq (4 90) g P ( ) g ( ) g ( 0
08 p. 8 4 k B log g() S() k B : Boltzmann T T S k B g g heat bath, thermal reservoir... 4. I II II System I System II II I I 0 + 0 const. (4 85) g( 0 ) g ( )g ( ) g ( )g ( 0 ) (4 86) g ( )g ( 0 ) 0 (4
More informationTaro-リストⅠ(公開版).jtd
0. 目次 1. 再帰的なデータ構造によるリストの表現 1. 1 リストの作成と表示 1. 1. 1 リストの先頭に追加する方法 1. 1. 2 リストの末尾に追加する方法 1. 1. 3 昇順を保存してリストに追加する方法 1. 2 問題 問題 1 問題 2-1 - 1. 再帰的なデータ構造によるリストの表現 リストは データの一部に次のデータの記憶場所を示す情報 ( ポインタという ) を持つ構造をいう
More informationMicrosoft Word - 資料 (テイラー級数と数値積分).docx
δx δx n x=0 sin x = x x3 3 + x5 5 x7 7 +... x ak = (-mod(k,2))**(k/2) / fact_k ( ) = a n δ x n f x 0 + δ x a n = f ( n) ( x 0 ) n f ( x) = sin x n=0 58 I = b a ( ) f x dx ΔS = f ( x)h I = f a h h I = h
More informationMicrosoft Word - 03-数値計算の基礎.docx
δx f x 0 + δ x n=0 a n = f ( n) ( x 0 ) n δx n f x x=0 sin x = x x3 3 + x5 5 x7 7 +... x ( ) = a n δ x n ( ) = sin x ak = (-mod(k,2))**(k/2) / fact_k 10 11 I = f x dx a ΔS = f ( x)h I = f a h I = h b (
More information情報活用資料
y = Asin 2πt T t t = t i i 1 n+1 i i+1 Δt t t i = Δt i 1 ( ) y i = Asin 2πt i T 21 (x, y) t ( ) x = Asin 2πmt y = Asin( 2πnt + δ ) m, n δ (x, y) m, n 22 L A x y A L x 23 ls -l gnuplot gnuplot> plot "sine.dat"
More informationAppendix A BASIC BASIC Beginner s All-purpose Symbolic Instruction Code FORTRAN COBOL C JAVA PASCAL (NEC N88-BASIC Windows BASIC (1) (2) ( ) BASIC BAS
Appendix A BASIC BASIC Beginner s All-purpose Symbolic Instruction Code FORTRAN COBOL C JAVA PASCAL (NEC N88-BASIC Windows BASIC (1 (2 ( BASIC BASIC download TUTORIAL.PDF http://hp.vector.co.jp/authors/va008683/
More information#define N1 N+1 double x[n1] =.5, 1., 2.; double hokan[n1] = 1.65, 2.72, 7.39 ; double xx[]=.2,.4,.6,.8,1.2,1.4,1.6,1.8; double lagrng(double xx); main
=1= (.5, 1.65), (1., 2.72), (2., 7.39).2,.4,.6,.8, 1., 1.2, 1.4, 1.6 1 1: x.2 1.4128.4 1.5372.6 1.796533.8 2.198 1.2 3.384133 1.4 4.1832 1.6 5.1172 8 7 6 5 y 4 3 2 1.5 1 1.5 2 x 1: /* */ #include
More information( ) 1 Windows HTML ( ) ( ) ( ) WWW 10 ( )
( ) 1 Windows HTML ( ) ( ) ( ) 1. 2. 3. 4. WWW 10 ( ) 2 1. 2. 1 3. ( ) 4. 5. 3 Windows 2 7 8 MS Word MS Excel 1. MS Word 600 2. MS Excel 1 34 2 83 3 23 4 70 5 100 6 45 7 58 8 29 9 68 10 72 11 37 12 12
More informationPowerPoint Presentation
ファイルの入出力 芝浦工業大学情報工学科 青木義満 今回の講義内容 ファイル入出力 ファイルからのデータ読込み ファイルと配列 2 1 ファイルへのデータ書き込み ( 復習 ) ソースファイル名 :fileio1.c データをファイルに書き込み #include int main(void) { ファイルポインタ宣言 int student_id = 100; char name[
More informationFORTRAN( と C) によるプログラミング 5 ファイル入出力 ここではファイルからデータを読みこんだり ファイルにデータを書き出したりするプログラムを作成してみます はじめに テキスト形式で書かれたデータファイルに書かれているデータを読みこんで配列に代入し 標準出力に書き出すプログラムを作り
FORTRAN( と C) によるプログラミング 5 ファイル入出力 ここではファイルからデータを読みこんだり ファイルにデータを書き出したりするプログラムを作成してみます はじめに テキスト形式で書かれたデータファイルに書かれているデータを読みこんで配列に代入し 標準出力に書き出すプログラムを作ります FORTRAN の場合 OPEN 文でファイルを開いた後 標準入力の場合と同様に READ 文でデータを読みこみます
More information1 u t = au (finite difference) u t = au Von Neumann
1 u t = au 3 1.1 (finite difference)............................. 3 1.2 u t = au.................................. 3 1.3 Von Neumann............... 5 1.4 Von Neumann............... 6 1.5............................
More information3. :, c, ν. 4. Burgers : u t + c u x = ν 2 u x 2, (3), ν. 5. : u t + u u x = ν 2 u x 2, (4), c. 2 u t 2 = c2 2 u x 2, (5) (1) (4), (1 Navier Stokes,.,
B:,, 2017 12 1, 8, 15, 22 1,.,,,,.,.,,,., 1,. 1. :, ν. 2. : u t = ν 2 u x 2, (1), c. u t + c u x = 0, (2), ( ). 1 3. :, c, ν. 4. Burgers : u t + c u x = ν 2 u x 2, (3), ν. 5. : u t + u u x = ν 2 u x 2,
More information21 2418:00 19:30 19 1 18 20 2 3 4 15 5 21 6 35 2006 2007 25 2008 110 1,000 30 40 19 75 100 600 7 10 37 12 55 17 55 20 70 13 1.5 9 10 14 FJ 15 18 19 20 8 24 29 9 12 23 22 23 10 24 25 14 26 2055 1.32 11
More information2 [1] 7 5 C 2.1 (kikuchi-fem-mac ) input.dat (cat input.dat type input.dat ))
2.3 2007 8, 2011 6 21, 2012 5 29 1 (1) (2) (3) 2 Ω Poisson u = f (in Ω), u = 0 (on Γ 1 ), u n = 0 (on Γ 2) f Γ 1, Γ 2 Γ := Ω n Γ Ω (1980) Fortran : kikuchi-fem-mac.tar.gz 1 ( fem, 6701) tar xzf kikuchi-fem-mac.tar.gz
More informationθ (t) ω cos θ(t) = ( : θ, θ. ( ) ( ) ( 5) l () θ (t) = ω sin θ(t). ω := g l.. () θ (t) θ (t)θ (t) + ω θ (t) sin θ(t) =. [ ] d dt θ (t) ω cos θ(t
7 8, /3/, 5// http://nalab.mind.meiji.ac.jp/~mk/labo/text/furiko/ l (, simple pendulum) m g mlθ (t) = mg sin θ(t) () θ (t) + ω sin θ(t) =, ω := ( m ) ( θ ) sin θ θ θ (t) + ω θ(t) = ( ) ( ) g l θ(t) = C
More informationC 2 / 21 1 y = x 1.1 lagrange.c 1 / Laglange / 2 #include <stdio.h> 3 #include <math.h> 4 int main() 5 { 6 float x[10], y[10]; 7 float xx, pn, p; 8 in
C 1 / 21 C 2005 A * 1 2 1.1......................................... 2 1.2 *.......................................... 3 2 4 2.1.............................................. 4 2.2..............................................
More informationプログラミング基礎
C プログラミング 演習 アルゴリズム基礎論 演習 第 10 回 今後の予定 12/22( 月 ) 期末試験 (60 分間 ) 場所 :A1611 時間 :16:20~17:20 課題の最終提出締切 :12/19( 金 ) これ以降の新規提出は評価されない 12/22までに最終状況を提示するので, 提出したのに や になってる人は自分の提出内容や提出先を再確認した上で12/26までに問い合わせること
More informationGauss
15 1 LU LDL T 6 : 1g00p013-5 1 6 1.1....................................... 7 1.2.................................. 8 1.3.................................. 8 2 Gauss 9 2.1.....................................
More information演習1
神戸市立工業高等専門学校電気工学科 / 電子工学科専門科目 数値解析 2019.5.10 演習 1 山浦剛 (tyamaura@riken.jp) 講義資料ページ http://r-ccs-climate.riken.jp/members/yamaura/numerical_analysis.html Fortran とは? Fortran(= FORmula TRANslation ) は 1950
More informationChap9.dvi
.,. f(),, f(),,.,. () lim 2 +3 2 9 (2) lim 3 3 2 9 (4) lim ( ) 2 3 +3 (5) lim 2 9 (6) lim + (7) lim (8) lim (9) lim (0) lim 2 3 + 3 9 2 2 +3 () lim sin 2 sin 2 (2) lim +3 () lim 2 2 9 = 5 5 = 3 (2) lim
More informationall.dvi
fortran 1996 4 18 2007 6 11 2012 11 12 1 3 1.1..................................... 3 1.2.............................. 3 2 fortran I 5 2.1 write................................ 5 2.2.................................
More informationjoho09.ppt
s M B e E s: (+ or -) M: B: (=2) e: E: ax 2 + bx + c = 0 y = ax 2 + bx + c x a, b y +/- [a, b] a, b y (a+b) / 2 1-2 1-3 x 1 A a, b y 1. 2. a, b 3. for Loop (b-a)/ 4. y=a*x*x + b*x + c 5. y==0.0 y (y2)
More information(2-1) x, m, 2 N(m, 2 ) x REAL*8 FUNCTION NRMDST (X, M, V) X,M,V REAL*8 x, m, 2 X X N(0,1) f(x) standard-norm.txt normdist1.f x=0, 0.31, 0.5
2007/5/14 II II agata@k.u-tokyo.a.jp 0. 1. x i x i 1 x i x i x i x x+dx f(x)dx f(x) f(x) + 0 f ( x) dx = 1 (Probability Density Funtion 2 ) (normal distribution) 3 1 2 2 ( x m) / 2σ f ( x) = e 2πσ x m
More information情報活用資料-03-20150604
cp hello.f90 echo.f90 mv echo.f90 echofile.f90 cp echofile.f90 echo.f90 7 8 9 Echo key input program echo character(80):: A read (5,*) A write (6,*) A stop end program echo chracter read 10 Echo key input
More informationKrylov (b) x k+1 := x k + α k p k (c) r k+1 := r k α k Ap k ( := b Ax k+1 ) (d) β k := r k r k 2 2 (e) : r k 2 / r 0 2 < ε R (f) p k+1 :=
127 10 Krylov Krylov (Conjugate-Gradient (CG ), Krylov ) MPIBNCpack 10.1 CG (Conjugate-Gradient CG ) A R n n a 11 a 12 a 1n a 21 a 22 a 2n A T = =... a n1 a n2 a nn n a 11 a 21 a n1 a 12 a 22 a n2 = A...
More information1 return main() { main main C 1 戻り値の型 関数名 引数 関数ブロックをあらわす中括弧 main() 関数の定義 int main(void){ printf("hello World!!\n"); return 0; 戻り値 1: main() 2.2 C main
C 2007 5 29 C 1 11 2 2.1 main() 1 FORTRAN C main() main main() main() 1 return 1 1 return main() { main main C 1 戻り値の型 関数名 引数 関数ブロックをあらわす中括弧 main() 関数の定義 int main(void){ printf("hello World!!\n"); return
More informationI ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2 " 2 B R b
I 4 003 4 30 1 ASCII ( ) 0 17 0 NUL 16 DLE SP 0 @ P 3 48 64 80 96 11 p 1 SOH 17 DC1! 1 A Q a 33 49 65 81 97 113 q STX 18 DC " B R b 34 50 66 8 98 114 r 3 ETX 19 DC3 # 3 C S c 35 51 67 83 99 115 s 4 EOT
More information2004 2005 2 2 1G01P038-0 1 2 1.1.............................. 2 1.2......................... 2 1.3......................... 3 2 4 2.1............................ 4 2.2....................... 4 2.3.......................
More information( ) ( ) 30 ( ) 27 [1] p LIFO(last in first out, ) (push) (pup) 1
() 2006 2 27 1 10 23 () 30 () 27 [1] p.97252 7 2 2.1 2.1.1 1 LIFO(last in first out, ) (push) (pup) 1 1: 2.1.2 1 List 4-1(p.100) stack[] stack top 1 2 (push) (pop) 1 2 void stack push(double val) val stack
More information1F90/kouhou_hf90.dvi
Fortran90 3 33 1 2 Fortran90 FORTRAN 1956 IBM IBM704 FORTRAN(FORmula TRANslation ) 1965 FORTRAN66 1978 FORTRAN77 1991 Fortran90 Fortran90 Fortran Fortran90 6 Fortran90 77 90 90 Fortran90 [ ] Fortran90
More information応用数学特論.dvi
1 1 1.1.1 ( ). P,Q,R,.... 2+3=5 2 1.1.2 ( ). P T (true) F (false) T F P P T P. T 2 F 1.1.3 ( ). 2 P Q P Q P Q P Q P or Q P Q P Q P Q T T T T F T F T T F F F. P = 5 4 Q = 3 2 P Q = 5 4 3 2 P F Q T P Q T
More information情報処理概論(第二日目)
情報処理概論 工学部物質科学工学科応用化学コース機能物質化学クラス 第 8 回 2005 年 6 月 9 日 前回の演習の解答例 多項式の計算 ( 前半 ): program poly implicit none integer, parameter :: number = 5 real(8), dimension(0:number) :: a real(8) :: x, total integer
More informationC言語によるアルゴリズムとデータ構造
Algorithms and Data Structures in C 4 algorithm List - /* */ #include List - int main(void) { int a, b, c; int max; /* */ Ÿ 3Ÿ 2Ÿ 3 printf(""); printf(""); printf(""); scanf("%d", &a); scanf("%d",
More informationuntitled
1 2 3 WRITE (*,*) ------------------------------------------- WRITE (*,*) depth(x,y) = + + WRITE (*,*) ------------------------------------------- WRITE (*,*) ( ) d1 WRITE (*,*) d1 = u * x ^r(x) WRITE
More informationyy yy ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ; ; ; ;; ;; ;; ;;; ;;; ;;; ;; ;; ;; ;; ;; ; ; ; ; ; ; ;
More informationfile"a" file"b" fp = fopen("a", "r"); while(fgets(line, BUFSIZ, fp)) {... fclose(fp); fp = fopen("b", "r"); while(fgets(line, BUFSIZ, fp)) {... fclose
I117 9 2 School of Information Science, Japan Advanced Institute of Science and Technology file"a" file"b" fp = fopen("a", "r"); while(fgets(line, BUFSIZ, fp)) {... fclose(fp); fp = fopen("b", "r"); while(fgets(line,
More information卒 業 研 究 報 告.PDF
C 13 2 9 1 1-1. 1-2. 2 2-1. 2-2. 2-3. 2-4. 3 3-1. 3-2. 3-3. 3-4. 3-5. 3-5-1. 3-5-2. 3-6. 3-6-1. 3-6-2. 4 5 6 7-1 - 1 1 1-1. 1-2. ++ Lisp Pascal Java Purl HTML Windows - 2-2 2 2-1. 1972 D.M. (Dennis M Ritchie)
More informationMicrosoft PowerPoint - lec4.ppt
本日の内容 繰り返し計算 while 文, for 文 例題 1. 最大公約数の計算例題 2. 自然数の和 while 文例題 3. フィボナッチ数列例題 4. 自然数の和 for 文例題 5. 九九の表繰り返しの入れ子 今日の到達目標 繰り返し (while 文, for 文 ) を使って, 繰り返し計算を行えるようになること ループカウンタとして, 整数の変数を使うこと 今回も, 見やすいプログラムを書くために,
More informationr07.dvi
19 7 ( ) 2019.4.20 1 1.1 (data structure ( (dynamic data structure 1 malloc C free C (garbage collection GC C GC(conservative GC 2 1.2 data next p 3 5 7 9 p 3 5 7 9 p 3 5 7 9 1 1: (single linked list 1
More informationc-all.dvi
III(994) (994) from PSL (9947) & (9922) c (99,992,994,996) () () 2 3 4 (2) 2 Euler 22 23 Euler 24 (3) 3 32 33 34 35 Poisson (4) 4 (5) 5 52 ( ) 2 Turbo 2 d 2 y=dx 2 = y y = a sin x + b cos x x = y = Fortran
More informationuntitled
II 4 Yacc Lex 2005 : 0 1 Yacc 20 Lex 1 20 traverse 1 %% 2 [0-9]+ { yylval.val = atoi((char*)yytext); return NUM; 3 "+" { return + ; 4 "*" { return * ; 5 "-" { return - ; 6 "/" { return / ; 7 [ \t] { /*
More information1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() 2 double *a[ ]; double 1 malloc() dou
1 1.1 C 2 1 double a[ ][ ]; 1 3x3 0 1 3x3 ( ) 0.240 0.143 0.339 0.191 0.341 0.477 0.412 0.003 0.921 1.2 malloc() 2 double *a[ ]; double 1 malloc() double 1 malloc() free() 3 #include #include
More information:30 12:00 I. I VI II. III. IV. a d V. VI
2018 2018 08 02 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF N N y N x N xy yx : yxxyxy N N x, y N (parse tree) (1) yxyyx (2) xyxyxy (3) yxxyxyy (4) yxxxyxxy N y N x N yx
More informationohp07.dvi
19 7 ( ) 2019.4.20 1 (data structure) ( ) (dynamic data structure) 1 malloc C free 1 (static data structure) 2 (2) C (garbage collection GC) C GC(conservative GC) 2 2 conservative GC 3 data next p 3 5
More informationuntitled
1 1 1. 2. 3. 2 2 1 (5/6) 4 =0.517... 5/6 (5/6) 4 1 (5/6) 4 1 (35/36) 24 =0.491... 0.5 2.7 3 1 n =rand() 0 1 = rand() () rand 6 0,1,2,3,4,5 1 1 6 6 *6 int() integer 1 6 = int(rand()*6)+1 1 4 3 500 260 52%
More information弾性定数の対称性について
() by T. oyama () ij C ij = () () C, C, C () ij ji ij ijlk ij ij () C C C C C C * C C C C C * * C C C C = * * * C C C * * * * C C * * * * * C () * P (,, ) P (,, ) lij = () P (,, ) P(,, ) (,, ) P (, 00,
More informationn 第1章 章立ての部分は、書式(PC入門大見出し)を使います
FORTRAN FORTRAN FORTRAN ) DO DO IF IF FORTRAN FORTRAN(FORmula TRANslator)1956 IBM FORTRAN IV FORTRAN77 Fortran90 FORTRAN77 FORTRAN FORTARN IF, DO C UNIX FORTRAN PASCAL COBOL PL/I BASIC Lisp PROLOG Lisp
More informationC¥×¥í¥°¥é¥ß¥ó¥° ÆþÌç
C (3) if else switch AND && OR (NOT)! 1 BMI BMI BMI = 10 4 [kg]) ( [cm]) 2 bmi1.c Input your height[cm]: 173.2 Enter Input your weight[kg]: 60.3 Enter Your BMI is 20.1. 10 4 = 10000.0 1 BMI BMI BMI = 10
More information2000 7 17 iii,,.,,,,.,.,,. =,,.,,.,.,,,,,,, fortran,.,,,,.,,, iv (i),., 10,, 10 1. (ii),, fortran, fortran, C,.. (i),., 10 23.. (ii),.,, fortran Pasal,, for, if then else. C., fortran C.,.,,.,.,,.,,.,.,,,,.
More informationOriginal : Hello World! (0x0xbfab85e0) Copy : Hello World! (0x0x804a050) fgets mstrcpy malloc mstrcpy (main ) mstrcpy malloc free fgets stream 1 ( \n
2008 3 10 1 mstrcpy char *mstrcpy(const char *src); mstrcpy malloc (main free ) stdio.h fgets char *fgets(char *s, int size, FILE *stream); s size ( ) stream FILE ( man ) 40 ( ) %./a.out String : test
More information1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() malloc 2 #include <stdio.h> #include
1 1.1 C 2 1 double a[ ][ ]; 1 3x3 0 1 3x3 ( ) 0.240 0.143 0.339 0.191 0.341 0.477 0.412 0.003 0.921 1.2 malloc() malloc 2 #include #include #include enum LENGTH = 10 ; int
More information/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1
I117 II I117 PROGRAMMING PRACTICE II 2 MEMORY MANAGEMENT 2 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu@jaist.ac.jp / SCHEDULE 1. 2011/06/07(Tue) / Basic of Programming
More information3. :, c, ν. 4. Burgers : t + c x = ν 2 u x 2, (3), ν. 5. : t + u x = ν 2 u x 2, (4), c. 2 u t 2 = c2 2 u x 2, (5) (1) (4), (1 Navier Stokes,., ν. t +
B: 2016 12 2, 9, 16, 2017 1 6 1,.,,,,.,.,,,., 1,. 1. :, ν. 2. : t = ν 2 u x 2, (1), c. t + c x = 0, (2). e-mail: iwayama@kobe-u.ac.jp,. 1 3. :, c, ν. 4. Burgers : t + c x = ν 2 u x 2, (3), ν. 5. : t +
More informationFortran90/95 2. (p 74) f g h x y z f x h x = f x + g x h y = f y + g y h z = f z + g z f x f y f y f h = f + g Fortran 1 3 a b c c(1) = a(1) + b(1) c(
Fortran90/95 4.1 1. n n = 5 x1,x2,x3,,x4,x5 5 average = ( x1 + x2 + x3 + x4 + x5 )/5.0 n n x (subscript) x 1 x 2 average = 1 n n x i i=1 Fortran ( ) x(1) x(2) x(n) Fortran ( ) average = sum(x(1:n))/real(n)
More informationC による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 新装版 1 刷発行時のものです.
C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. http://www.morikita.co.jp/books/mid/009383 このサンプルページの内容は, 新装版 1 刷発行時のものです. i 2 22 2 13 ( ) 2 (1) ANSI (2) 2 (3) Web http://www.morikita.co.jp/books/mid/009383
More informationプラズマ核融合学会誌5月号【81-5】/内外情報_ソフト【注:欧フォント特殊!】
PROGRAM PLOTDATA USE NUM_KINDS, ONLY : wp=>dp, i4b USE MYLIB, ONLY : GET_SIZE, GET_DATA INTEGER(i4b) :: ntime, nx REAL(wp), ALLOCATABLE :: time(:), x(:), Temp(:,:) Fortran Temp, temp, TEMP temporal REAL(wp)
More informationprogram.dvi
2001.06.19 1 programming semi ver.1.0 2001.06.19 1 GA SA 2 A 2.1 valuename = value value name = valuename # ; Fig. 1 #-----GA parameter popsize = 200 mutation rate = 0.01 crossover rate = 1.0 generation
More information¥Ñ¥Ã¥±¡¼¥¸ Rhpc ¤Î¾õ¶·
Rhpc COM-ONE 2015 R 27 12 5 1 / 29 1 2 Rhpc 3 forign MPI 4 Windows 5 2 / 29 1 2 Rhpc 3 forign MPI 4 Windows 5 3 / 29 Rhpc, R HPC Rhpc, ( ), snow..., Rhpc worker call Rhpc lapply 4 / 29 1 2 Rhpc 3 forign
More informationt 2 2 t 2 t F ( ) p- 2 2 F 2 G F ( ) 2 2 F 2 G F ( ) 2 2 2
1 2 2 0 1 2 2 2 2 2 2 2 2.1 2 2 F={f ij }, G {g ij } t f ij t g ij = 1 f ij < t g ij = 0 t p- p S 0 S p = S 0 /S t p 2 t 1 t 2 2 t 2 t 2 2 3 3 1 2 F ( ) p- 2 2 F 2 G 3 2 2 F ( ) 2 2 F 2 G 3 3 2 F ( ) 2
More informationMicrosoft PowerPoint - 03_What is OpenMP 4.0 other_Jan18
OpenMP* 4.x における拡張 OpenMP 4.0 と 4.5 の機能拡張 内容 OpenMP* 3.1 から 4.0 への拡張 OpenMP* 4.0 から 4.5 への拡張 2 追加された機能 (3.1 -> 4.0) C/C++ 配列シンタックスの拡張 SIMD と SIMD 対応関数 デバイスオフロード task 構 の依存性 taskgroup 構 cancel 句と cancellation
More information1.ppt
/* * Program name: hello.c */ #include int main() { printf( hello, world\n ); return 0; /* * Program name: Hello.java */ import java.io.*; class Hello { public static void main(string[] arg)
More informationI. Backus-Naur BNF : N N 0 N N N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) (2) (3) (4) II. 0(0 101)* (
2016 2016 07 28 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF : 11011 N N 0 N N 11 1001 N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) 1100100 (2) 1111011 (3) 1110010 (4) 1001011
More information資料
PC PC C VMwareをインストールする Tips: VmwareFusion *.vmx vhv.enable = TRUE Tips: Windows Hyper-V -rwxr-xr-x 1 masakazu staff 8552 7 29 13:18 a.out* -rw------- 1 masakazu staff 8552 7 29
More informationP02.ppt
int If 2 1 ,,, 3 a + b ab a - b ab a * b ab a / b ab a % b ab a + b 4 2 list0201.c /, % /*/ int vx, vy; puts(""); printf("vx"); scanf("%d", &vx); printf("vy"); scanf("%d", &vy); printf("vx + vy = %d\n",
More information£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² –
(2018) 11 2018 12 13 2 g v dv x dt = bv x, dv y dt = g bv y (1) b v 0 θ x(t) = v 0 cos θ ( 1 e bt) (2) b y(t) = 1 ( v 0 sin θ + g ) ( 1 e bt) g b b b t (3) 11 ( ) p14 2 1 y 4 t m y > 0 y < 0 t m1 h = 0001
More information