本文整理汇总了C++中StructuralElement::computeMidPlaneNormal方法的典型用法代码示例。如果您正苦于以下问题:C++ StructuralElement::computeMidPlaneNormal方法的具体用法?C++ StructuralElement::computeMidPlaneNormal怎么用?C++ StructuralElement::computeMidPlaneNormal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StructuralElement
的用法示例。
在下文中一共展示了StructuralElement::computeMidPlaneNormal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: giveTensorRotationMatrix
void
OrthotropicLinearElasticMaterial :: giveTensorRotationMatrix(FloatMatrix &answer, GaussPoint *gp)
//
// returns [3,3] rotation matrix from local principal axes of material
// to local axes used at gp (element) level
//
{
int elementCsFlag;
FloatMatrix elementCs;
StructuralElement *element = static_cast< StructuralElement * >( gp->giveElement() );
if ( gp->giveMaterialMode() == _1dMat ) { //do not rotate 1D materials on trusses and beams
answer.resize(3, 3);
answer.beUnitMatrix();
return;
}
elementCsFlag = element->giveLocalCoordinateSystem(elementCs);
//
// in localCoordinateSystem the directional cosines are stored columwise (exception)
// in elementCs rowwise.
//
if ( this->cs_type == localCS ) {
//
// in localCoordinateSystem are stored directional cosines
//
if ( elementCsFlag ) {
answer.beProductOf(elementCs, * this->localCoordinateSystem);
} else {
answer = * this->localCoordinateSystem;
}
} else if ( this->cs_type == shellCS ) {
FloatArray elementNormal, helpx, helpy;
localCoordinateSystem = new FloatMatrix(3, 3);
element->computeMidPlaneNormal(elementNormal, gp);
helpx.beVectorProductOf(* ( this->helpPlaneNormal ), elementNormal);
// test if localCoordinateSystem is uniquely
// defined by elementNormal and helpPlaneNormal
if ( helpx.computeNorm() < ZERO_LENGTH ) {
OOFEM_ERROR("element normal parallel to plane normal encountered");
}
helpy.beVectorProductOf(elementNormal, helpx);
for ( int i = 1; i < 4; i++ ) {
localCoordinateSystem->at(i, 1) = helpx.at(i);
localCoordinateSystem->at(i, 2) = helpy.at(i);
localCoordinateSystem->at(i, 3) = elementNormal.at(i);
}
//
// possible rotation about local z-axis should be considered in future
//
/*
* //
* // GiveZRotationMtrx assembles rotMtrx from cs rotated from curent about rotAngle
* // to current cs
* //
* zRotMtrx = GiveZRotationMtrx (rotAngle); // rotAngle supplied by user
* rotatedLocalCoordinateSystem = localCoordinateSystem->Times (zRotMtrx);
* delete localCoordinateSystem;
* localCoordinateSystem = rotatedLocalCoordinateSystem;
*/
if ( elementCsFlag ) {
answer.beProductOf(elementCs, * this->localCoordinateSystem);
} else {
answer = * this->localCoordinateSystem;
}
delete localCoordinateSystem;
localCoordinateSystem = NULL;
} else {
OOFEM_ERROR("internal error no cs defined");
}
// t at (i,j) contains cosine of angle between elementAxis(i) and localMaterialAxis(j).
}