# Compact.f90 ![Language](https://img.shields.io/badge/Language-Fortran Source-blue?style=for-the-badge) ## Overview *Author: Ignis* @brief High-order compact finite difference scheme solver. This module handles the generation of tridiagonal/pentadiagonal matrices, LU decomposition calculations, and tridiagonal solver operations for periodic and non-periodic boundary conditions. ## API Index - [Module: `Compact`](#compact) - [Subroutine: `ludcmp`](#ludcmp) - [Subroutine: `ludcmp_allocate`](#ludcmp_allocate) - [Subroutine: `ludcmp_deallocate`](#ludcmp_deallocate) - [Subroutine: `ludcmp_testalloc`](#ludcmp_testalloc) - [Subroutine: `ludcmp_calculate`](#ludcmp_calculate) - [Subroutine: `test_nonp_lud1`](#test_nonp_lud1) - [Subroutine: `test_nonp_lud2`](#test_nonp_lud2) - [Subroutine: `test_p_lud1`](#test_p_lud1) - [Subroutine: `test_p_lud2`](#test_p_lud2) - [Subroutine: `nonp_lud`](#nonp_lud) - [Subroutine: `p_lud`](#p_lud) - [Subroutine: `stdlu`](#stdlu) - [Subroutine: `ptdlu`](#ptdlu) - [Subroutine: `rhs1np`](#rhs1np) - [Subroutine: `dfnonp`](#dfnonp) - [Subroutine: `dfp`](#dfp) - [Subroutine: `ptdslv`](#ptdslv) - [Subroutine: `d2fp`](#d2fp) - [Subroutine: `tdslv`](#tdslv) - [Subroutine: `d2fnonp`](#d2fnonp) --- ## API Reference ### [Module] `Compact` *Author: Ignis* @brief High-order compact finite difference scheme solver. This module handles the generation of tridiagonal/pentadiagonal matrices, LU decomposition calculations, and tridiagonal solver operations for periodic and non-periodic boundary conditions. --- ### [Subroutine] `ludcmp` ```fortran subroutine ludcmp(nx, ny, nz, xp, yp, zp) ``` Entry point for LU decomposition calculations. Prepares the workspace allocations and runs the decomposition calculation for all three directions. - ` nx `: Grid size in x-direction. - ` ny `: Grid size in y-direction. - ` nz `: Grid size in z-direction. - ` xp `: Periodic flag for x-direction (0 = periodic, other = non-periodic). - ` yp `: Periodic flag for y-direction (0 = periodic, other = non-periodic). - ` zp `: Periodic flag for z-direction (0 = periodic, other = non-periodic). --- ### [Subroutine] `ludcmp_allocate` ```fortran subroutine ludcmp_allocate(nx, ny, nz, xp, yp, zp) ``` *No description provided.* --- ### [Subroutine] `ludcmp_deallocate` ```fortran subroutine ludcmp_deallocate(xp, yp, zp) ``` *No description provided.* --- ### [Subroutine] `ludcmp_testalloc` ```fortran subroutine ludcmp_testalloc() ``` *No description provided.* --- ### [Subroutine] `ludcmp_calculate` ```fortran subroutine ludcmp_calculate(nx, ny, nz, xp, yp, zp) ``` *No description provided.* --- ### [Subroutine] `test_nonp_lud1` ```fortran subroutine test_nonp_lud1(xx, coef) ``` *No description provided.* --- ### [Subroutine] `test_nonp_lud2` ```fortran subroutine test_nonp_lud2(xx, coef) ``` *No description provided.* --- ### [Subroutine] `test_p_lud1` ```fortran subroutine test_p_lud1(xx, coef1, coef2) ``` *No description provided.* --- ### [Subroutine] `test_p_lud2` ```fortran subroutine test_p_lud2(xx, coef1, coef2) ``` *No description provided.* --- ### [Subroutine] `nonp_lud` ```fortran subroutine nonp_lud(xyz, xx) ``` *No description provided.* --- ### [Subroutine] `p_lud` ```fortran subroutine p_lud(xyz, xx) ``` *No description provided.* --- ### [Subroutine] `stdlu` ```fortran subroutine stdlu(a, n, l) ``` *No description provided.* --- ### [Subroutine] `ptdlu` ```fortran subroutine ptdlu(a, n, l, w) ``` *No description provided.* --- ### [Subroutine] `rhs1np` ```fortran subroutine rhs1np(n, h, x, dx, nd) ``` *No description provided.* --- ### [Subroutine] `dfnonp` ```fortran subroutine dfnonp(n, h, x, dx, nd, dir) ``` *No description provided.* --- ### [Subroutine] `dfp` ```fortran subroutine dfp(n, h, x, dx, nd, dir) ``` *No description provided.* --- ### [Subroutine] `ptdslv` ```fortran subroutine ptdslv(r, n, l, w, nd) ``` *No description provided.* --- ### [Subroutine] `d2fp` ```fortran subroutine d2fp(n, h, x, dx, nd, dir) ``` *No description provided.* --- ### [Subroutine] `tdslv` ```fortran subroutine tdslv(r, n, l, nd) ``` *No description provided.* --- ### [Subroutine] `d2fnonp` ```fortran subroutine d2fnonp(n, h, x, dx, nd, dir) ``` *No description provided.* ---