Ian Jauslin
summaryrefslogtreecommitdiff
blob: fa26b4b8c1d6e11f1712fd3cd97d93245865641d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "driving.h"
#include "navier-stokes.h"
#include <math.h>

// test driving function
int g_test(
  _Complex double* g,
  int K1,
  int K2
){
  int kx,ky;
  for(kx=-K1;kx<=K1;kx++){
    for (ky=-K2;ky<=K2;ky++){
      if(kx==2 && ky==-1){
	g[klookup(kx,ky,2*K1+1,2*K2+1)]=0.5+sqrt(3)/2*I;
      }
      else if(kx==-2 && ky==1){
        g[klookup(kx,ky,2*K1+1,2*K2+1)]=0.5-sqrt(3)/2*I;
      }
      else{
        g[klookup(kx,ky,2*K1+1,2*K2+1)]=0.;
      }
    }
  }

  return 0;
}

int g_zero(
  _Complex double* g,
  int K1,
  int K2
){
  int i;
  for(i=0;i<(2*K1+1)*(2*K2+1);i++){
    g[i]=0.;
  }

  return 0;
}