Question: Show me the steps to solve Coding Instructions: Write a one - dimensional finite element code in C + + using the deal.II FEM library

Show me the steps to solve Coding Instructions: Write a one-dimensional finite element code in C++ using the deal.II FEM library frameswork and the template provided to solve the given problem, following these requirements: Code (a) linear, (b) quadratic and (c) cubic order Lagrange polynomial basis functions. Include a function to calculate the L 2 norm of the error between the finite element solution (u h ) with the exact solution (u), given by qR (u u h)2 dx. All integration in Klocal, Flocal, and the L2 norm of the error should be done by Gaussian quadrature (see Lecture 4.11), instead of using the analytical solution to the integrals shown in the lectures. For submission, use a 100 element mesh. (You will be provided with the six .vtk solution files for a 10 element mesh to help you debug your code. A table of the corresponding L 2 norms is included at the end of the instructions.) You will be provided with four files to create and run your code (please refer to the recorded tutorials for an in-depth explanation): main1.cc (the source file that defines and solve the boundary value problem using your C++ class) FEM1.h (the template header file defining your finite element method C++ class) writeSolutions.h (used to create the solution files you will submit) CMakeLists.txt (used to create a Makefile to run your code, as shown in the first segment of the recorded introduction to C++)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!