88 length = sqrt(dx * dx + dy * dy);
144 n1 = ( 1. - ksi ) * 0.5;
145 n2 = ( 1. + ksi ) * 0.5;
150 answer.
at(1, 1) = n1;
151 answer.
at(1, 2) = n2;
169 answer.
at(1, 1) = -1.;
170 answer.
at(1, 2) = 1.;
172 answer.
times(1. / l);
217 if ( result !=
IRRT_OK )
return result;
240 if ( couplingFlag == 1 ) {
263 gp = iRule->getIntegrationPoint(0);
270 answer.
at(1, 1) = 1.;
271 answer.
at(1, 2) = -1.;
272 answer.
at(2, 1) = -1;
273 answer.
at(2, 2) = 1.;
277 double temp = k * dV / pow(length, 2.);
290 answer.
at(1, 1) = 2.;
291 answer.
at(1, 2) = 1.;
292 answer.
at(2, 1) = 1.;
293 answer.
at(2, 2) = 2.;
296 answer.
times(c * dV);
313 FloatArray val, helpLoadVector, globalIPcoords;
321 for (
int i = 1; i <= nLoads; i++ ) {
335 GaussPoint *gp = iRule->getIntegrationPoint(0);
337 gravityHelp.
at(1) = 1.;
338 gravityHelp.
at(2) = -1.;
345 double helpFactor = val.
at(1) * k * dV;
348 gravityHelp.
times(helpFactor);
350 if ( helpLoadVector.
isEmpty() ) {
354 for (
int j = 1; j <= gravityHelp.
giveSize(); j++ ) {
355 helpLoadVector.
at(j) += gravityHelp.
at(j);
359 answer.
add(helpLoadVector);
382 #define POINT_TOL 1.e-3 432 go = CreateLine3D(p);
433 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
434 EGAttachObject(go, ( EObjectP )
this);
435 EMAddGraphicsToModel(ESIModel(), go);
455 p [ 0 ].x = ( FPNum ) coords.
at(1);
456 p [ 0 ].y = ( FPNum ) coords.
at(2);
457 p [ 0 ].z = ( FPNum ) coords.
at(3);
458 p [ 1 ].x = ( FPNum ) coords.
at(4);
459 p [ 1 ].y = ( FPNum ) coords.
at(5);
460 p [ 1 ].z = ( FPNum ) coords.
at(6);
462 go = CreateLine3D(p);
463 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
464 EGAttachObject(go, ( EObjectP )
this);
465 EMAddGraphicsToModel(ESIModel(), go);
471 double x1, y1, x2, y2;
480 normalDirection.
resize(2);
481 normalDirection.
zero();
483 shearDirection.
zero();
484 normalDirection.
at(1) = x2 - x1;
485 normalDirection.
at(2) = y2 - y1;
487 if ( normalDirection.
at(2) == 0. ) {
488 shearDirection.
at(1) = 0.;
489 shearDirection.
at(2) = 1.;
491 shearDirection.
at(1) = 1.0;
492 shearDirection.
at(2) =
493 -normalDirection.
at(1) / normalDirection.
at(2);
int testElementGraphicActivity(Element *)
Test if particular element passed fulfills various filtering criteria for its graphics output...
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
#define _IFT_Lattice2DMT_couplingflag
virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords)
Computes the global coordinates from given element's local coordinates.
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of unknowns.
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
Access method for default integration rule.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
This class implements associated Material Status to LatticeTransportMaterial.
bcGeomType
Type representing the geometric character of loading.
void zero()
Sets all component to zero.
double & at(int i)
Coefficient access function.
#define OOFEG_RAW_CROSSSECTION_LAYER
#define _IFT_Lattice2DMT_dim
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
virtual void computeInternalSourceRhsVectorAt(FloatArray &answer, TimeStep *, ValueModeType mode)
Computes the contribution to balance equation(s) due to internal sources.
#define OOFEG_RAW_GEOMETRY_LAYER
virtual void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
void clear()
Clears receiver (zero size).
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
virtual void computeValueAt(FloatArray &answer, TimeStep *tStep, const FloatArray &coords, ValueModeType mode)=0
Computes components values of load at given point - global coordinates (coordinates given)...
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
virtual void computeConductivityMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Computes the conductivity matrix of the receiver.
virtual double giveCoordinate(int i)
virtual double giveLength()
Returns the element length.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
MatResponseMode
Describes the character of characteristic material matrix.
Pressure due to distributed body load.
virtual void updateInternalState(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
Abstract base class representing integration rule.
virtual double giveMass()
Returns the mass.
Lattice2d_mt(int, Domain *, ElementMode em=HeatTransferEM)
virtual void drawRawCrossSections(oofegGraphicContext &gc, TimeStep *tStep)
virtual double givePressure()
Returns the pressure.
virtual void drawYourself(oofegGraphicContext &gc, TimeStep *tStep)
virtual void computeNmatrixAt(FloatMatrix &n, const FloatArray &)
Computes the interpolation matrix corresponding to all unknowns.
#define OOFEG_RAW_GEOMETRY_WIDTH
#define _IFT_Lattice2DMT_thick
void times(double f)
Multiplies receiver by factor f.
virtual void computeNSubMatrixAt(FloatMatrix &n, const FloatArray &)
IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
IntArray * giveBodyLoadArray()
Returns array containing load numbers of loads acting on element.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
IntArray bodyLoadArray
Array containing indexes of loads (body loads and boundary loads are kept separately), that apply on receiver.
virtual double giveCharacteristicValue(CharType type, TimeStep *tStep)
Computes characteristic value of receiver of requested type in given time step.
bool isEmpty() const
Returns true if receiver is empty.
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
#define _IFT_Lattice2DMT_gpcoords
virtual void updateInternalState(const FloatArray &state, GaussPoint *gp, TimeStep *tStep)
Updates internal state of material according to new state vector.
int numberOfGaussPoints
Number of integration points as specified by nip.
double givePressure()
Returns pressure.
virtual double computeVolumeAround(GaussPoint *)
Returns volume related to given integration point.
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
#define _IFT_Lattice2DMT_couplingnumber
IRResultType
Type defining the return values of InputRecord reading operations.
GaussPoint * getIntegrationPoint(int n)
Access particular integration point of receiver.
IntegrationPointStatus * giveMaterialStatus()
Returns reference to associated material status (NULL if not defined).
#define _IFT_Lattice2DMT_crackwidth
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
#define _IFT_Lattice2DMT_width
void zero()
Zeroes all coefficients of receiver.
virtual bcGeomType giveBCGeoType() const
Returns geometry character of boundary condition.
Abstract base class for all constitutive models for transport problems.
virtual void computeGradientMatrixAt(FloatMatrix &answer, const FloatArray &lcoords)
Computes the gradient matrix corresponding to one unknown.
void times(double s)
Multiplies receiver with scalar.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
void zero()
Zeroes all coefficient of receiver.
virtual void giveDofManDofIDMask(int inode, IntArray &) const
Returns dofmanager dof mask for node.
Load is base abstract class for all loads.
double giveMass()
Returns mass.
int giveSize() const
Returns the size of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual void giveCrossSectionCoordinates(FloatArray &coords)
virtual double giveOldPressure()
Returns the old pressure.
Class implementing node in finite element mesh.
double normalize()
Normalizes receiver.
virtual void computeCapacityMatrix(FloatMatrix &answer, TimeStep *tStep)
Computes the capacity matrix of the receiver.
Node * giveNode(int i) const
Returns reference to the i-th node of element.
virtual Material * giveMaterial()
Load * giveLoad(int n)
Service for accessing particular domain load.
virtual bool computeLocalCoordinates(FloatArray &answer, const FloatArray &gcoords)
Computes the element local coordinates from given global coordinates.
EPixel getCrossSectionColor()
Class representing integration point in finite element program.
virtual void giveGpCoordinates(FloatArray &coords)
Gives the GP coordinates.
Class representing solution step.
int numberOfDofMans
Number of dofmanagers.
void add(const FloatArray &src)
Adds array src to receiver.
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.
OGC_PlotModeType giveIntVarPlotMode()