BasisFunctionsProvided.h DG++. More...
#include <BasisFunctionsProvided.h>
Public Member Functions | |
BasisFunctionsProvidedExternalQuad (const std::vector< double > &ShapesInput, const std::vector< double > &DShapesInput, const std::vector< double > &QuadratureWeights, const std::vector< double > &QuadratureCoords) | |
Constructor. | |
BasisFunctionsProvidedExternalQuad (size_t NShapes, const std::vector< double > &DShapesInput, const std::vector< double > &QuadratureWeights, const std::vector< double > &QuadratureCoords) | |
Constructor. | |
virtual | ~BasisFunctionsProvidedExternalQuad () |
BasisFunctionsProvidedExternalQuad (const BasisFunctionsProvidedExternalQuad &NewBas) | |
virtual BasisFunctionsProvidedExternalQuad * | clone () const |
const std::vector< double > & | getShapes () const |
Shape functions at quadrature points getShapes()[q*ShapegetNumFunctions()+a] gives the value of shape function a at quadrature point q. | |
const std::vector< double > & | getDShapes () const |
Derivatives of shape functions at quadrature points getDShapes()[q*ShapegetNumFunctions()*ElementGeometrygetEmbeddingDimensions()+a*ElementGeometrygetEmbeddingDimensions()+i] gives the derivative in the i-th direction of degree of freedom a at quadrature point q. | |
const std::vector< double > & | getIntegrationWeights () const |
const std::vector< double > & | getQuadraturePointCoordinates () const |
Coordinates of quadrature points in the real configuration getQuadraturePointCoordinates() [q*ElementGeometrygetEmbeddingDimension()+i] returns the i-th coordinate in real space of quadrature point q. | |
size_t | getBasisDimension () const |
returns the number of shape functions provided | |
size_t | getNumberOfDerivativesPerFunction () const |
returns the number of directional derivative for each shape function | |
size_t | getSpatialDimensions () const |
returns the number of number of coordinates for each Gauss point | |
Protected Attributes | |
const std::vector< double > & | LocalWeights |
const std::vector< double > & | LocalCoordinates |
Static Protected Attributes | |
static const std::vector< double > | ZeroSizeVector |
Private Attributes | |
const std::vector< double > & | LocalShapes |
const std::vector< double > & | LocalDShapes |
size_t | NumberOfShapes |
BasisFunctionsProvided.h DG++.
Created by Adrian Lew on 10/21/06.
Copyright (c) 2006 Adrian Lew
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
BasisFunctionsProvidedExternalQuad: set of basis functions and derivatives at the quadrature points provided directly at construction. The quadrature points are referenced externally, they are not kept as a copy inside the object.
BasisFunctionsProvidedExternalQuad::BasisFunctionsProvidedExternalQuad | ( | const std::vector< double > & | ShapesInput, | |
const std::vector< double > & | DShapesInput, | |||
const std::vector< double > & | QuadratureWeights, | |||
const std::vector< double > & | QuadratureCoords | |||
) | [inline] |
Constructor.
In the following,
NQuad = QuadratureWeights.size(), the total number of quadrature points
NShapes = ShapesInput.size()/QuadratureWeights.size(), total number of shape functions provided
spd = QuadratureCoords().size/QuadratureWeights.size(), number of spatial dimensions
ShapesInput,: | Values of each shape function at each quadrature point. ShapesInput[ q*NShapes + a] = value of shape function "a" at quadrature point "q" | |
DShapesInput,: | Values of each shape function derivative at each quadrature point. DShapesInput[ q*NShapes*spd + a*spd + i] = value of shape function "a" derivative in the i-th direction at quadrature point "q" | |
QuadratureWeights,: | QuadratureWeights[q] contains the value of the quadrature weight at quad point "q" | |
QuadratureCoords,: | QuadratureCoords[q*spd+i] contains the i-th coordinate of the position of quadrature point "q" |
If not derivatives of shape functions are available, just provide and empty vector as DShapesInput
BasisFunctionsProvidedExternalQuad::BasisFunctionsProvidedExternalQuad | ( | size_t | NShapes, | |
const std::vector< double > & | DShapesInput, | |||
const std::vector< double > & | QuadratureWeights, | |||
const std::vector< double > & | QuadratureCoords | |||
) | [inline] |
Constructor.
In the following no shape functions are provided. An empty vector will be
place in its place.
NQuad = QuadratureWeights.size(), the total number of quadrature points
spd = QuadratureCoords().size/QuadratureWeights.size(), number of spatial dimensions NDerivatives = LocalDShapes.size()/(NumberOfShapes*LocalWeights.size())
NShapes | Number of shape functions for which derivatives are offered | |
DShapesInput,: | Values of each shape function derivative at each quadrature point. DShapesInput[ q*NShapes*spd + a*spd + i] = value of shape function "a" derivative in the i-th direction at quadrature point "q" | |
QuadratureWeights,: | QuadratureWeights[q] contains the value of the quadrature weight at quad point "q" | |
QuadratureCoords,: | QuadratureCoords[q*spd+i] contains the i-th coordinate of the position of quadrature point "q" |
virtual BasisFunctionsProvidedExternalQuad::~BasisFunctionsProvidedExternalQuad | ( | ) | [inline, virtual] |
BasisFunctionsProvidedExternalQuad::BasisFunctionsProvidedExternalQuad | ( | const BasisFunctionsProvidedExternalQuad & | NewBas | ) | [inline] |
virtual BasisFunctionsProvidedExternalQuad* BasisFunctionsProvidedExternalQuad::clone | ( | ) | const [inline, virtual] |
Implements BasisFunctions.
Reimplemented in BasisFunctionsProvided.
size_t BasisFunctionsProvidedExternalQuad::getBasisDimension | ( | ) | const [inline, virtual] |
returns the number of shape functions provided
Implements BasisFunctions.
const std::vector<double>& BasisFunctionsProvidedExternalQuad::getDShapes | ( | ) | const [inline, virtual] |
Derivatives of shape functions at quadrature points getDShapes()[q*ShapegetNumFunctions()*ElementGeometrygetEmbeddingDimensions()+a*ElementGeometrygetEmbeddingDimensions()+i] gives the derivative in the i-th direction of degree of freedom a at quadrature point q.
Integration weights
Implements BasisFunctions.
const std::vector<double>& BasisFunctionsProvidedExternalQuad::getIntegrationWeights | ( | ) | const [inline, virtual] |
Implements BasisFunctions.
size_t BasisFunctionsProvidedExternalQuad::getNumberOfDerivativesPerFunction | ( | ) | const [inline, virtual] |
returns the number of directional derivative for each shape function
Implements BasisFunctions.
const std::vector<double>& BasisFunctionsProvidedExternalQuad::getQuadraturePointCoordinates | ( | ) | const [inline, virtual] |
Coordinates of quadrature points in the real configuration getQuadraturePointCoordinates() [q*ElementGeometrygetEmbeddingDimension()+i] returns the i-th coordinate in real space of quadrature point q.
Implements BasisFunctions.
const std::vector<double>& BasisFunctionsProvidedExternalQuad::getShapes | ( | ) | const [inline, virtual] |
Shape functions at quadrature points getShapes()[q*ShapegetNumFunctions()+a] gives the value of shape function a at quadrature point q.
Implements BasisFunctions.
size_t BasisFunctionsProvidedExternalQuad::getSpatialDimensions | ( | ) | const [inline, virtual] |
returns the number of number of coordinates for each Gauss point
Implements BasisFunctions.
const std::vector<double>& BasisFunctionsProvidedExternalQuad::LocalCoordinates [protected] |
const std::vector<double>& BasisFunctionsProvidedExternalQuad::LocalDShapes [private] |
const std::vector<double>& BasisFunctionsProvidedExternalQuad::LocalShapes [private] |
const std::vector<double>& BasisFunctionsProvidedExternalQuad::LocalWeights [protected] |
size_t BasisFunctionsProvidedExternalQuad::NumberOfShapes [private] |
const std::vector< double > BasisFunctionsProvidedExternalQuad::ZeroSizeVector [static, protected] |