本文整理汇总了C++中DofManager::giveLocationArray方法的典型用法代码示例。如果您正苦于以下问题:C++ DofManager::giveLocationArray方法的具体用法?C++ DofManager::giveLocationArray怎么用?C++ DofManager::giveLocationArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DofManager
的用法示例。
在下文中一共展示了DofManager::giveLocationArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KeDispLock
void PrescribedGradientBCWeak :: assemble(SparseMtrx &answer, TimeStep *tStep,
CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s)
{
std::vector<FloatArray> gpCoordArray;
if ( type == TangentStiffnessMatrix || type == SecantStiffnessMatrix || type == ElasticStiffnessMatrix ) {
for( TracSegArray* el : mpTracElNew ) {
for ( GaussPoint *gp: *(el->mIntRule.get()) ) {
gpCoordArray.push_back( gp->giveGlobalCoordinates() );
assembleGPContrib(answer, tStep, type, r_s, c_s, *el, *gp);
}
}
if ( mpDisplacementLock != NULL ) {
int nsd = domain->giveNumberOfSpatialDimensions();
FloatMatrix KeDispLock(nsd, nsd);
KeDispLock.beUnitMatrix();
KeDispLock.times(mDispLockScaling);
int placeInArray = domain->giveDofManPlaceInArray(mLockNodeInd);
DofManager *node = domain->giveDofManager(placeInArray);
IntArray lockRows, lockCols, nodeRows, nodeCols;
mpDisplacementLock->giveLocationArray(giveDispLockDofIDs(), lockRows, r_s);
node->giveLocationArray(giveRegularDispDofIDs(), nodeRows, r_s);
mpDisplacementLock->giveLocationArray(giveDispLockDofIDs(), lockCols, c_s);
node->giveLocationArray(giveRegularDispDofIDs(), nodeCols, c_s);
answer.assemble(lockRows, nodeCols, KeDispLock);
answer.assemble(nodeRows, lockCols, KeDispLock);
FloatMatrix KZero( lockRows.giveSize(), lockCols.giveSize() );
KZero.zero();
answer.assemble(lockRows, lockCols, KZero);
}
} else {
printf("Skipping assembly in PrescribedGradientBCWeak::assemble().\n");
}
// std :: string fileName("TracGpCoord.vtk");
// XFEMDebugTools :: WritePointsToVTK(fileName, gpCoordArray);
}