Solving Diffusion Equation with Implicit Method: Problem with DGESV
- Thread starter debsankar
- Start date
Click For Summary
Discussion Overview
The discussion revolves around solving the diffusion equation using an implicit method with the DGESV subroutine from LAPACK. Participants are addressing issues related to the implementation of periodic boundary conditions and the overall functionality of the code provided by the original poster.
Discussion Character
- Technical explanation
- Debate/contested
- Homework-related
Main Points Raised
- The original poster is experiencing issues with periodic boundary conditions in their diffusion equation code.
- Some participants suggest avoiding the use of tabs in code for consistency and recommend using spaces for indentation instead.
- There are requests for more specific details about the problems encountered, such as whether the code compiles, runs, or produces unexpected results.
- One participant critiques the method of attaching code as a zip file, suggesting that pasting the code directly would be more effective for review.
- Another participant points out that the program checks the "OK" status only once at the end, which may not be sufficient for debugging within the loop.
- The original poster clarifies that the code is intended to solve the equation A*x(n+1)=x(n) iteratively, and describes the expected behavior of the output files.
- There is a mention of a potential issue with LAPACK subroutines modifying input arrays, which could lead to incorrect results if not handled properly.
Areas of Agreement / Disagreement
Participants express various critiques and suggestions regarding coding practices and the specific implementation of the diffusion equation. There is no consensus on the resolution of the original poster's issue, and multiple viewpoints on coding practices and debugging strategies are presented.
Contextual Notes
Participants note limitations in the original poster's code, such as missing external files and the need for clearer problem statements. There is also an acknowledgment of unresolved issues related to the handling of input arrays in LAPACK subroutines.
Similar threads
- · Replies 22 ·
- · Replies 8 ·
- · Replies 1 ·
- · Replies 8 ·
- · Replies 6 ·
- · Replies 4 ·
- · Replies 4 ·
- · Replies 2 ·
- · Replies 7 ·