Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

kzm-tn/sparse_matrix

Repository files navigation

Sparse Matrix

Exercise

I implemented

  • BiCG and BiCGstab
  • CRS method(CSR) for understaning the mechanism.

Future plan

  • Multi Color ordering
  • Cuthill_Mckee method

Fortran magic

You can use Fortran code in Jupyter notebook if you install fortran-magic through python-pip.

pip3 install -U fortran-magic

In jupyter notebook,

%load_ext fortranmagic # activating fortran-magic
In[1] %%fortran
subroutine solve(x, y, z)
real, intent(in) :: x(:), y(:)
real, intent(out) :: z(size(x))
z(:) = sin(x(:) + y(:))
end subroutine solve

In[2] solve([1, 2, 3], [4, 5, 6])
array([-0.9589243, 0.6569866, 0.4121185], dtype=float32)

fortran-magic example

About

Exercise related to sparse matrix

Topics

Resources

Readme

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors