55 mTriangles(iTriangles)
86 for (
size_t i = 0; i <
mTriangles.size(); i++ ) {
90 std :: vector< int >triToKeep;
91 const double triTol = ( 1.0e-6 ) * totArea;
93 for (
size_t i = 0; i <
mTriangles.size(); i++ ) {
95 triToKeep.push_back(i);
99 int nPointsTot = nPoints * triToKeep.size();
106 std :: vector< FloatArray >newGPCoord;
111 for (
int tri: triToKeep ) {
113 std :: vector< FloatArray >coords(
mTriangles [ tri ].giveNrVertices() );
115 for (
int k = 1; k <=
mTriangles [ tri ].giveNrVertices(); k++ ) {
116 coords [ k - 1 ] =
mTriangles [ tri ].giveVertex(k);
122 for (
int j = 0; j < nPoints; j++ ) {
127 {coords_xi1.
at(j + 1), coords_xi2.
at(j + 1)},
128 weights.
at(j + 1), mode);
135 newGPCoord.push_back(global);
158 if ( xMan != NULL ) {
177 std :: stringstream str;
178 str <<
"GaussPointsTime" << time <<
"El" << elIndex <<
".vtk";
179 std :: string name = str.str();
200 double totArea = 0.0;
201 for (
size_t i = 0; i <
mTriangles.size(); i++ ) {
205 std :: vector< int >triToKeep;
206 const double triTol = ( 1.0e-6 ) * totArea;
208 for (
size_t i = 0; i <
mTriangles.size(); i++ ) {
210 triToKeep.push_back(i);
214 int nPointsTot = nPointsTri * nPointsDepth * triToKeep.size();
215 FloatArray coords_xi1, coords_xi2, coords_xi3, weightsTri, weightsDepth;
220 std :: vector< FloatArray >newGPCoord;
226 for (
int i = 0; i < int( triToKeep.size() ); i++ ) {
232 gCoords [ j ] = ( triangle.
giveVertex(j + 1) );
236 for (
int k = 1; k <= nPointsTri; k++ ) {
237 for (
int m = 1; m <= nPointsDepth; m++ ) {
240 double refElArea = 0.5;
241 double oldWeight = weightsTri.
at(k) * weightsDepth.
at(m);
242 double newWeight = 2.0 * refElArea * oldWeight * triangle.
getArea() / parentArea;
245 {coords_xi1.
at(k), coords_xi2.
at(k), coords_xi3.
at(m)},
260 local.
at(3) = coords_xi3.
at(m);
269 newGPCoord.push_back(global);
275 if ( xMan != NULL ) {
294 std :: stringstream str;
295 str <<
"GaussPointsTime" << time <<
"El" << elIndex <<
".vtk";
296 std :: string name = str.str();
358 if ( !stream.
read(_ptype) ) {
const FloatArray & giveVertex(int n) const
Element * elem
Element which integration rule is coupled to.
static void giveTriCoordsAndWeights(int nPoints, FloatArray &coords_xi1, FloatArray &coords_xi2, FloatArray &weights)
int firstLocalStrainIndx
firstLocalStrainIndx and lastLocalStrainIndx indexes describe range of components (strains for exampl...
static void giveLineCoordsAndWeights(int nPoints, FloatArray &coords_xi, FloatArray &weights)
Wrapper around cell with vertex coordinates stored in FloatArray**.
int giveNrVertices() const
Returns number of Geometry vertices.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
double & at(int i)
Coefficient access function.
int giveGlobalNumber() const
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
void setGlobalCoordinates(const FloatArray &iCoord)
double giveTargetTime()
Returns target time.
Abstract base class for all finite elements.
MaterialMode
Type representing material mode of integration point.
virtual int read(int *data, int count)=0
Reads count integer values into array pointed by data.
PatchIntegrationRule(int n, Element *e, const std::vector< Triangle > &iTriangles)
Constructor.
XfemManager * giveXfemManager()
void setSubPatchCoordinates(const FloatArray &c)
bool giveVtkDebug() const
Second order triangular interpolation in 3D space (6 nodes).
Class representing a 2d triangular linear interpolation based on area coordinates.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj)
Restores receiver's context to stream.
static FEI2dTrLin mTriInterp
virtual double giveWeight()
Returns integration weight of receiver.
virtual ~PatchIntegrationRule()
Destructor.
Class representing vector of real numbers.
This class manages the xfem part.
virtual double computeArea()
Computes the area (zero for all but 2d geometries).
virtual void local2global(FloatArray &answer, const FloatArray &gcoords, const FEICellGeometry &cellgeo)
Evaluates global coordinates from given local ones.
virtual int SetUpPointsOnTriangle(int nPoints, MaterialMode mode)
Sets up receiver's integration points on triangular (area coords) integration domain.
virtual double giveParentElSize() const
Returns the size (length, area or volume depending on element type) of the parent element...
void setNaturalCoordinates(const FloatArray &c)
int giveNumberOfIntegrationPoints() const
Returns number of integration points of receiver.
virtual bool computeLocalCoordinates(FloatArray &answer, const FloatArray &gcoords)
Computes the element local coordinates from given global coordinates.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
std::vector< Triangle > mTriangles
Domain * giveDomain() const
static FEI3dTrQuad mTriInterpQuad
Abstract base class representing the "problem" under consideration.
virtual TimeStep * giveCurrentStep(bool force=false)
Returns current time step.
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj)
Saves receiver's context to stream.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj)
Restores receiver's context to stream.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj)
Saves receiver's context to stream.
Class representing integration point in finite element program.
Class representing solution step.
std::vector< GaussPoint * > gaussPoints
Array containing integration points.
virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords)
Computes the global coordinates from given element's local coordinates.
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
virtual int SetUpPointsOnWedge(int nPointsTri, int nPointsDepth, MaterialMode mode)
Sets up receiver's integration points on a wedge integration domain.
Class representing Gaussian-quadrature integration rule.