Code dependency of various functions in a steady-state diffusion FEM solver
There will be four Machine Problems in this course. After successful completion of all the machine problems, you will have a Galerkin-based finite element package for solving steady-diffusion equations. The above figure shows the code dependency of various functions, which you be developing through machine problems.
Note: The functions WriteVTKFile and WriteTecplotFile will be provided to you via Blackboard. WriteVTKFile dumps the output in VTK format, which can be visualized in Paraview or Visit. WriteTecplotFile dumps output in PLT format, which can be visualized in Tecplot.
MP #1: You will generate all the functions in the branch under GuassPoints.
MP #2: You will generate all the functions in the branch under ShapeFunctions.
MP #3: You will generate all the remaining functions in the branch under Driver_Steady_Diffusion.
MP #4: You integrate all the functions, generate input files, solve assigned boundary value problems, and visualize the output in either Tecplot or Paraview or Visit.
Programming language
Although it is not strictly required, MATLAB is strongly preferred for doing homework computer problems for the following reasons:
Capability – MATLAB is very powerful for solving numerical problems and has many built-in routines for numerical computations and graphical output that would have to be supplied by external libraries if a conventional programming language were used.
Convenience – It usually takes far less code and far less time to do Machine Problems in MATLAB than using other languages or software.
Support – Links to MATLAB tutorials and other information can be easily found on the web.
Availability – MATLAB is available on undergraduate and graduate labs, and can also be purchased inexpensively for student use on personal computers.
Grading – It makes life easier for me/grader to have all homework done using the same language and software package.
Feedback – Homework solutions will be provided (if any) in MATLAB.
Students are responsible for learning MATLAB if they are not already proficient with it, as little or no class time will be spent on learning MATLAB.
I will not debug any of your code. So please do not e-mail me your code asking me to fix bugs or ask me to look at your code during office hours before the submission of your homework. It is part of the assigned work that you develop (intelligent) strategies to check the correctness of your implementation, and systematically eliminate bugs in your code. To debug your code, you can either use the age-old "print" statement or use sophisticated debugger/s. (For example, MATLAB has a built-in graphical debugger. You can find more information by typing "doc debug" at the MATLAB's command prompt. Also MATLAB's built-in "profiler" can be useful.) The only thing I can (and will) do is to help you with the overall logic.
Badly written computer programs will be heavily penalized. Bad computer programming practices include bad variable and function names (e.g., var1, var2, ..., var9999), not enough comments in the code, usage of global variables, using "goto" statements, and many more. Submissions without proper verification of individual functions and the overall code will also be heavily penalized. Please note that it is your job to convince me that your code/implementation can be trusted.