:orphan:
# MatTransColoringApplyDenToSp
Given a symbolic matrix product Csp=A*B^T for which a `MatTransposeColoring` context has been created and a dense matrix Cden=A*Btdense in which Btdens is obtained from `MatTransColoringApplySpToDen()`, recover sparse matrix `Csp` from `Cden`. 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatTransColoringApplyDenToSp(MatTransposeColoring matcoloring, Mat Cden, Mat Csp)
```
Collective


## Input Parameters

- ***matcoloring -*** coloring context created with `MatTransposeColoringCreate()`
- ***Cden -*** matrix product of a sparse matrix and a dense matrix Btdense



## Output Parameter

- ***Csp -*** sparse matrix





## Note
These are used internally for some implementations of `MatRARt()`


## See Also
 [](ch_matrices), `Mat`, `MatTransposeColoringCreate()`, `MatTransposeColoringDestroy()`, `MatTransColoringApplySpToDen()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/interface/matrix.c.html#MatTransColoringApplyDenToSp">src/mat/interface/matrix.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/aij/seq/matmatmult.c.html#MatTransColoringApplyDenToSp_SeqAIJ">MatTransColoringApplyDenToSp_SeqAIJ in src/mat/impls/aij/seq/matmatmult.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/interface/matrix.c)


[Index of all Mat routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
