2 Star 3 Fork 0

船舶运动/Fortran自由函数集合

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
BSD-3-Clause

Fortran 自由函数集合

FFFC Language license

本仓库主要收集一些基础的通用函数,如线性代数求解,便于编程。

依赖

  • BLAS (GFortran: OpenBLAS)。

使用 Meson 构建链接库

meson setup _build -Dprefix=/mingw64
meson install --destdir 'C:\msys64\' -C _build
meson test -C _build func_api -v  # 单元测试

理论上,Meson 支持 Windows/macOS/Linux 下的 gfortran, macOS/Linux 下的 ifort。 若需要支持 Windows 下的 ifort, 可搭配 VS2022 进行编译。

使用 fpm 构建链接库

fpm build

示例

program main
    use fffc_module
    real :: a(2, 2) = reshape([1., 2., 3., 4.], shape(a)), b(2, 2)
    b = a
    call inv(b)
110 format(f8.3, ", ", f8.3, "; ")
111 format(a, t12, ' =')
    print 111, 'inv(a)'
    print 110, b(1, :)
    print 110, b(2, :)
    print 111, 'a * inv(a)'
    b = gemm(a, b)
    print 110, b(1, :)
    print 110, b(2, :)
end program main
!inv(a)      =
!  -2.000,    1.500;
!   1.000,   -0.500;
!a * inv(a)  =
!   1.000,    0.000;
!   0.000,    1.000;

使用 FORD 构建文档

ford FORD-doc.md
start build/ford/index.html     # Windows 打开网页
BSD 3-Clause License Copyright (c) 2022~2023, 左志华(zuo.zhihua@qq.com) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

About

Fortran自由函数集合(fortran free function collection)(不含GPL/LGPL代码) expand collapse
README
BSD-3-Clause
Cancel

Releases (1)

All
2 years ago

Contributors

All

Language(Optional)

Activities

can not load any more
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
FORTRAN
1
https://gitee.com/ship-motions/fffc.git
git@gitee.com:ship-motions/fffc.git
ship-motions
fffc
Fortran自由函数集合
master

Search