This is content converted from Markdown!
Here's a JSON sample:
{
"foo": "bar"
}I hereby claim:
To claim this, I am signing this object:
| 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 |
| 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 |
| 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 |
| 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 |
| -- 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 |