67 IntArray(6), IntArray(6), IntArray(6)
84 aBodyLoadArry.
at(1) = 3;
151 for (
auto &gp : *iRule ) {
154 double dA = detJ * gp->giveWeight();
156 for (
int j = 0; j < 3; j++ ) {
157 answer(2 * j) +=
N(j) * rho * gVector(0) * dA;
158 answer(2 * j + 1) +=
N(j) * rho * gVector(1) * dA;
176 int numberOfEdgeIPs = ( int ) ceil( ( boundaryLoad->
giveApproxOrder() + 1. ) / 2. ) * 2;
185 for (
auto &gp : iRule ) {
186 const FloatArray &lcoords = gp->giveNaturalCoordinates();
199 for (
int j = 0; j < 3; j++ ) {
200 f(2 * j) +=
N(j) * t(0) * dS;
201 f(2 * j + 1) +=
N(j) * t(1) * dS;
218 double mm = rho * this->
area / 3.0;
219 for (
int i = 1; i <= 6; i++ ) {
230 double mm = rho * this->
area / 3.0;
231 for (
int i = 1; i <= 6; i++ ) {
232 answer.
at(i, i) = mm;
252 eps.
at(1) = (
b [ 0 ] * u.at(1) +
b [ 1 ] * u.at(3) +
b [ 2 ] * u.at(5) );
253 eps.
at(2) = (
c [ 0 ] * u.at(2) +
c [ 1 ] * u.at(4) +
c [ 2 ] * u.at(6) );
254 eps.
at(3) = (
b [ 0 ] * u.at(2) +
b [ 1 ] * u.at(4) +
b [ 2 ] * u.at(6) +
c [ 0 ] * u.at(1) +
c [ 1 ] * u.at(3) +
c [ 2 ] * u.at(5) );
269 for (
int i = 0; i < 3; i++ ) {
270 answer.
at( ( i ) * 2 + 1 ) =
area * ( stress.
at(1) *
b [ i ] + stress.
at(3) *
c [ i ] );
271 answer.
at( ( i + 1 ) * 2 ) =
area * ( stress.
at(3) *
b [ i ] + stress.
at(2) *
c [ i ] );
278 Node *node1, *node2, *node3;
279 double x1, x2, x3, y1, y2, y3;
294 this->
area = 0.5 * ( x2 * y3 + x1 * y2 + y1 * x3 - x2 * y1 - x3 * y2 - x1 * y3 );
296 b [ 0 ] = ( y2 - y3 ) / ( 2. *
area );
297 c [ 0 ] = ( x3 - x2 ) / ( 2. *
area );
298 b [ 1 ] = ( y3 - y1 ) / ( 2. *
area );
299 c [ 1 ] = ( x1 - x3 ) / ( 2. *
area );
300 b [ 2 ] = ( y1 - y2 ) / ( 2. *
area );
301 c [ 2 ] = ( x2 - x1 ) / ( 2. *
area );
329 double x1, x2, x3, y1, y2, y3;
367 double factor = s21.
dotProduct(s23) / s23.dotProduct(s23);
368 foot1.
add(factor, s23);
374 foot2.
add(factor, s31);
379 factor = s13.
dotProduct(s12) / s12.dotProduct(s12);
380 foot3.
add(factor, s12);
385 double dt1(deltaT), dt2(deltaT), dt3(deltaT);
387 double u1_proj = u1.dotProduct(altitude1) / altitude1.
computeNorm();
388 if ( u1_proj > 1.e-6 ) {
392 double u2_proj = u2.dotProduct(altitude2) / altitude2.
computeNorm();
393 if ( u2_proj > 1.e-6 ) {
398 if ( u3_proj > 1.e-6 ) {
402 double dt_min =
min( dt1,
min(dt2, dt3) );
447 if ( type == IST_VOFFraction ) {
453 if ( type == IST_Density ) {
475 EASValsSetEdgeFlag(TRUE);
487 go = CreateTriangle3D(p);
488 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
489 EGAttachObject(go, ( EObjectP )
this);
490 EMAddGraphicsToModel(ESIModel(), go);
495 int i, indx, result = 0;
525 s [ 0 ] = v1.
at(indx);
526 s [ 1 ] = v2.
at(indx);
527 s [ 2 ] = v3.
at(indx);
532 for ( i = 0; i < 3; i++ ) {
540 tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
541 EGWithMaskChangeAttributes(LAYER_MASK, tr);
542 EMAddGraphicsToModel(ESIModel(), tr);
546 for ( i = 0; i < 3; i++ ) {
549 p [ i ].z = s [ i ] * landScale;
555 EASValsSetFillStyle(FILL_SOLID);
556 tr = CreateTriangle3D(p);
557 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | FILL_MASK | LAYER_MASK, tr);
560 EASValsSetFillStyle(FILL_SOLID);
561 tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
562 EGWithMaskChangeAttributes(FILL_MASK | LAYER_MASK, tr);
565 EMAddGraphicsToModel(ESIModel(), tr);
virtual void edgeLocal2global(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates edge global coordinates from given local ones.
CrossSection * giveCrossSection()
virtual void drawRawGeometry(oofegGraphicContext &)
virtual void edgeEvalN(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of edge interpolation functions (shape functions) at given point.
int testElementGraphicActivity(Element *)
Test if particular element passed fulfills various filtering criteria for its graphics output...
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
void subtract(const FloatArray &src)
Subtracts array src to receiver.
virtual void postInitialize()
Performs post initialization steps.
virtual int checkConsistency()
Performs consistency check.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
virtual int computeNumberOfDofs()
Computes or simply returns total number of element's local DOFs.
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of unknowns.
ScalarAlgorithmType getScalarAlgo()
Abstract base class for all fluid materials.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
virtual void computeEdgeBCSubVectorAt(FloatArray &answer, Load *load, int iEdge, TimeStep *tStep)
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
IRResultType initializeFrom(InputRecord *ir)
Initializes receiver acording to object description stored in input record.
void zero()
Sets all component to zero.
TR1_2D_PFEM(int n, Domain *aDomain, int particle1, int particle2, int particle3, int mat, int cs)
Constructor of TR1_2D_PFEM Element.
double & at(int i)
Coefficient access function.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Class implementing element body load, acting over whole element volume (e.g., the dead weight)...
#define OOFEG_RAW_GEOMETRY_LAYER
static IntArray velocityDofMask
Mask of velocity Dofs.
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
EPixel getElementEdgeColor()
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
virtual double edgeGiveTransformationJacobian(int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the edge Jacobian of transformation between local and global coordinates.
virtual void computeDiagonalMassMtrx(FloatArray &answer, TimeStep *tStep)
Calculates diagonal mass matrix as vector.
virtual void computeDeviatoricStress(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
Computes deviatoric stress vector in given integration point and solution step from given total strai...
virtual void computeComponentArrayAt(FloatArray &answer, TimeStep *tStep, ValueModeType mode)
Computes boundary condition value - its components values at given time.
virtual double giveCoordinate(int i)
virtual int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *atTime)
Returns internal state variable (like stress,strain) at node of element in Reduced form...
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
Abstract base class representing integration rule.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual bcType giveType() const
double giveTimeIncrement()
Returns solution step associated time increment.
virtual void giveElementDofIDMask(IntArray &answer) const
Returns element dof mask for node.
EPixel getDeformedElementColor()
InternalStateType giveIntVarType()
static FEI2dTrLin velocityInterpolation
Interpolation for velocity unknowns.
virtual void computeDeviatoricStressVector(FloatArray &stress_dev, double &epsp_vol, GaussPoint *gp, const FloatArray &eps, double pressure, TimeStep *tStep)
Computes the deviatoric stress vector and volumetric strain rate from given deviatoric strain and pre...
Abstract base class representing a boundary load (force, momentum, ...) that acts directly on a bound...
double dotProduct(const FloatArray &x) const
Computes the dot product (or inner product) of receiver and argument.
int material
Number of associated material.
#define OOFEG_RAW_GEOMETRY_WIDTH
virtual double giveWeight()
Returns integration weight of receiver.
virtual FormulationType giveFormulationType()
Specifies is load should take local or global coordinates.
Neumann type (prescribed flux).
Wrapper around element definition to provide FEICellGeometry interface.
virtual void setCrossSection(int csIndx)
Sets the cross section model of receiver.
virtual int giveApproxOrder()=0
double at(int i, int j) const
Coefficient access function.
static FEI2dTrLin pressureInterpolation
Interpolation for pressure unknowns.
void setDofManagers(const IntArray &dmans)
Sets receiver dofManagers.
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj)
Stores receiver state to output stream.
InternalStateMode giveIntVarMode()
~TR1_2D_PFEM()
Destructor.
Class representing vector of real numbers.
virtual double computeCriticalTimeStep(TimeStep *tStep)
Calculates critical time step.
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation.
virtual void computeDeviatoricStressDivergence(FloatArray &answer, TimeStep *tStep)
Calculates the divergence of the deviatoric stress.
void assemble(const FloatArray &fe, const IntArray &loc)
Assembles the array fe (typically, the load vector of a finite element) into the receiver, using loc as location array.
double computeNorm() const
Computes the norm (or length) of the vector.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void setBodyLoads(const IntArray &bodyLoads)
Sets receiver bodyLoadArray.
virtual void giveDofManDofIDMask(int inode, IntArray &answer) const
Returns dofmanager dof mask for node.
void zero()
Zeroes all coefficients of receiver.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
int setUpIntegrationPoints(integrationDomain intdomain, int nPoints, MaterialMode matMode)
Initializes the receiver.
void zero()
Zeroes all coefficient of receiver.
Domain * giveDomain() const
InterfaceType
Enumerative type, used to identify interface type.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver acording to object description stored in input record.
virtual TimeStep * giveSolutionStepWhenIcApply(bool force=false)
Returns the solution step when Initial Conditions (IC) apply.
int min(int i, int j)
Returns smaller value from two given decimals.
void updateFringeTableMinMax(double *s, int size)
Load is base abstract class for all loads.
static IntArray pressureDofMask
Mask of pressure Dofs.
virtual TimeStep * giveCurrentStep(bool force=false)
Returns current time step.
int giveSize() const
Returns the size of receiver.
virtual void computeBodyLoadVectorAt(FloatArray &answer, BodyLoad *load, TimeStep *tStep, ValueModeType mode)
Computes the load vector due to body load acting on receiver, at given time step. ...
the oofem namespace is to define a context or scope in which all oofem names are defined.
Class implementing node in finite element mesh.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj)
Restores the receiver state previously written in stream.
void negated()
Switches the sign of every coefficient of receiver.
Node * giveNode(int i) const
Returns reference to the i-th node of element.
virtual void computeValueAt(FloatArray &answer, TimeStep *tStep, const FloatArray &coords, ValueModeType mode)
Computes components values of load at given point - global coordinates (coordinates given)...
virtual void drawScalar(oofegGraphicContext &context)
#define OOFEG_VARPLOT_PATTERN_LAYER
Class representing integration point in finite element program.
Class representing solution step.
This class is the implementation of general 2d element with arbitrary interpolation of velocity and p...
int numberOfDofMans
Number of dofmanagers.
virtual int checkConsistency()
Performs consistency check.
virtual int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *atTime)
Returns internal state variable (like stress,strain) at node of element in Reduced form...
InternalStateMode
Determines the mode of internal variable.
void add(const FloatArray &src)
Adds array src to receiver.
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
virtual Interface * giveInterface(InterfaceType)
Interface requesting service.
static IntArray edge_ordering[3]
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.