Skip to content

Instantly share code, notes, and snippets.

View cbcoutinho's full-sized avatar

Chris Coutinho cbcoutinho

View GitHub Profile
@cbcoutinho
cbcoutinho / cmake.log
Created October 17, 2016 15:47
CMake output, make output without flags, make output with '-i' flag
-- The Fortran compiler identification is GNU 4.8.5
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes
-- Compiler: GNU 4.8.5 /usr/bin/gfortran
-- Build type is: release
-- Compilation flags: -pthread -O3 -mtune=native -march=native
@cbcoutinho
cbcoutinho / test3D.geo
Last active January 6, 2017 09:29
Example .geo file for meshio work
L = 1;
dx1 = 0.2*L;
// Create points on x-z plane
Point(1) = {-0.5*L, -0.5*L, -0.5*L, dx1};
Point(2) = { 0.5*L, -0.5*L, -0.5*L, dx1};
Point(3) = { 0.5*L, -0.5*L, 0.5*L, dx1};
Point(4) = {-0.5*L, -0.5*L, 0.5*L, dx1};
// Create lines connecting points
@cbcoutinho
cbcoutinho / main.f90
Created February 6, 2017 09:18
A simple Fortran file with submodules, a generic interface, and module procedures
module example_mod
use iso_fortran_env, only: wp=>real64
implicit none
private
public :: fun
interface fun
module function fun1(x) result(y)
real(wp), intent(in) :: x
real(wp) :: y
module mod
use iso_fortran_env, only: wp=>real64
implicit none
private
public :: myfun
interface myfun
module function fun1(n, x) result(y)
integer, intent(in) :: n
real(wp), intent(in) :: x
@cbcoutinho
cbcoutinho / euler_2.rs
Created May 28, 2017 22:22 — forked from omaskery/euler_2.rs
Creating terribly over-engineered solution to Euler Problem #2 just to play with Rust (which is lovely).
use std::iter::AdditiveIterator;
use std::num::Int;
// Context for a fibonacci sequence generator
struct FibonacciContext<T> where T: Int {
two_ago: Option<T>, // the fibonacci number two previous in the sequence
one_ago: Option<T>, // the last fibonacci number in the sequence
}
// The iterator object for iterating fibonacci numbers

Keybase proof

I hereby claim:

  • I am cbcoutinho on github.
  • I am cbcoutinho (https://keybase.io/cbcoutinho) on keybase.
  • I have a public key ASDtIJauxe_makC3JJ1hkkqozQiM7B4Ac3KnPDsS2J6QPQo

To claim this, I am signing this object:

Hello World

This is content converted from Markdown!

Here's a JSON sample:

{
  "foo": "bar"
}