Commit 3acdc7cb authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

-> juropa.

parent efa50b10
...@@ -280,7 +280,8 @@ namespace AMDiS { ...@@ -280,7 +280,8 @@ namespace AMDiS {
if (factor != 1.0) if (factor != 1.0)
elementMatrix *= factor; elementMatrix *= factor;
addElementMatrix(elementMatrix, bound, elInfo, NULL); if (operators.size())
addElementMatrix(elementMatrix, bound, elInfo, NULL);
} }
...@@ -289,17 +290,17 @@ namespace AMDiS { ...@@ -289,17 +290,17 @@ namespace AMDiS {
const BoundaryType *bound, const BoundaryType *bound,
Operator *op) Operator *op)
{ {
FUNCNAME("DOFMatrix::assemble()"); FUNCNAME("DOFMatrix::assemble()");
TEST_EXIT_DBG(op)("No operator!\n"); TEST_EXIT_DBG(op)("No operator!\n");
set_to_zero(elementMatrix); set_to_zero(elementMatrix);
op->getElementMatrix(elInfo, elementMatrix, factor); op->getElementMatrix(elInfo, elementMatrix, factor);
if (factor != 1.0) if (factor != 1.0)
elementMatrix *= factor; elementMatrix *= factor;
addElementMatrix(elementMatrix, bound, elInfo, NULL); addElementMatrix(elementMatrix, bound, elInfo, NULL);
} }
...@@ -334,7 +335,8 @@ namespace AMDiS { ...@@ -334,7 +335,8 @@ namespace AMDiS {
if (factor != 1.0) if (factor != 1.0)
elementMatrix *= factor; elementMatrix *= factor;
addElementMatrix(elementMatrix, bound, rowElInfo, colElInfo); if (op || operators.size())
addElementMatrix(elementMatrix, bound, rowElInfo, colElInfo);
} }
......
...@@ -261,7 +261,8 @@ namespace AMDiS { ...@@ -261,7 +261,8 @@ namespace AMDiS {
static_cast<SecondOrderTerm*>(*termIt)->getLALt(elInfo, LALt); static_cast<SecondOrderTerm*>(*termIt)->getLALt(elInfo, LALt);
} }
/// Calls getLb() for each term in \ref firstOrderGrdPsi and adds the results to Lb. /// Calls getLb() for each term in \ref firstOrderGrdPsi and adds the
/// results to Lb.
void getLbGrdPsi(const ElInfo *elInfo, void getLbGrdPsi(const ElInfo *elInfo,
std::vector<mtl::dense_vector<double> >& Lb) const std::vector<mtl::dense_vector<double> >& Lb) const
{ {
...@@ -270,7 +271,8 @@ namespace AMDiS { ...@@ -270,7 +271,8 @@ namespace AMDiS {
static_cast<FirstOrderTerm*>(*termIt)->getLb(elInfo, Lb); static_cast<FirstOrderTerm*>(*termIt)->getLb(elInfo, Lb);
} }
/// Calls getLb() for each term in \ref firstOrderGrdPhi and adds the results to Lb. /// Calls getLb() for each term in \ref firstOrderGrdPhi and adds the
/// results to Lb.
void getLbGrdPhi(const ElInfo *elInfo, void getLbGrdPhi(const ElInfo *elInfo,
std::vector<mtl::dense_vector<double> >& Lb) const std::vector<mtl::dense_vector<double> >& Lb) const
{ {
...@@ -293,13 +295,15 @@ namespace AMDiS { ...@@ -293,13 +295,15 @@ namespace AMDiS {
return secondOrder.size() != 0; return secondOrder.size() != 0;
} }
/// Returns true, if there are first order terms (grdPsi). Returns false otherwise. /// Returns true, if there are first order terms (grdPsi). Returns
/// false otherwise.
inline bool firstOrderTermsGrdPsi() inline bool firstOrderTermsGrdPsi()
{ {
return firstOrderGrdPsi.size() != 0; return firstOrderGrdPsi.size() != 0;
} }
/// Returns true, if there are first order terms (grdPhi). Returns false otherwise. /// Returns true, if there are first order terms (grdPhi). Returns
/// false otherwise.
inline bool firstOrderTermsGrdPhi() inline bool firstOrderTermsGrdPhi()
{ {
return firstOrderGrdPhi.size() != 0; return firstOrderGrdPhi.size() != 0;
...@@ -340,11 +344,9 @@ namespace AMDiS { ...@@ -340,11 +344,9 @@ namespace AMDiS {
/// If true, the operator needs a dual traverse over two meshes for assembling. /// If true, the operator needs a dual traverse over two meshes for assembling.
bool needDualTraverse; bool needDualTraverse;
/** \brief /// Calculates the element matrix and/or the element vector. It is
* Calculates the element matrix and/or the element vector. It is /// created especially for this Operator, when \ref getElementMatrix()
* created especially for this Operator, when \ref getElementMatrix() /// or \ref getElementVector is called for the first time.
* or \ref getElementVector is called for the first time.
*/
Assembler* assembler; Assembler* assembler;
/// List of all second order terms /// List of all second order terms
...@@ -359,10 +361,9 @@ namespace AMDiS { ...@@ -359,10 +361,9 @@ namespace AMDiS {
/// List of all zero order terms /// List of all zero order terms
vector<OperatorTerm*> zeroOrder; vector<OperatorTerm*> zeroOrder;
/** \brief /// Pointer to the solution of the last timestep. Can be used for a more
* Pointer to the solution of the last timestep. Can be used for a more efficient /// efficient assemblage of the element vector when the element matrix
* assemblage of the element vector when the element matrix was already computed. /// was already computed.
*/
const DOFVectorBase<double> *uhOld; const DOFVectorBase<double> *uhOld;
/// Spezifies whether optimized assemblers are used or not. /// Spezifies whether optimized assemblers are used or not.
......
...@@ -95,6 +95,8 @@ namespace AMDiS { ...@@ -95,6 +95,8 @@ namespace AMDiS {
for (int i = 0; i < nComponents; i++) for (int i = 0; i < nComponents; i++)
Parameters::get(name + "->name[" + lexical_cast<string>(i) + "]", Parameters::get(name + "->name[" + lexical_cast<string>(i) + "]",
componentNames[i]); componentNames[i]);
Parameters::get("debug->write asm info", writeAsmInfo);
} }
void ProblemStatSeq::initialize(Flag initFlag, void ProblemStatSeq::initialize(Flag initFlag,
...@@ -757,26 +759,28 @@ namespace AMDiS { ...@@ -757,26 +759,28 @@ namespace AMDiS {
// Used to calculate the overall number of non zero entries. // Used to calculate the overall number of non zero entries.
int nnz = 0; int nnz = 0;
for (int i = 0; i < nComponents; i++) { for (int rowComponent = 0; rowComponent < nComponents; rowComponent++) {
MSG("%d DOFs for %s\n", MSG("%d DOFs for %s\n",
componentSpaces[i]->getAdmin()->getUsedDofs(), componentSpaces[rowComponent]->getAdmin()->getUsedDofs(),
componentSpaces[i]->getName().c_str()); componentSpaces[rowComponent]->getName().c_str());
rhs->getDOFVector(i)->set(0.0); rhs->getDOFVector(rowComponent)->set(0.0);
for (int j = 0; j < nComponents; j++) { for (int colComponent = 0; colComponent < nComponents; colComponent++) {
if (writeAsmInfo) if (writeAsmInfo)
MSG("--------- %d %d -------------\n", i, j); MSG("--------- %d %d -------------\n", rowComponent, colComponent);
// Only if this variable is true, the current matrix will be assembled. // Only if this variable is true, the current matrix will be assembled.
bool assembleMatrix = true; bool assembleMatrix = true;
// The DOFMatrix which should be assembled (or not, if assembleMatrix // The DOFMatrix which should be assembled (or not, if assembleMatrix
// will be set to false). // will be set to false).
DOFMatrix *matrix = (asmMatrix ? (*systemMatrix)[i][j] : NULL); DOFMatrix *matrix =
(asmMatrix ? (*systemMatrix)[rowComponent][colComponent] : NULL);
if (writeAsmInfo && matrix) { if (writeAsmInfo && matrix) {
MSG(" -> matrix has %d operators\n", matrix->getOperators().size());
for (vector<Operator*>::iterator it = matrix->getOperatorsBegin(); for (vector<Operator*>::iterator it = matrix->getOperatorsBegin();
it != matrix->getOperatorsEnd(); ++it) { it != matrix->getOperatorsEnd(); ++it) {
Assembler *assembler = (*it)->getAssembler(); Assembler *assembler = (*it)->getAssembler();
...@@ -796,12 +800,13 @@ namespace AMDiS { ...@@ -796,12 +800,13 @@ namespace AMDiS {
// If the matrix was assembled before and it is marked to be assembled // If the matrix was assembled before and it is marked to be assembled
// only once, it will not be assembled. // only once, it will not be assembled.
if (assembleMatrixOnlyOnce[i][j] && assembledMatrix[i][j]) { if (assembleMatrixOnlyOnce[rowComponent][colComponent] &&
assembledMatrix[rowComponent][colComponent]) {
assembleMatrix = false; assembleMatrix = false;
} else if (matrix) { } else if (matrix) {
matrix->getBaseMatrix(). matrix->getBaseMatrix().
change_dim(componentSpaces[i]->getAdmin()->getUsedSize(), change_dim(componentSpaces[rowComponent]->getAdmin()->getUsedSize(),
componentSpaces[j]->getAdmin()->getUsedSize()); componentSpaces[colComponent]->getAdmin()->getUsedSize());
set_to_zero(matrix->getBaseMatrix()); set_to_zero(matrix->getBaseMatrix());
} }
...@@ -813,7 +818,7 @@ namespace AMDiS { ...@@ -813,7 +818,7 @@ namespace AMDiS {
// If the matrix should not be assembled, the rhs vector has to be considered. // If the matrix should not be assembled, the rhs vector has to be considered.
// This will be only done, if i == j. So, if both is not true, we can jump // This will be only done, if i == j. So, if both is not true, we can jump
// to the next matrix. // to the next matrix.
if (!assembleMatrix && i != j) { if (!assembleMatrix && rowComponent != colComponent) {
if (matrix) if (matrix)
nnz += matrix->getBaseMatrix().nnz(); nnz += matrix->getBaseMatrix().nnz();
...@@ -825,12 +830,14 @@ namespace AMDiS { ...@@ -825,12 +830,14 @@ namespace AMDiS {
// The simplest case: either the right hand side has no operaters, no aux // The simplest case: either the right hand side has no operaters, no aux
// fe spaces, or all aux fe spaces are equal to the row and col fe space. // fe spaces, or all aux fe spaces are equal to the row and col fe space.
assembleOnOneMesh(componentSpaces[i], assembleOnOneMesh(componentSpaces[rowComponent],
assembleFlag, assembleFlag,
assembleMatrix ? matrix : NULL, assembleMatrix ? matrix : NULL,
((i == j) && asmVector) ? rhs->getDOFVector(i) : NULL); ((rowComponent == colComponent) && asmVector) ?
rhs->getDOFVector(rowComponent) :
NULL);
assembledMatrix[i][j] = true; assembledMatrix[rowComponent][colComponent] = true;
if (assembleMatrix) if (assembleMatrix)
matrix->finishInsertion(); matrix->finishInsertion();
...@@ -840,14 +847,13 @@ namespace AMDiS { ...@@ -840,14 +847,13 @@ namespace AMDiS {
if (matrix) if (matrix)
nnz += matrix->getBaseMatrix().nnz(); nnz += matrix->getBaseMatrix().nnz();
} }
// And now assemble boundary conditions on the vectors // And now assemble boundary conditions on the vectors
assembleBoundaryConditions(rhs->getDOFVector(i), assembleBoundaryConditions(rhs->getDOFVector(rowComponent),
solution->getDOFVector(i), solution->getDOFVector(rowComponent),
componentMeshes[i], componentMeshes[rowComponent],
assembleFlag); assembleFlag);
} }
...@@ -1671,11 +1677,10 @@ namespace AMDiS { ...@@ -1671,11 +1677,10 @@ namespace AMDiS {
// == Finally, if we have assembled in parallel, we have to add the thread == // == Finally, if we have assembled in parallel, we have to add the thread ==
// == private matrix and vector to the global one. == // == private matrix and vector to the global one. ==
if (matrix) if (matrix) {
matrix->clearDirichletRows(); matrix->clearDirichletRows();
if (matrix)
matrix->finishAssembling(); matrix->finishAssembling();
}
if (vector) if (vector)
vector->finishAssembling(); vector->finishAssembling();
......
...@@ -186,6 +186,7 @@ namespace AMDiS { ...@@ -186,6 +186,7 @@ namespace AMDiS {
int nRankCoarseRows = cMap->getRankDofs(); int nRankCoarseRows = cMap->getRankDofs();
int nOverallCoarseRows = cMap->getOverallDofs(); int nOverallCoarseRows = cMap->getOverallDofs();
MSG("COARSE MAT %d SIZE %d %d\n", i + 1, nOverallCoarseRows, nOverallCoarseRows);
MatCreateAIJ(mpiCommGlobal, MatCreateAIJ(mpiCommGlobal,
nRankCoarseRows, nRankCoarseRows, nRankCoarseRows, nRankCoarseRows,
nOverallCoarseRows, nOverallCoarseRows, nOverallCoarseRows, nOverallCoarseRows,
...@@ -211,15 +212,16 @@ namespace AMDiS { ...@@ -211,15 +212,16 @@ namespace AMDiS {
int nColsRankMat = (j == 0 ? nRankInteriorRows : uniqueCoarseMap[j - 1]->getRankDofs()); int nColsRankMat = (j == 0 ? nRankInteriorRows : uniqueCoarseMap[j - 1]->getRankDofs());
int nColsOverallMat = (j == 0 ? nOverallInteriorRows : uniqueCoarseMap[j - 1]->getOverallDofs()); int nColsOverallMat = (j == 0 ? nOverallInteriorRows : uniqueCoarseMap[j - 1]->getOverallDofs());
MSG("COARSE MAT %d %d SIZE %d %d\n", i, j, nRowsOverallMat, nColsOverallMat);
MatCreateAIJ(mpiCommGlobal, MatCreateAIJ(mpiCommGlobal,
nRowsRankMat, nColsRankMat, nRowsRankMat, nColsRankMat,
nRowsOverallMat, nColsOverallMat, nRowsOverallMat, nColsOverallMat,
0, nnz[i][j].dnnz, 0, nnz[i][j].onnz, 0, nnz[i][j].dnnz, 0, nnz[i][j].onnz,
&mat[i][j]); &mat[i][j]);
MSG("REMOVE THIS!\n"); MSG("REMOVE THIS!\n");
MatSetOption(mat[i][j], MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE); MatSetOption(mat[i][j], MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE);
MSG("COARSE MAT %d %d SIZE %d %d\n", j, i, nRowsOverallMat, nColsOverallMat);
MatCreateAIJ(mpiCommGlobal, MatCreateAIJ(mpiCommGlobal,
nColsRankMat, nRowsRankMat, nColsRankMat, nRowsRankMat,
nColsOverallMat, nRowsOverallMat, nColsOverallMat, nRowsOverallMat,
......
...@@ -132,10 +132,11 @@ namespace AMDiS { ...@@ -132,10 +132,11 @@ namespace AMDiS {
} }
/// Get the coarse space matrix of some system component. /// Get the coarse space matrix of some system component.
inline Mat& getMatCoarseByComponent(int comp) inline Mat& getMatCoarseByComponent(int rowComp, int colComp = -1)
{ {
int matIndex = componentIthCoarseMap[comp] + 1; int rowMatIndex = componentIthCoarseMap[rowComp] + 1;
return mat[matIndex][matIndex]; int colMatIndex = componentIthCoarseMap[(colComp == -1 ? rowComp : colComp)] + 1;
return mat[rowMatIndex][colMatIndex];
} }
/// Get coupling matrix of the interior and the coarse space of a /// Get coupling matrix of the interior and the coarse space of a
......
...@@ -300,7 +300,6 @@ namespace AMDiS { ...@@ -300,7 +300,6 @@ namespace AMDiS {
if (fullInterface != NULL) if (fullInterface != NULL)
interfaceDofMap.init(levelData, feSpaces, uniqueFe); interfaceDofMap.init(levelData, feSpaces, uniqueFe);
// interfaceDofMap.init(levelData, fullInterface);
if (fetiPreconditioner != FETI_NONE) { if (fetiPreconditioner != FETI_NONE) {
TEST_EXIT(meshLevel == 0) TEST_EXIT(meshLevel == 0)
...@@ -531,10 +530,13 @@ namespace AMDiS { ...@@ -531,10 +530,13 @@ namespace AMDiS {
for (DofContainer::iterator it = allBoundaryDofs.begin(); for (DofContainer::iterator it = allBoundaryDofs.begin();
it != allBoundaryDofs.end(); ++it) it != allBoundaryDofs.end(); ++it)
if (meshDistributor->getDofMap()[feSpace].isRankDof(**it)) if (meshDistributor->getDofMap()[feSpace].isRankDof(**it)) {
MSG("INSERT INTERFACE RANK DOF %d\n", **it);
interfaceDofMap[feSpace].insertRankDof(**it); interfaceDofMap[feSpace].insertRankDof(**it);
else } else {
MSG("INSERT INTERFACE NON-RANK DOF %d\n", **it);
interfaceDofMap[feSpace].insertNonRankDof(**it); interfaceDofMap[feSpace].insertNonRankDof(**it);
}
} }
...@@ -691,18 +693,10 @@ namespace AMDiS { ...@@ -691,18 +693,10 @@ namespace AMDiS {
int nLocalInterior = 0; int nLocalInterior = 0;
for (int i = 0; i < admin->getUsedSize(); i++) { for (int i = 0; i < admin->getUsedSize(); i++) {
if (i == 0) {
MSG("JETZT: %d %d %d %d\n", admin->isDofFree(i), isPrimal(feSpace, i), isDual(feSpace, i), isInterface(feSpace, i));
}
if (admin->isDofFree(i) == false && if (admin->isDofFree(i) == false &&
isPrimal(feSpace, i) == false && isPrimal(feSpace, i) == false &&
isDual(feSpace, i) == false && isDual(feSpace, i) == false &&
isInterface(feSpace, i) == false) { isInterface(feSpace, i) == false) {
if (i == 0) {
MSG("DRIN\n");
}
if (meshLevel == 0) { if (meshLevel == 0) {
localDofMap[feSpace].insertRankDof(i, nLocalInterior); localDofMap[feSpace].insertRankDof(i, nLocalInterior);
......
...@@ -136,6 +136,8 @@ namespace AMDiS { ...@@ -136,6 +136,8 @@ namespace AMDiS {
if (!dofMat) if (!dofMat)
continue; continue;
MSG("=============== COMP %d %d ================= \n", rowComponent, colComponent);
ParallelDofMapping *rowCoarseSpace = coarseSpaceMap[rowComponent]; ParallelDofMapping *rowCoarseSpace = coarseSpaceMap[rowComponent];
ParallelDofMapping *colCoarseSpace = coarseSpaceMap[colComponent]; ParallelDofMapping *colCoarseSpace = coarseSpaceMap[colComponent];
...@@ -161,6 +163,10 @@ namespace AMDiS { ...@@ -161,6 +163,10 @@ namespace AMDiS {
bool isColCoarse = bool isColCoarse =
isCoarseSpace(colComponent, feSpaces[colComponent], col(*icursor)); isCoarseSpace(colComponent, feSpaces[colComponent], col(*icursor));
if (colComponent == 2 && col(*icursor) == 19) {
MSG("HERE WE TEST: %d %d\n", isColCoarse, isRowCoarse);
}
if (isColCoarse) { if (isColCoarse) {
if (isRowCoarse) { if (isRowCoarse) {
cols.push_back(col(*icursor)); cols.push_back(col(*icursor));
...@@ -184,21 +190,26 @@ namespace AMDiS { ...@@ -184,21 +190,26 @@ namespace AMDiS {
// === Set matrix values. === // === Set matrix values. ===
if (isRowCoarse) { if (isRowCoarse) {
MSG("A-GET MAT INDEX %d\n", rowComponent);
int rowIndex = rowCoarseSpace->getMatIndex(rowComponent, *cursor); int rowIndex = rowCoarseSpace->getMatIndex(rowComponent, *cursor);
MSG("B-GET MAT INDEX %d\n", colComponent);
for (unsigned int i = 0; i < cols.size(); i++) for (unsigned int i = 0; i < cols.size(); i++)
cols[i] = colCoarseSpace->getMatIndex(colComponent, cols[i]); cols[i] = colCoarseSpace->getMatIndex(colComponent, cols[i]);
// matCoarseCoarse // matCoarseCoarse
MatSetValues(getMatCoarseByComponent(rowComponent), //MSG("SET COARSE MAT COMP %d %d WITH %d entry\n", rowComponent, colComponent, cols.size());
MatSetValues(getMatCoarseByComponent(rowComponent, colComponent),
1, &rowIndex, cols.size(), 1, &rowIndex, cols.size(),
&(cols[0]), &(values[0]), ADD_VALUES); &(cols[0]), &(values[0]), ADD_VALUES);
if (colsOther.size()) { if (colsOther.size()) {
if (subdomainLevel == 0) { if (subdomainLevel == 0) {
MSG("C0-GET MAT INDEX %d\n", colComponent);
for (unsigned int i = 0; i < colsOther.size(); i++) for (unsigned int i = 0; i < colsOther.size(); i++)
colsOther[i] = colsOther[i] =
interiorMap->getMatIndex(colComponent, colsOther[i]); interiorMap->getMatIndex(colComponent, colsOther[i]);
} else { } else {
MSG("C1-GET MAT INDEX %d\n", colComponent);
for (unsigned int i = 0; i < colsOther.size(); i++) for (unsigned int i = 0; i < colsOther.size(); i++)
colsOther[i] = colsOther[i] =
interiorMap->getMatIndex(colComponent, colsOther[i]) + interiorMap->getMatIndex(colComponent, colsOther[i]) +
...@@ -206,38 +217,45 @@ namespace AMDiS { ...@@ -206,38 +217,45 @@ namespace AMDiS {
} }
// matCoarseInt // matCoarseInt
// MSG("SET COARSE-INT MAT COMP %d %d WITH %d entry\n", rowComponent, colComponent, cols.size());
MatSetValues(getMatCoarseInteriorByComponent(rowComponent), MatSetValues(getMatCoarseInteriorByComponent(rowComponent),
1, &rowIndex, colsOther.size(), 1, &rowIndex, colsOther.size(),
&(colsOther[0]), &(valuesOther[0]), ADD_VALUES); &(colsOther[0]), &(valuesOther[0]), ADD_VALUES);
} }
} else { } else {
MSG("D-GET MAT INDEX %d\n", rowComponent);
int localRowIndex = int localRowIndex =
(subdomainLevel == 0 ? (subdomainLevel == 0 ?
interiorMap->getLocalMatIndex(rowComponent, *cursor) : interiorMap->getLocalMatIndex(rowComponent, *cursor) :
interiorMap->getMatIndex(rowComponent, *cursor)); interiorMap->getMatIndex(rowComponent, *cursor));
MSG("E-GET MAT INDEX %d\n", colComponent);
for (unsigned int i = 0; i < cols.size(); i++) { for (unsigned int i = 0; i < cols.size(); i++) {
if (subdomainLevel == 0) if (subdomainLevel == 0)
cols[i] = interiorMap->getLocalMatIndex(colComponent, cols[i]); cols[i] = interiorMap->getLocalMatIndex(colComponent, cols[i]);
else else
cols[i] = interiorMap->getMatIndex(colComponent, cols[i]); cols[i] = interiorMap->getMatIndex(colComponent, cols[i]);
} }
MSG("DONE\n");
MatSetValues(getMatInterior(), 1, &localRowIndex, cols.size(), MatSetValues(getMatInterior(), 1, &localRowIndex, cols.size(),
&(cols[0]), &(values[0]), ADD_VALUES); &(cols[0]), &(values[0]), ADD_VALUES);
if (colsOther.size()) { if (colsOther.size()) {
MSG("F-GET MAT INDEX %d\n", colComponent);
int globalRowIndex = interiorMap->getMatIndex(rowComponent, *cursor); int globalRowIndex = interiorMap->getMatIndex(rowComponent, *cursor);
if (subdomainLevel != 0) if (subdomainLevel != 0)
globalRowIndex += rStartInterior; globalRowIndex += rStartInterior;
MSG("G-GET MAT INDEX %d\n", colComponent);
for (unsigned int i = 0; i < colsOther.size(); i++) for (unsigned int i = 0; i < colsOther.size(); i++)
colsOther[i] = colsOther[i] =
colCoarseSpace->getMatIndex(colComponent, colsOther[i]); colCoarseSpace->getMatIndex(colComponent, colsOther[i]);
// matIntCoarse // matIntCoarse
MatSetValues(getMatInteriorCoarseByComponent(rowComponent), // MSG("SET INT-COARSE MAT COMP %d %d WITH %d entry\n", rowComponent, colComponent, cols.size());
MatSetValues(getMatInteriorCoarseByComponent(colComponent),
1, &globalRowIndex, colsOther.size(), 1, &globalRowIndex, colsOther.size(),
&(colsOther[0]), &(valuesOther[0]), ADD_VALUES); &(colsOther[0]), &(valuesOther[0]), ADD_VALUES);
} }
......
Markdown is supported
0% or .