Hi,

I am trying to understand and learn the main structure of deal.II's design, 
because I cannot work with a program until I do not understand it fully.
Hence, I am checking a simple 2D cube with hand-written FE solutions to see 
how things are stored in deal.II.

The model I use is created directly in deal.II by means of

GridGenerator::hyper_cube (triangulation, -1, 1);
triangulation.refine_global (0);

So a cube with a length of 2. 

This is what I get for a 2D cube with linear shape functions and 4 GAUSS 
points (each row of the matrices represents a GP):

GAUSS POINT COORDINATES

-0.57735   -0.57735   
0.57735   -0.57735   
-0.57735   0.57735   
0.57735   0.57735   


SHAPE FUNCTIONS

  0.6220   0.6220   0.1667   0.1667   0.1667   0.1667   0.0447   0.0447 
  0.1667   0.1667   0.6220   0.6220   0.0447   0.0447   0.1667   0.1667 
  0.1667   0.1667   0.0447   0.0447   0.6220   0.6220   0.1667   0.1667 
  0.0447   0.0447   0.1667   0.1667   0.1667   0.1667   0.6220   0.6220 


SHAPE FUNCTION DERIVATIVES

-0.394338 -0.394338   -0.394338 -0.394338   0.394338 -0.105662   0.394338 
-0.105662   -0.105662 0.394338   -0.105662 0.394338   0.105662 0.105662   
0.105662 0.105662   
-0.394338 -0.105662   -0.394338 -0.105662   0.394338 -0.394338   0.394338 
-0.394338   -0.105662 0.105662   -0.105662 0.105662   0.105662 0.394338   
0.105662 0.394338   
-0.105662 -0.394338   -0.105662 -0.394338   0.105662 -0.105662   0.105662 
-0.105662   -0.394338 0.394338   -0.394338 0.394338   0.394338 0.105662   
0.394338 0.105662   
-0.105662 -0.105662   -0.105662 -0.105662   0.105662 -0.394338   0.105662 
-0.394338   -0.394338 0.105662   -0.394338 0.105662   0.394338 0.394338   
0.394338 0.394338   


JACOBIAN MATRIX

2 0 
0 2 

Unfortunately, I do not understand the point why the shape function 
derivatives change, if I create a geometry by means of:

GridGenerator::hyper_cube (triangulation, 0, 1);
triangulation.refine_global (0);

Does this mean that we define the cube in natural coordinates? From what I 
know, the shape functions only depend on natural coordinates which means 
independent from the geometry, so they should remain the same, if the 
natural coordinates from -1 to 1 remain.
Also another thing which gives me a headache is that why is the jacobian 
value twice the value it should be. For a rectangular bilinear lagrange 
element we can compute simply J by a/2 and b/2, but we would receive 1 and 
1 for the above case where a=b=2.
This doesn't correspond to what deal.II outputs.

Additionally, using 

std::vector<DerivativeForm<1, dim, dim> > J = fe_values.get_jacobians ();
 
gives a vector containing n x n matrices?

Since I can just output J[0][i][j], J[1][i][j] or J[10][i][j]. All work, 
but why? Shouldn't it be somehow limited? (Stupid question maybe...)


I assume such simple questions may annoy the deal.II developers, I know. 
But I promise whenever I learn the program thoroughly I come up with more 
complex questions ;)


Best regards,
Seyed Ali Mohseni

-- 
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