This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [t, z] = cShoot(r, R, a, b, thetaBC, phiBC, h, tol) | |
% cShoot Solve BVP for toroidal geodesic | |
% r is aximuthal radius on xz plane | |
% R is radius from xy plane | |
% a is the initial time | |
% b is the final time | |
% Boundary conditions for theta and phi are given as 2 element vectors: | |
% thetaBC = [alpha0, beta0], where | |
% theta(a) = alpha0 | |
% theta(b) = beta0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package memory | |
import "unsafe" | |
// Poke writes a int size value to an address | |
func Poke(addr uintptr, val int) { | |
o := (*int)(unsafe.Pointer(addr)) | |
*o = val | |
} |