#pragma once

#include"Gauss_Line.h"
#include"Gauss_Triangle.h"
#include"Gauss_Quadrangle.h"
#include"Gauss_Tetrahedron.h"
#include"Gauss_Prism.h"
#include"../common/define.h"

/*
Obtain nodes for Gaussian integration
There is an input error when _mNbrGaussPoints equals zero.
First, invoke the function GetNbrGaussPoints() to initialize the array, and then call the function GetGaussPoints()
*/
class Gauss
{
public:
	int GetNbrGaussPoints(int dim, int type, int order);
	int GetNbrGaussPoints();
	void GetGaussPoints(int dim, int type, double* u, double* v, double* w, double* wght);

private:
	void Guass_Line(double* u, double* v, double* w, double* wght);

	void Gauss_Triangle(double* u, double* v, double* w, double* wght);
	void Gauss_Quadrangle(double* u, double* v, double* w, double* wght);

	void Gauss_Tetrahedron(double* u, double* v, double* w, double* wght);
	void Gauss_Prism(double* u, double* v, double* w, double* wght);

	int _mNbrGaussPoints=0; //number of gauss points
};

