82double Lattice2d_mt :: giveLength()
89 length = sqrt(dx * dx + dy * dy);
96Lattice2d_mt :: givePressure()
106Lattice2d_mt :: giveOldPressure()
117Lattice2d_mt :: giveMass()
133 double ksi = coords.
at(1);
134 double n1 = ( 1. - ksi ) * 0.5;
135 double n2 = ( 1. + ksi ) * 0.5;
140 answer.
at(1, 1) = n1;
141 answer.
at(1, 2) = n2;
159 answer.
at(1, 1) = -1.;
160 answer.
at(1, 2) = 1.;
162 answer.
times(1. / l);
166Lattice2d_mt :: updateInternalState(
TimeStep *tStep)
174 for (
auto &gp: * iRule ) {
185Lattice2d_mt :: computeGaussPoints()
193Lattice2d_mt :: giveDofManDofIDMask(
int inode,
IntArray &answer)
const
204 LatticeTransportElement :: initializeFrom(ir, priority);
215Lattice2d_mt :: postInitialize()
218 this->LatticeTransportElement :: postInitialize();
238 GaussPoint *gp = iRule->getIntegrationPoint(0);
242 answer.
at(1, 1) = 1.;
243 answer.
at(1, 2) = -1.;
244 answer.
at(2, 1) = -1;
245 answer.
at(2, 2) = 1.;
250 double temp = k * dV / pow(
length, 2.);
261 answer.
at(1, 1) = 2.;
262 answer.
at(1, 2) = 1.;
263 answer.
at(2, 1) = 1.;
264 answer.
at(2, 2) = 2.;
267 answer.
times(c * dV);
273Lattice2d_mt :: computeInternalSourceRhsVectorAt(
FloatArray &answer,
TimeStep *tStep, ValueModeType mode)
278 FloatArray val, helpLoadVector, globalIPcoords;
285 for (
int i = 1; i <= nLoads; i++ ) {
287 auto load =
domain->giveLoad(n);
288 auto ltype = load->giveBCGeoType();
299 GaussPoint *gp = iRule->getIntegrationPoint(0);
301 gravityHelp.
at(1) = 1.;
302 gravityHelp.
at(2) = -1.;
305 load->computeValueAt(val, tStep, deltaX, mode);
309 double helpFactor = val.
at(1) * k * dV;
312 gravityHelp.
times(helpFactor);
314 if ( helpLoadVector.
isEmpty() ) {
318 for (
int j = 1; j <= gravityHelp.
giveSize(); j++ ) {
319 helpLoadVector.
at(j) += gravityHelp.
at(j);
323 answer.
add(helpLoadVector);
346#define POINT_TOL 1.e-3
382 if ( !
gc.testElementGraphicActivity(
this) ) {
387 EASValsSetColor(
gc.getElementColor() );
389 p [ 0 ].x = ( FPNum ) this->
giveNode(1)->giveCoordinate(1);
390 p [ 0 ].y = ( FPNum ) this->
giveNode(1)->giveCoordinate(2);
392 p [ 1 ].x = ( FPNum ) this->
giveNode(2)->giveCoordinate(1);
393 p [ 1 ].y = ( FPNum ) this->
giveNode(2)->giveCoordinate(2);
396 go = CreateLine3D(p);
397 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
398 EGAttachObject(go, ( EObjectP )
this);
399 EMAddGraphicsToModel(ESIModel(), go);
408 if ( !
gc.testElementGraphicActivity(
this) ) {
413 EASValsSetColor(
gc.getCrossSectionColor() );
419 p [ 0 ].x = ( FPNum ) coords.
at(1);
420 p [ 0 ].y = ( FPNum ) coords.
at(2);
421 p [ 0 ].z = ( FPNum ) coords.
at(3);
422 p [ 1 ].x = ( FPNum ) coords.
at(4);
423 p [ 1 ].y = ( FPNum ) coords.
at(5);
424 p [ 1 ].z = ( FPNum ) coords.
at(6);
426 go = CreateLine3D(p);
427 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
428 EGAttachObject(go, ( EObjectP )
this);
429 EMAddGraphicsToModel(ESIModel(), go);
433Lattice2d_mt :: giveCrossSectionCoordinates(
FloatArray &coords)
435 double x1 = this->
giveNode(1)->giveCoordinate(1);
436 double y1 = this->
giveNode(1)->giveCoordinate(2);
437 double x2 = this->
giveNode(2)->giveCoordinate(1);
438 double y2 = this->
giveNode(2)->giveCoordinate(2);
444 normalDirection.
at(1) = x2 - x1;
445 normalDirection.
at(2) = y2 - y1;
447 if ( normalDirection.
at(2) == 0. ) {
448 shearDirection.
at(1) = 0.;
449 shearDirection.
at(2) = 1.;
451 shearDirection.
at(1) = 1.0;
452 shearDirection.
at(2) = -normalDirection.
at(1) / normalDirection.
at(2);
#define REGISTER_Element(class)
double giveCoordinate(int i) const
Node * giveNode(int i) const
IntArray * giveBodyLoadArray()
Returns array containing load numbers of loads acting on element.
int numberOfDofMans
Number of dofmanagers.
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
virtual double giveCharacteristicValue(CharType type, TimeStep *tStep)
Domain * giveDomain() const
Domain * domain
Link to domain object, useful for communicating with other FEM components.
int number
Component number.
Index giveSize() const
Returns the size of receiver.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
bool isEmpty() const
Returns true if receiver is empty.
void add(const FloatArray &src)
void resize(Index rows, Index cols)
void zero()
Zeroes all coefficient of receiver.
double at(std::size_t i, std::size_t j) const
IntegrationPointStatus * giveMaterialStatus(IntegrationPointStatusIDType key=IPSID_Default)
GaussPoint * getIntegrationPoint(int n)
void drawRawCrossSections(oofegGraphicContext &gc, TimeStep *tStep)
void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep) override
static ParamKey IPK_Lattice2d_mt_thickness
static ParamKey IPK_Lattice2d_mt_width
void computeNmatrixAt(FloatMatrix &n, const FloatArray &) override
static ParamKey IPK_Lattice2d_mt_crackwidth
static ParamKey IPK_Lattice2d_mt_couplingnumber
void giveCrossSectionCoordinates(FloatArray &coords) override
double computeVolumeAround(GaussPoint *) override
static ParamKey IPK_Lattice2d_mt_dim
static ParamKey IPK_Lattice2d_mt_gpcoords
void computeNSubMatrixAt(FloatMatrix &n, const FloatArray &)
static ParamKey IPK_Lattice2d_mt_couplingflag
double giveLength() override
LatticeTransportElement(int, Domain *, ElementMode)
double giveOldPressure() const
double giveMass() const
Returns mass.
double givePressure() const
Returns pressure.
Material * giveMaterial() override
virtual void updateInternalState(const FloatArray &state, GaussPoint *gp, TimeStep *tStep)
@ GravityPressureBGT
Pressure due to distributed body load.
#define OOFEG_RAW_CROSSSECTION_LAYER
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
#define OOFEG_RAW_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_LAYER
#define PM_ELEMENT_ERROR_IFNOTSET(_pm, _componentnum, _paramkey)
#define PM_UPDATE_PARAMETER(_val, _pm, _ir, _componentnum, _paramkey, _prio)