本文整理汇总了C++中StructuralInterfaceMaterialStatus::letNormalBe方法的典型用法代码示例。如果您正苦于以下问题:C++ StructuralInterfaceMaterialStatus::letNormalBe方法的具体用法?C++ StructuralInterfaceMaterialStatus::letNormalBe怎么用?C++ StructuralInterfaceMaterialStatus::letNormalBe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StructuralInterfaceMaterialStatus
的用法示例。
在下文中一共展示了StructuralInterfaceMaterialStatus::letNormalBe方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initializeCZMaterial
//.........这里部分代码省略.........
mCZEnrItemIndices.push_back(eiIndex);
// Add indices of other ei, that cause interaction through
// intersection enrichment fronts
mCZTouchingEnrItemIndices.push_back(touchingEiIndices);
// Compute crack normal
FloatArray crackTang;
crackTang.beDifferenceOf(crackPolygon [ segIndex + 1 ], crackPolygon [ segIndex ]);
if ( crackTang.computeSquaredNorm() > tol2 ) {
crackTang.normalize();
}
FloatArray crackNormal = {
-crackTang.at(2), crackTang.at(1)
};
mpCZIntegrationRules [ segIndex ]->SetUpPointsOn2DEmbeddedLine(mCSNumGaussPoints, matMode,
crackPolygon [ segIndex ], crackPolygon [ segIndex + 1 ]);
for ( GaussPoint *gp: *mpCZIntegrationRules [ segIndex ] ) {
double gw = gp->giveWeight();
double segLength = crackPolygon [ segIndex ].distance(crackPolygon [ segIndex + 1 ]);
gw *= 0.5 * segLength;
gp->setWeight(gw);
// Fetch material status and set normal
StructuralInterfaceMaterialStatus *ms = dynamic_cast< StructuralInterfaceMaterialStatus * >( mpCZMat->giveStatus(gp) );
if ( ms == NULL ) {
OOFEM_ERROR("Failed to fetch material status.");
}
ms->letNormalBe(crackNormal);
// Give Gauss point reference to the enrichment item
// to simplify post processing.
crack->AppendCohesiveZoneGaussPoint(gp);
}
}
}
partitionSucceeded = true;
}
} // if(firstIntersection)
else {
// Loop over triangles
std :: vector< Triangle >allTriCopy;
for ( size_t triIndex = 0; triIndex < mSubTri.size(); triIndex++ ) {
// Call alternative version of XfemElementInterface_prepareNodesForDelaunay
std :: vector< std :: vector< FloatArray > >pointPartitionsTri;
double startXi, endXi;
bool intersection = false;
XfemElementInterface_prepareNodesForDelaunay(pointPartitionsTri, startXi, endXi, mSubTri [ triIndex ], eiIndex, intersection);
if ( intersection ) {
// Use XfemElementInterface_partitionElement to subdivide triangle j
for ( int i = 0; i < int ( pointPartitionsTri.size() ); i++ ) {
this->XfemElementInterface_partitionElement(allTriCopy, pointPartitionsTri [ i ]);
}
// Add cohesive zone Gauss points