Continuum Membrane 719025a62b1e384a6ff80e2f2a223ef4012153dc
Loading...
Searching...
No Matches
Functions
Gauss_quadrature.hpp File Reference

This file defines gauss quadrature and related functions. More...

#include <math.h>
#include <vector>
#include <iostream>
#include <fstream>
#include <sstream>
#include <omp.h>
#include "linalg/Linear_algebra.hpp"

Go to the source code of this file.

Functions

void get_gauss_quadrature_weight_VWU (const int &gaussQuadratureN, Matrix &vwu, Matrix &weight)
 Calculate the VMU (barycentric coordinates) and weight for a Gaussian quadrature point.
 
void get_shapefunction (const Matrix &vwu, Matrix &shapefunction)
 Calculate the shape function and its derivatives at a given barycentric coordinate.
 
void get_shapefunction_vector (const Matrix &vwuMat, std::vector< Matrix > &sfVec)
 Calculate the shape function and its derivatives at a set of barycentric coordinates.
 
void get_subdivision_matrices (Matrix &mat, Matrix &subMat1, Matrix &subMat2, Matrix &subMat3, Matrix &subMat4)
 Calculate the four subdivision matrices for an irregular patch.
 

Detailed Description

This file defines gauss quadrature and related functions.

Author
Y Ying
Y Fu
Version
0.1
Date
2023-03-10

Function Documentation

◆ get_gauss_quadrature_weight_VWU()

void get_gauss_quadrature_weight_VWU ( const int &  gaussQuadratureN,
Matrix vwu,
Matrix weight 
)

Calculate the VMU (barycentric coordinates) and weight for a Gaussian quadrature point.

This function calculates a matrix (N, 3) of VMUs based on the specified number of quadrature points, storing the result in the provided matrix vmu. It also calculates a matrix (N, 1) of weights for each point, storing the result in the provided matrix weight.

Note that the vmu and weight matrices will be overwritten and should be initialized before calling this function.

Parameters
gaussQuadratureNThe number of Gauss quadrature points to use.
vwuA matrix for storing the calculated barycentric coordinates (N, 3).
weightA matrix for storing the calculated weights (N, 1).

◆ get_shapefunction()

void get_shapefunction ( const Matrix vwu,
Matrix shapefunction 
)

Calculate the shape function and its derivatives at a given barycentric coordinate.

This function calculates the shape function and its derivatives at a given barycentric coordinate vwu, storing the result in the provided matrix shapefunction. The shape function and its derivatives are stored in rows 0 to 6 of the matrix as follows:

shapefunction(0,:), shape functions; shapefunction(1,:), differential to v; shapefunction(2,:), differential to w; shapefunction(3,:), double differential to v; shapefunction(4,:), double differential to w; shapefunction(5,:), differential to v and w; shapefunction(6,:), differential to w and v;

Parameters
vwuThe barycentric (1, 3) coordinate to evaluate the shape function at.
shapefunctionA (7, 12) matrix for storing the calculated shape function and its derivatives (7, 12).

◆ get_shapefunction_vector()

void get_shapefunction_vector ( const Matrix vwuMat,
std::vector< Matrix > &  sfVec 
)

Calculate the shape function and its derivatives at a set of barycentric coordinates.

This function calculates the shape function and its derivatives at each barycentric coordinate in the provided matrix vwuMat, storing the result in the provided vector sfVec. Each element of sfVec is a matrix representing the shape function and its derivatives at one barycentric coordinate.

Parameters
vwuMatA matrix of barycentric coordinates (N,3).
sfVecA vector for storing the calculated shape functions and their derivatives.

◆ get_subdivision_matrices()

void get_subdivision_matrices ( Matrix mat,
Matrix subMat1,
Matrix subMat2,
Matrix subMat3,
Matrix subMat4 
)

Calculate the four subdivision matrices for an irregular patch.

This function calculates the four subdivision matrices for an irregular patch using the provided matrix mat, storing the result in the provided matrices subMat1, subMat2, subMat3, and subMat4.

Parameters
matThe input matrix from which to compute the subdivision matrices.
subMat1A matrix for storing the first subdivision matrix.
subMat2A matrix for storing the second subdivision matrix.
subMat3A matrix for storing the third subdivision matrix.
subMat4A matrix for storing the fourth subdivision matrix.