Purpose
-
The library "Legendre" provides spectral methods using Legendre polynomials.
It includes core subroutines and test functions for several variants:
- standard collocation method;
- optimal collocation method;
- standard Galerkin method;
- optimal Galerkin method;
- quasi-optimal Galerkin method;
- solvers for 2-D and 3-D rectangular domains;
- solvers for nonhomogeneous boundary conditions;
- solvers for periodic-nonperiodic boundary conditions;
- solvers for systems of coupled elliptic equations.
Specifications
- Name: Legendre.
- Author: Feng Chen.
- Version: 19.
- Language: Fortran 90.
- Required libraries: BLAS, LAPACK.
Simple Example
- Equation: \begin{equation} \begin{aligned} &\alpha u -(\beta_1 u_{xx} + \beta_2 u_{yy}) = f, &&\quad \text{in } \Omega, \\ &\partial_{\boldsymbol{n}} u = 0, && \quad \text{on } \partial \Omega. \end{aligned} \end{equation}
- Parameters: \begin{equation} \Omega = (-1,1)^2 , \quad \alpha =2, \quad \beta_1=3, \quad \beta_2=4. \end{equation}
- Exact solution and input functions: \begin{equation} u(x,y) = \cos(\pi x) \cos(\pi y). \end{equation} $f(x,y)$ is given according to $u(x,y)$.
Quick Start
- Compiling and running:
cd ./Legendre make library gfortran tst_Legendre.f90 -llibrary -llapack -lblas ./a.out
- Output:
Nx = Ny = 256, optimal Legendre-Galerkin method The computational time is 0.12000000 seconds. Solver error is 4.32986979603811051E-015 Transform error is 6.45816733424453560E-013 Diff-1 error is 4.91152708606358846E-009 Diff-2 error is 4.87690250101431529E-009 ...
- CPU: Intel(R) Xeon(R) CPU X5550 @2.67GHz.
- OS: CentOS release 6.4 (Final).
- Compiler: gfortran 4.5.1.
References
- Jie Shen and Tao Tang. Spectral and high-order methods with applications, Science Press of China, (2006).
- Feng Chen and Jie Shen. Efficient spectral-Galerkin methods for systems of coupled second-order equations and their applications, Journal of Computational Physics, Volume 231, Issue 15, 5016-5028, (2012).
Core Subroutines
D1_E1_Legen_Col_Solve.f90 D1_E1_Legen_Gal_Opti_Solve.f90 D1_E1_Legen_Gal_Orth_RHSData.f90 D1_E1_Legen_Gal_Orth_Solve.f90 D1_E1_Legen_Gal_Quasi_Solve.f90 D1_EL_Join_Legen_Col_Solve.f90 D1_EL_Join_Legen_Gal_Orth_Solve.f90 D1_EL_Join_Legen_Gal_Orth_System.f90 D1_EL_Legen_Gal_Opti_Solve.f90 D1_EL_Legen_Gal_Opti_Solve_ND.f90 D1_EL_Legen_Gal_Orth_RHSData.f90 D1_EL_Legen_Gal_Quasi_Solve.f90 D1_EL_ND.f90 D1_EL_ND_Init.f90 D1_Legen_Gal_Opti_BasisCoefficients.f90 D1_Legen_Gal_Opti_BasisTransform.f90 D1_Legen_Gal_Opti_EigenData.f90 D1_Legen_Gal_Opti_Mass.f90 D1_Legen_Gal_Opti_RHS.f90 D1_Legen_Gal_Orth_EigenData.f90 D1_Legen_Gal_Orth_Matrices.f90 D1_Legen_Gal_Quasi_Init.f90 D2_E1_Fourier_Gal_Legen_Col_Solve.f90 D2_E1_Legen_Gal_Opti_InvData.f90 D2_E1_Legen_Gal_Opti_Solve.f90 D2_E1_Legen_Gal_Quasi_Solve.f90 D2_EL_Join_Fourier_Gal_Legen_Col_Solve.f90 D2_EL_Legen_Gal_Opti_Solve.f90 D2_EL_Legen_Gal_Opti_Solve_ND.f90 D2_EL_Legen_Gal_Quasi_Solve.f90 D2_EL_ND.f90 D2_EL_ND_Init.f90 D2_Legen_Gal_Opti_BasisTransform.f90 D2_Legen_Gal_Opti_RHS.f90 D3_E1_Legen_Gal_Opti_Solve.f90 D3_E1_Legen_Gal_Quasi_Solve.f90 D3_EL_Legen_Gal_Opti_Solve.f90 D3_EL_Legen_Gal_Opti_Solve_ND.f90 D3_EL_Legen_Gal_Quasi_Solve.f90 D3_EL_ND.f90 D3_EL_ND_Init.f90 D3_Legen_Gal_Opti_BasisTransform.f90 D3_Legen_Gal_Opti_RHS.f90
No comments:
Post a Comment