/*========================================================================= Module: V_GaussIntegration.cpp Copyright (c) 2006 Sandia Corporation. All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* * * GaussIntegration.cpp performs Gauss Integrations * * This file is part of VERDICT * */ #include "verdict.h" #include "V_GaussIntegration.hpp" #include static int numberGaussPoints; static int numberNodes; static int numberDims; static double gaussPointY[maxNumberGaussPoints]; static double gaussWeight[maxNumberGaussPoints]; static double shapeFunction[maxTotalNumberGaussPoints][maxNumberNodes]; static double dndy1GaussPts[maxTotalNumberGaussPoints][maxNumberNodes]; static double dndy2GaussPts[maxTotalNumberGaussPoints][maxNumberNodes]; static double dndy3GaussPts[maxTotalNumberGaussPoints][maxNumberNodes]; static double totalGaussWeight[maxTotalNumberGaussPoints]; static int totalNumberGaussPts; static double y1Area[maxNumberGaussPointsTri]; static double y2Area[maxNumberGaussPointsTri]; static double y1Volume[maxNumberGaussPointsTet]; static double y2Volume[maxNumberGaussPointsTet]; static double y3Volume[maxNumberGaussPointsTet]; static double y4Volume[maxNumberGaussPointsTet]; void GaussIntegration::initialize(int n, int m, int dim, int tri) { numberGaussPoints = n; numberNodes = m; numberDims = dim; if (tri==1) //triangular element { if ( numberDims == 2) totalNumberGaussPts = numberGaussPoints; else if (numberDims ==3) totalNumberGaussPts =numberGaussPoints ; } else if (tri == 0) { if ( numberDims == 2) totalNumberGaussPts = numberGaussPoints*numberGaussPoints; else if (numberDims ==3) totalNumberGaussPts = numberGaussPoints*numberGaussPoints*numberGaussPoints; } } void GaussIntegration::get_shape_func(double shape_function[], double dndy1_at_gauss_pts[], double dndy2_at_gauss_pts[], double gauss_weight[]) { int i, j; for (i=0;i