OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::GaussIntegrationRule Class Reference

Class representing Gaussian-quadrature integration rule. More...

#include <gaussintegrationrule.h>

+ Inheritance diagram for oofem::GaussIntegrationRule:
+ Collaboration diagram for oofem::GaussIntegrationRule:

Public Member Functions

 GaussIntegrationRule (int n, Element *e, int startIndx, int endIndx, bool dynamic=false)
 Constructor. More...
 
 GaussIntegrationRule (int n, Element *e)
 
virtual ~GaussIntegrationRule ()
 Destructor. More...
 
virtual const char * giveClassName () const
 
virtual IntegrationRuleType giveIntegrationRuleType () const
 
virtual IRResultType initializeFrom (InputRecord *ir)
 
virtual int getRequiredNumberOfIntegrationPoints (integrationDomain dType, int approxOrder)
 Abstract service. More...
 
virtual int SetUpPointsOnLine (int nPoints, MaterialMode mode)
 Sets up receiver's integration points on unit line integration domain. More...
 
virtual int SetUpPointsOnTriangle (int nPoints, MaterialMode mode)
 Sets up receiver's integration points on triangular (area coords) integration domain. More...
 
virtual int SetUpPointsOnSquare (int nPoints, MaterialMode mode)
 Sets up receiver's integration points on unit square integration domain. More...
 
virtual int SetUpPointsOn3dDegShell (int nPointsXY, int nPointsZ, MaterialMode mode)
 Sets up receiver's integration points on shell integration domain. More...
 
virtual int SetUpPointsOn3dDegShellLayers (int nPointsXY, int nPointsZ, MaterialMode mode, const FloatArray &layerThickness)
 Sets up receiver's integration points on shell integration domain wih layers. More...
 
virtual int SetUpPointsOnCubeLayers (int nPoints1, int nPoints2, int nPointsDepth, MaterialMode mode, const FloatArray &layerThickness)
 Sets up receiver's integration points on unit cube integration domain divided into layers in the zeta-direction. More...
 
virtual int SetUpPointsOnCube (int nPoints, MaterialMode mode)
 Sets up receiver's integration points on unit cube integration domain. More...
 
virtual int SetUpPointsOnTetrahedra (int nPoints, MaterialMode mode)
 Sets up receiver's integration points on tetrahedra (volume coords) integration domain. More...
 
virtual int SetUpPointsOnWedge (int nPointsTri, int nPointsDepth, MaterialMode mode)
 Sets up receiver's integration points on a wedge integration domain. More...
 
virtual int SetUpPointsOnWedgeLayers (int nPointsTri, int nPointsDepth, MaterialMode mode, const FloatArray &layerThickness)
 Sets up receiver's integration points on a wedge integration domain divided into layers in the zeta-direction. More...
 
virtual int SetUpPointsOn2DEmbeddedLine (int nPoints, MaterialMode mode, const FloatArray &coord0, const FloatArray &coord1)
 Sets up integration points on 2D embedded line inside 2D volume (the list of local coordinates should be provided). More...
 
- Public Member Functions inherited from oofem::IntegrationRule
std::vector< GaussPoint * >::iterator begin ()
 
std::vector< GaussPoint * >::iterator end ()
 
 IntegrationRule (int n, Element *e, int startIndx, int endIndx, bool dynamic)
 Constructor. More...
 
 IntegrationRule (int n, Element *e)
 Constructor. More...
 
virtual ~IntegrationRule ()
 Destructor. More...
 
int giveNumberOfIntegrationPoints () const
 Returns number of integration points of receiver. More...
 
GaussPointgetIntegrationPoint (int n)
 Access particular integration point of receiver. More...
 
GaussPointfindIntegrationPointClosestTo (const FloatArray &lcoord)
 Scans through the integration points and finds the one closest to the given (local) coordinate. More...
 
int getStartIndexOfLocalStrainWhereApply ()
 Returns starting component index, for which receiver applies. More...
 
int getEndIndexOfLocalStrainWhereApply ()
 Returns last component index, for which receiver applies. More...
 
int setUpIntegrationPoints (integrationDomain intdomain, int nPoints, MaterialMode matMode)
 Initializes the receiver. More...
 
int setUpIntegrationPoints (integrationDomain intdomain, int nPointsXY, int nPointsZ, MaterialMode matMode)
 Initializes the receiver. More...
 
int setUpEmbeddedIntegrationPoints (integrationDomain intdomain, int nPoints, MaterialMode matMode, const std::vector< FloatArray > &coords)
 Initializes the receiver. More...
 
virtual void printOutputAt (FILE *file, TimeStep *tStep)
 Prints receiver's output to given stream. More...
 
void updateYourself (TimeStep *tStep)
 Updates receiver state. More...
 
ElementgiveElement ()
 Returns reference to element containing receiver. More...
 
int giveNumber ()
 Returns receiver number. More...
 
integrationDomain giveIntegrationDomain () const
 Returns the domain for the receiver. More...
 
virtual contextIOResultType saveContext (DataStream &stream, ContextMode mode, void *obj)
 Saves receiver's context to stream. More...
 
virtual contextIOResultType restoreContext (DataStream &stream, ContextMode mode, void *obj)
 Restores receiver's context to stream. More...
 
void clear ()
 Clears the receiver, ie deallocates all integration points. More...
 
virtual const IntArraygiveKnotSpan ()
 Returns receiver sub patch indices (if apply). More...
 
std::string errorInfo (const char *func) const
 Error printing helper. More...
 
int SetUpPoint (MaterialMode mode)
 Trivial implementation, only creates a single point. More...
 

Static Public Member Functions

static void giveTetCoordsAndWeights (int nPoints, FloatArray &coords_xi1, FloatArray &coords_xi2, FloatArray &coords_xi3, FloatArray &weights)
 
static void giveTriCoordsAndWeights (int nPoints, FloatArray &coords_xi1, FloatArray &coords_xi2, FloatArray &weights)
 
static void giveLineCoordsAndWeights (int nPoints, FloatArray &coords_xi, FloatArray &weights)
 

Additional Inherited Members

- Protected Attributes inherited from oofem::IntegrationRule
int number
 Number. More...
 
Elementelem
 Element which integration rule is coupled to. More...
 
integrationDomain intdomain
 Integration domain. More...
 
std::vector< GaussPoint * > gaussPoints
 Array containing integration points. More...
 
int firstLocalStrainIndx
 firstLocalStrainIndx and lastLocalStrainIndx indexes describe range of components (strains for example) for which receiver integration points apply. More...
 
int lastLocalStrainIndx
 
bool isDynamic
 Flag indicating that rule is dynamic, ie, its gauss points (their number, coordinates, weights) can change during computation. More...
 

Detailed Description

Class representing Gaussian-quadrature integration rule.

The number of integration points and their coordinates and integration weights depends on integration rule type (rule for integration in 1d, 2d, 3d) and required accuracy. The positions and weights are determined by the minimum required of points to integrate a polynomial exactly (while the points are strictly within the domain)

Tasks:

  • Returning number of integration points used
  • Returning requested integration point
  • Updating itself
  • Saving and restoring context
See also
GaussPoint

Definition at line 59 of file gaussintegrationrule.h.

Constructor & Destructor Documentation

oofem::GaussIntegrationRule::GaussIntegrationRule ( int  n,
Element e,
int  startIndx,
int  endIndx,
bool  dynamic = false 
)

Constructor.

Parameters
nNumber associated with receiver.
eElement associated with receiver.
startIndxFirst component, for which rule applies.
endIndxLast component, for which rule applies.
dynamicFlag indicating that receiver can change.

Definition at line 44 of file gaussintegrationrule.C.

oofem::GaussIntegrationRule::GaussIntegrationRule ( int  n,
Element e 
)

Definition at line 48 of file gaussintegrationrule.C.

oofem::GaussIntegrationRule::~GaussIntegrationRule ( )
virtual

Destructor.

Definition at line 51 of file gaussintegrationrule.C.

Member Function Documentation

int oofem::GaussIntegrationRule::getRequiredNumberOfIntegrationPoints ( integrationDomain  dType,
int  approxOrder 
)
virtual

Abstract service.

Returns required number of integration points to exactly integrate polynomial of order approxOrder on given domain. When approxOrder is too large and is not supported by implementation method returns -1. Must be overloaded by derived classes.

Todo:
Assuming same approximation order for triangle as line. Not totally sure about these /JB

Reimplemented from oofem::IntegrationRule.

Definition at line 339 of file gaussintegrationrule.C.

References oofem::_Cube, oofem::_Line, oofem::_Square, oofem::_Tetrahedra, oofem::_Triangle, oofem::_Wedge, oofem::max(), and OOFEM_ERROR.

virtual const char* oofem::GaussIntegrationRule::giveClassName ( ) const
inlinevirtual

Reimplemented from oofem::IntegrationRule.

Reimplemented in oofem::PatchIntegrationRule.

Definition at line 75 of file gaussintegrationrule.h.

virtual IntegrationRuleType oofem::GaussIntegrationRule::giveIntegrationRuleType ( ) const
inlinevirtual

Reimplemented from oofem::IntegrationRule.

Definition at line 76 of file gaussintegrationrule.h.

References oofem::IRT_Gauss.

void oofem::GaussIntegrationRule::giveTetCoordsAndWeights ( int  nPoints,
FloatArray coords_xi1,
FloatArray coords_xi2,
FloatArray coords_xi3,
FloatArray weights 
)
static

Definition at line 492 of file gaussintegrationrule.C.

References OOFEM_SERROR, and oofem::FloatArray::resize().

Referenced by SetUpPointsOnTetrahedra().

void oofem::GaussIntegrationRule::giveTriCoordsAndWeights ( int  nPoints,
FloatArray coords_xi1,
FloatArray coords_xi2,
FloatArray weights 
)
static
virtual IRResultType oofem::GaussIntegrationRule::initializeFrom ( InputRecord ir)
inlinevirtual

Reimplemented from oofem::IntegrationRule.

Definition at line 77 of file gaussintegrationrule.h.

References oofem::IRRT_OK.

int oofem::GaussIntegrationRule::SetUpPointsOn2DEmbeddedLine ( int  nPoints,
MaterialMode  mode,
const FloatArray coord0,
const FloatArray coord1 
)
virtual

Sets up integration points on 2D embedded line inside 2D volume (the list of local coordinates should be provided).

Parameters
nPointsNumber of points along line.

Reimplemented from oofem::IntegrationRule.

Definition at line 72 of file gaussintegrationrule.C.

References oofem::_Embedded2dLine, oofem::FloatArray::at(), oofem::Element::computeLocalCoordinates(), oofem::IntegrationRule::gaussPoints, oofem::IntegrationRule::giveElement(), giveLineCoordsAndWeights(), oofem::IntegrationRule::giveNumberOfIntegrationPoints(), and oofem::IntegrationRule::intdomain.

int oofem::GaussIntegrationRule::SetUpPointsOn3dDegShell ( int  nPointsXY,
int  nPointsZ,
MaterialMode  mode 
)
virtual

Sets up receiver's integration points on shell integration domain.

Default implementation does not sets up any integration points and returns 0. Must be overloaded by derived classes.

Parameters
nPointsXYNumber of integration points in the "xi-eta"-plane.
nPointsZNumber of integration points in the "zeta"-direction
Returns
Number of integration points.

Reimplemented from oofem::IntegrationRule.

Definition at line 125 of file gaussintegrationrule.C.

References oofem::_3dDegShell, oofem::FloatArray::at(), oofem::IntegrationRule::gaussPoints, giveLineCoordsAndWeights(), oofem::IntegrationRule::giveNumberOfIntegrationPoints(), and oofem::IntegrationRule::intdomain.

int oofem::GaussIntegrationRule::SetUpPointsOn3dDegShellLayers ( int  nPointsXY,
int  nPointsZ,
MaterialMode  mode,
const FloatArray layerThickness 
)
virtual

Sets up receiver's integration points on shell integration domain wih layers.

Default implementation does not sets up any integration points and returns 0. Must be overloaded by derived classes.

Parameters
nPointsXYNumber of integration points in the "xi-eta"-plane.
nPointsZNumber of integration points in the "zeta"-direction
layerThicknessArray of thicknesses of individual layers
Returns
Number of integration points.

Reimplemented from oofem::IntegrationRule.

Definition at line 153 of file gaussintegrationrule.C.

References oofem::_3dDegShell, oofem::FloatArray::at(), oofem::IntegrationRule::gaussPoints, giveLineCoordsAndWeights(), oofem::IntegrationRule::giveNumberOfIntegrationPoints(), oofem::FloatArray::giveSize(), oofem::IntegrationRule::intdomain, and oofem::FloatArray::sum().

int oofem::GaussIntegrationRule::SetUpPointsOnCube ( int  ,
MaterialMode  mode 
)
virtual

Sets up receiver's integration points on unit cube integration domain.

Default implementation does not sets up any integration points and returns 0. Must be overloaded by derived classes.

Returns
Number of integration points.

Reimplemented from oofem::IntegrationRule.

Definition at line 190 of file gaussintegrationrule.C.

References oofem::_Cube, oofem::FloatArray::at(), oofem::cbrt(), oofem::IntegrationRule::gaussPoints, giveLineCoordsAndWeights(), oofem::IntegrationRule::giveNumberOfIntegrationPoints(), and oofem::IntegrationRule::intdomain.

int oofem::GaussIntegrationRule::SetUpPointsOnCubeLayers ( int  nPoints1,
int  nPoints2,
int  nPointsDepth,
MaterialMode  mode,
const FloatArray layerThickness 
)
virtual

Sets up receiver's integration points on unit cube integration domain divided into layers in the zeta-direction.

Default implementation does not sets up any integration points and returns 0. Must be overloaded by derived classes.

Parameters
nPoints1Number of integration points in the "xi"-direction.
nPoints2Number of integration points in the "eta"-direction.
nPointsDepthNumber of integration points in the "zeta"-direction
layerThicknessArray of thicknesses of individual layers
Returns
Number of integration points.

Reimplemented from oofem::IntegrationRule.

Definition at line 217 of file gaussintegrationrule.C.

References oofem::_Cube, oofem::FloatArray::at(), oofem::IntegrationRule::gaussPoints, giveLineCoordsAndWeights(), oofem::IntegrationRule::giveNumberOfIntegrationPoints(), oofem::FloatArray::giveSize(), oofem::IntegrationRule::intdomain, and oofem::FloatArray::sum().

int oofem::GaussIntegrationRule::SetUpPointsOnSquare ( int  ,
MaterialMode  mode 
)
virtual

Sets up receiver's integration points on unit square integration domain.

Default implementation does not sets up any integration points and returns 0. Must be overloaded by derived classes.

Returns
Number of integration points.

Reimplemented from oofem::IntegrationRule.

Definition at line 102 of file gaussintegrationrule.C.

References oofem::_Square, oofem::FloatArray::at(), oofem::IntegrationRule::gaussPoints, giveLineCoordsAndWeights(), oofem::IntegrationRule::giveNumberOfIntegrationPoints(), and oofem::IntegrationRule::intdomain.

int oofem::GaussIntegrationRule::SetUpPointsOnTetrahedra ( int  ,
MaterialMode  mode 
)
virtual

Sets up receiver's integration points on tetrahedra (volume coords) integration domain.

Default implementation does not sets up any integration points and returns 0. Must be overloaded by derived classes.

Returns
Number of integration points.

Reimplemented from oofem::IntegrationRule.

Definition at line 269 of file gaussintegrationrule.C.

References oofem::_Tetrahedra, oofem::FloatArray::at(), oofem::IntegrationRule::gaussPoints, oofem::IntegrationRule::giveNumberOfIntegrationPoints(), giveTetCoordsAndWeights(), and oofem::IntegrationRule::intdomain.

int oofem::GaussIntegrationRule::SetUpPointsOnWedge ( int  nPointsTri,
int  nPointsDepth,
MaterialMode  mode 
)
virtual

Sets up receiver's integration points on a wedge integration domain.

Default implementation does not sets up any integration points and returns 0. Must be overloaded by derived classes.

Parameters
nPointsTriNumber of points over the triangle cross-section.
nPointsDepthNumber of points over the depth.
Returns
Number of integration points.

Reimplemented from oofem::IntegrationRule.

Reimplemented in oofem::PatchIntegrationRule.

Definition at line 286 of file gaussintegrationrule.C.

References oofem::_Wedge, oofem::FloatArray::at(), oofem::IntegrationRule::gaussPoints, giveLineCoordsAndWeights(), oofem::IntegrationRule::giveNumberOfIntegrationPoints(), giveTriCoordsAndWeights(), and oofem::IntegrationRule::intdomain.

Referenced by oofem::Shell7Base::computeConvectiveMassForce(), oofem::Shell7Base::computeMassMatrix(), and oofem::Shell7Base::computePressureTangentMatrix().

int oofem::GaussIntegrationRule::SetUpPointsOnWedgeLayers ( int  nPointsTri,
int  nPointsDepth,
MaterialMode  mode,
const FloatArray layerThickness 
)
virtual

Sets up receiver's integration points on a wedge integration domain divided into layers in the zeta-direction.

Default implementation does not sets up any integration points and returns 0. Must be overloaded by derived classes.

Parameters
nPointsTriNumber of points over the triangle cross-section.
nPointsDepthNumber of points over the depth.
layerThicknessArray of thicknesses of individual layers
Returns
Number of integration points.

Reimplemented from oofem::IntegrationRule.

Definition at line 307 of file gaussintegrationrule.C.

References oofem::_Wedge, oofem::FloatArray::at(), oofem::IntegrationRule::gaussPoints, giveLineCoordsAndWeights(), oofem::IntegrationRule::giveNumberOfIntegrationPoints(), oofem::FloatArray::giveSize(), giveTriCoordsAndWeights(), oofem::IntegrationRule::intdomain, and oofem::FloatArray::sum().


The documentation for this class was generated from the following files:

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:36 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011