zoukankan      html  css  js  c++  java
  • 11月26日

    11月26日


    utilities里面几个程序


    displayObj 显示obj文件

    generateInterpolant

    generateInterpolationMatrix

    generateSurfaceMesh veg体网格转obj面网格,内部点保留

    objMergeFiles


    generateMassMatrix 计算质量矩阵

    largeModalDeformationFactory 可以计算模态系数


    interactiveDeformableSimulator 非降维模拟

    reducedDynamicSolver-rt 一个降维模拟的demo


    SparseMatrix类的一些函数

    有一些submatrix索引

    相关成员:

    numSubMatrixIDs  子矩阵个数

    int*** subMatrixIndices  存放各个子矩阵每一行的非零元素列号

    int** subMatrixIndexLengths 存放各个子矩阵每一行的非零元素个数


     SparseMatrix::BuildSubMatrixIndices(SparseMatrix & submatrix, int subMatrixID=0) 

    函数的作用是,假设有一个行列数相同,但是非零元是当前矩阵子集的矩阵,现在建立一个索引,记录这个矩阵的非零元在当前矩阵的物理位置(就是在数组的第几个元素)。

    可以对多个矩阵建立索引,用subMatrixID指定索引号


    AddSubMatrix(double factor, SparseMatrix & submatrix, int subMatrixID=0);

    submatrix已经建立好索引了,快速计算 *this += factor * submatrix  


    BuildSuperMatrixIndices(int numFixedRows, int * fixedRows, int numFixedColumns, int * fixedColumns, SparseMatrix * superMatrix, int oneIndexed)

    假定当前矩阵是某个大矩阵通过移除某些行某些列(移除的行列号记录在  fixedRows、fixedColumns)所得到的结果。要求建立一个索引,给出当前矩阵的每个元素在大矩阵的对应物理位置。

    只允许一套这样的索引


    SparseMatrix::AssignSuperMatrix(SparseMatrix * superMatrix)

    把当前矩阵的元素的值设置为大矩阵superMatrix的对应元素,注意是大矩阵不变,修改当前矩阵,需要预先建好索引。


    相关成员

      int ** superMatrixIndices;   记录矩阵每个元素在大矩阵的列号

      int * superRows; 当前矩阵每行在大矩阵的行号


    RemoveRowsColumns(int numRemovedRowColumns, int * removedRowColumns, int oneIndexed=0)

    同时移除指定的行列,也就是第i行和第i列同时移除


    ScalarMultiply(const double alpha, SparseMatrix * dest=NULL)

    *dest = *this * alpha,如果dest为NULL,默认为this


    AddSubMatrix(double factor, SparseMatrix & submatrix, int subMatrixID=0)

    this += submatrix * factor


    RemoveRows(int mFull, double * xConstrained, double * x, int numFixedRows, int * fixedRows, int oneIndexed=0)

    xConstraint = x - fixedRows指定元素


    隐式欧拉法

    大概的思路是把二阶的微分方程化为关于速度的一阶方程,再由vi-1 迭代求解vi

    迭代的具体方法是,

    1. 先算出ti-1时刻的各种状态(速度 位移 内力 切向刚度矩阵等等 ),代入微分方程,解出ti时刻的速度,从而知道ti时刻的各种状态

    2. 利用当前得到的ti时刻各种状态,代入ti-1时刻,得到对ti时刻新的估计

    3. 不断重复2,直到估计出的ti时刻状态变化小于给定阈值






  • 相关阅读:
    第五次站立会议
    第四次站立会议
    迪杰斯特拉算法求最短路径问题
    数组课堂作业
    java2
    Java书写add函数
    《大道至简》第二章(是懒人创造了方法)读后感
    大二暑假周进度报告之四
    大二暑假周进度报告之三
    大二暑假周进度报告之二
  • 原文地址:https://www.cnblogs.com/dydx/p/4235955.html
Copyright © 2011-2022 走看看