Hello Yaswanth,

To create a dof for a particular mesh, these are steps you need to follow
and this steps are covered in detail in tutorial-1 and 2. I suggest you to
play around with the tutorial code to get comfortable, change the
dimensions of the problem for example.

*Step-1:* You need to create a Triangulation<1> object (here 1 refers to
1d  mesh) and create a mesh for your problem in this Triangulation Object.
With reference to Tuttorial-2, the following lines does the trick

   - Triangulation<2>
   <https://www.dealii.org/9.0.0/doxygen/deal.II/classTriangulation.html>
   triangulation;
   - make_grid (triangulation);             :  make_grid() is user defined
   function  that create the required mesh using *GridGenerator::hyper_**
   functions

*Step-2:* Once you create a 'triangulation' object, you need to define the
reference Finite element with particular number of DoF per element as per
your requirement.


   - static const FE_Q<dim>
   <https://www.dealii.org/9.0.0/doxygen/deal.II/classFE__Q.html>
   finite_element(p);          : Here, 'dim' is the dimension of your problem,
   'p' is the order of the shape function in the finite element

                  Here, finite_element(1) create a linear element, which is
2-node line for dim =1 and 4-quad(bi-linear) element for dim  = 2

*Step-3: *Create 'DoF_Handler' object and link it with the 'Triangulation'
object containing your mesh.  'dof_handler' store all the data that is
required by your solver. Let say you want to build the Stiffness
element,you will do it using the data from the 'dof_handler'.

   - DoFHandler<2>
   <https://www.dealii.org/9.0.0/doxygen/deal.II/classDoFHandler.html>
   dof_handler (triangulation);

*Step-4**:* In the last step, we create a 'dof_handler' corresponding to
Triangulation data but haven't yet allocated any memory and doesn't contain
any data to solve our problem. We distribute the memory in 'dof_handler'
with the help of the reference cell 'finite_element(p)' as follows.

   - dof_handler.distribute_dofs
   
<https://www.dealii.org/9.0.0/doxygen/deal.II/classDoFHandler.html#a553ca864aaf70330d9be86bc78f36d1e>
   (finite_element);

Hope this was helpful

Regards,
Rakesh Raghavaraju

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to