在一个gsAssemblerBase<T>的派生类的成员函数中:
注意:
for (unsigned int i=0; i<m_patches.nPatches(); ++i)
{gsGeometry<> & geo = m_patches.patch(i);
gsDebug << "control points " << geo.coefs() << endl;
}
inline void evaluate(gsBasis<T> const & basis,
gsGeometryEvaluator<T> & geoEval,
gsMatrix<T> const & quNodes)
{
gsDebug << "gauss points " << quNodes << endl;
basis.active_into(quNodes.col(0), m_actives);
numActive = dof_per_node * m_actives.rows();
gsMatrix<T> allCp = geoEval.geometry().coefs();
control_point_coor.setZero(m_actives.rows(), allCp.cols());
for (int i=0; i<m_actives.rows(); ++i)
{
control_point_coor.row(i) = allCp.row(m_actives(i, 0));
}
gsDebug << control_point_coor << endl;
//Calculate the 0,1,2 derivatives!
basis.evalAllDers_into(quNodes, 2, m_basisData);
geoEval.evaluateAt(quNodes);
localMat.setZero(numActive, numActive);
localMat_localCoor = localMat;
}
gsGeometryEvaluator<T> & geoEval,
gsMatrix<T> const & quNodes)
{
gsDebug << "gauss points " << quNodes << endl;
basis.active_into(quNodes.col(0), m_actives);
numActive = dof_per_node * m_actives.rows();
gsMatrix<T> allCp = geoEval.geometry().coefs();
control_point_coor.setZero(m_actives.rows(), allCp.cols());
for (int i=0; i<m_actives.rows(); ++i)
{
control_point_coor.row(i) = allCp.row(m_actives(i, 0));
}
gsDebug << control_point_coor << endl;
//Calculate the 0,1,2 derivatives!
basis.evalAllDers_into(quNodes, 2, m_basisData);
geoEval.evaluateAt(quNodes);
localMat.setZero(numActive, numActive);
localMat_localCoor = localMat;
}
几何评估与矩阵运算
本文介绍了一个gsAssemblerBase<T>派生类中的成员函数实现细节,包括如何利用gsGeometryEvaluator<T>进行几何评估,以及使用gsMatrix<T>进行矩阵运算的具体步骤。文中详细展示了如何通过循环遍历获取控制点坐标,并计算高斯积分点,还涉及到了矩阵初始化、矩阵乘法等关键操作。
48

被折叠的 条评论
为什么被折叠?



