 	int blocks = 1;
 	float dt = time/N;
 	float4 startloc = {0,0,0,0};
-	std::cout << hostvfield[127][127][127].x << std::endl;
+	float3 locSmiet = Smiet2Tex(startloc);
+	std::cout << "Starting point in texture coordinates: x=" << locSmiet.x << ", y=" << locSmiet.y << ", z=" << locSmiet.z << std::endl;
+//	std::cout << hostvfield[127][127][127].x << std::endl;
 	checkCudaErrors(cudaMalloc(&d_lines,blocks*cores*steps*sizeof(float4)));
 
 	h_lines = (float4*) malloc(blocks*cores*steps*sizeof(float4));
 	RK4line<<<cores,blocks>>>(d_lines, dt, steps, startloc);
 	checkCudaErrors(cudaMemcpy(h_lines, d_lines, blocks*cores*steps*sizeof(float4), cudaMemcpyDeviceToHost));
-	for(unsigned int i=0; i<steps; i++) {
+	for(unsigned int i=0; i<3; i++) {
 		std::cout << "x= " << h_lines[i].x << "; y= "<< h_lines[i].y << " "<< h_lines[i].x*h_lines[i].x+h_lines[i].y*h_lines[i].y << std::endl;
 	}
 	free(hostvfield[0][0]);

	hostvfield = (float4***) malloc(N*sizeof(float4**));
	hostvfield[0] = (float4**) malloc(N*N*sizeof(float4*));
	hostvfield[0][0] = (float4*) malloc(N*N*N*sizeof(float4));
	std::cout << 2 << std::endl;
	for (int i=1; i < N; i++) {
		hostvfield[i] = (hostvfield[0] + i*N);
	}


int main(void) {
	cudaArray* dataArray;
//	std::cout << 1 << std::endl;
	cudaChannelFormatDesc channelDesc = cudaCreateChannelDesc(32,32,32,32,cudaChannelFormatKindFloat);
	cudaExtent extent = make_cudaExtent(N , N, N);
	checkCudaErrors(cudaMalloc3DArray(&dataArray, &channelDesc,extent));
