Interface到底是做什么的呢?
-
新手请教各位老师,AX=B,边界条件的影响不是应该加到稀疏矩阵A的对角系数和源项B中了吗,initMatrixInterfaces和updateMatrixInterfaces是什么作用呢,针对特定边界条件吗?汽车的算例,我测试X和B都没有发生改变
initMatrixInterfaces ( bouCoeffsCmpt, interfaces, psiCmpt, sourceCmpt, cmpt ); updateMatrixInterfaces ( bouCoeffsCmpt, interfaces, psiCmpt, sourceCmpt, cmpt ); void Foam::lduMatrix::Amul ( scalarField& Apsi, const tmp<scalarField>& tpsi, const FieldField<Field, scalar>& interfaceBouCoeffs, const lduInterfaceFieldPtrsList& interfaces, const direction cmpt ) const { scalar* __restrict__ ApsiPtr = Apsi.begin(); const scalarField& psi = tpsi(); const scalar* const __restrict__ psiPtr = psi.begin(); const scalar* const __restrict__ diagPtr = diag().begin(); const label* const __restrict__ uPtr = lduAddr().upperAddr().begin(); const label* const __restrict__ lPtr = lduAddr().lowerAddr().begin(); const scalar* const __restrict__ upperPtr = upper().begin(); const scalar* const __restrict__ lowerPtr = lower().begin(); initMatrixInterfaces ( interfaceBouCoeffs, interfaces, psi, Apsi, cmpt ); const label nCells = diag().size(); for (label cell=0; cell<nCells; cell++) { ApsiPtr[cell] = diagPtr[cell]*psiPtr[cell]; } const label nFaces = upper().size(); for (label face=0; face<nFaces; face++) { ApsiPtr[uPtr[face]] += lowerPtr[face]*psiPtr[lPtr[face]]; ApsiPtr[lPtr[face]] += upperPtr[face]*psiPtr[uPtr[face]]; } // Update interface interfaces updateMatrixInterfaces ( interfaceBouCoeffs, interfaces, psi, Apsi, cmpt ); tpsi.clear(); }
-
-
@w352405196 我也是小白,并行这块我也不是很明白了,需要别的老师来回答你了