Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
V_GaussIntegration.hpp
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Module: $RCSfile: V_GaussIntegration.hpp,v $
4 
5  Copyright (c) 2006 Sandia Corporation.
6  All rights reserved.
7  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
14 
15 /*
16  *
17  * GaussIntegration.hpp declaration of gauss integration functions
18  *
19  * This file is part of VERDICT
20  *
21  */
22 
23 #ifndef GAUSS_INTEGRATION_HPP
24 #define GAUSS_INTEGRATION_HPP
25 
26 #include "moab/verdict.h"
27 
28 #define maxTotalNumberGaussPoints 27
29 #define maxNumberNodes 20
30 #define maxNumberGaussPoints 3
31 #define maxNumberGaussPointsTri 6
32 #define maxNumberGaussPointsTet 4
33 
35 {
36 
37 void get_signs_for_node_local_coord_hex( int node_id, double& sign_y1, double& sign_y2, double& sign_y3 );
38 //- to get the signs for coordinates of hex nodes in the local computational space
39 
40 // constructors
41 void initialize( int n = 2, int m = 4, int dim = 2, int tri = 0 );
42 
43 // manipulators
45 //- get gauss point locations and weights
46 
48 //- get integration points and weights for triangular rules
49 
51 //- calculate the shape functions and derivatives of shape functions
52 //- at integration points for 2D triangular elements
53 
55 //- calculate the shape functions and derivatives of shape functions
56 //- at gaussian points for 2D quad elements
57 
58 void get_shape_func( double shape_function[],
59  double dndy1_at_gauss_pts[],
60  double dndy2_at_gauss_ptsp[],
61  double gauss_weight[] );
62 //- get shape functions and the derivatives
63 
64 void get_shape_func( double shape_function[],
65  double dndy1_at_gauss_pts[],
66  double dndy2_at_gauss_pts[],
67  double dndy3_at_gauss_pts[],
68  double gauss_weight[] );
69 //- get shape functions and the derivatives for 3D elements
70 
71 void calculate_derivative_at_nodes( double dndy1_at_nodes[][maxNumberNodes], double dndy2_at_nodes[][maxNumberNodes] );
72 //- calculate shape function derivatives at nodes
73 
75 //- calculate shape functions and derivatives of shape functions
76 //- at gaussian points for 3D hex elements
77 
78 void calculate_derivative_at_nodes_3d( double dndy1_at_nodes[][maxNumberNodes],
79  double dndy2_at_nodes[][maxNumberNodes],
80  double dndy3_at_nodes[][maxNumberNodes] );
81 //- calculate shape function derivatives at nodes for hex elements
82 
83 void calculate_derivative_at_nodes_2d_tri( double dndy1_at_nodes[][maxNumberNodes],
84  double dndy2_at_nodes[][maxNumberNodes] );
85 //- calculate shape function derivatives at nodes for triangular elements
86 
88 //- calculate shape functions and derivatives of shape functions
89 //- at integration points for 3D tet elements
90 
92 //- get integration points and weights for tetrhedron rules
93 
94 void calculate_derivative_at_nodes_3d_tet( double dndy1_at_nodes[][maxNumberNodes],
95  double dndy2_at_nodes[][maxNumberNodes],
96  double dndy3_at_nodes[][maxNumberNodes] );
97 //- calculate shape function derivatives at nodes for tetrahedron elements
98 
99 void get_node_local_coord_tet( int node_id, double& y1, double& y2, double& y3, double& y4 );
100 //- get nodal volume coordinates for tetrahedron element
101 } // namespace GaussIntegration
102 
103 #endif