39
39
Paso_Connector* row_connector)
41
41
Paso_SystemMatrixPattern*out=NULL;
44
44
if (output_distribution->mpi_info != input_distribution->mpi_info ) {
45
Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrixPattern_alloc: output_distribution and input_distribution mpi communicator don't match.");
45
Esys_setError(SYSTEM_ERROR,"Paso_SystemMatrixPattern_alloc: output_distribution and input_distribution mpi communicator don't match.");
48
48
if (output_distribution->mpi_info != col_connector->mpi_info ) {
49
Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrixPattern_alloc: output_distribution and col_connector mpi communicator don't match.");
49
Esys_setError(SYSTEM_ERROR,"Paso_SystemMatrixPattern_alloc: output_distribution and col_connector mpi communicator don't match.");
52
52
if (output_distribution->mpi_info != row_connector->mpi_info ) {
53
Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrixPattern_alloc: output_distribution and row_connector mpi communicator don't match.");
53
Esys_setError(SYSTEM_ERROR,"Paso_SystemMatrixPattern_alloc: output_distribution and row_connector mpi communicator don't match.");
58
58
if (mainPattern->type != type) {
59
Paso_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: type of mainPattern does not match expected type.");
59
Esys_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: type of mainPattern does not match expected type.");
61
61
if (col_couplePattern->type != type) {
62
Paso_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: type of col_couplePattern does not match expected type.");
62
Esys_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: type of col_couplePattern does not match expected type.");
64
64
if (row_couplePattern->type != type) {
65
Paso_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: type of row_couplePattern does not match expected type.");
65
Esys_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: type of row_couplePattern does not match expected type.");
67
67
if (col_couplePattern->numOutput != mainPattern->numOutput) {
68
Paso_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: number of output for couple and main pattern don't match.");
68
Esys_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: number of output for couple and main pattern don't match.");
70
70
if (mainPattern->numOutput != Paso_Distribution_getMyNumComponents(output_distribution)) {
71
Paso_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: number of output and given distribution don't match.");
71
Esys_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: number of output and given distribution don't match.");
73
73
if (mainPattern->numInput != Paso_Distribution_getMyNumComponents(input_distribution)) {
74
Paso_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: number of input for main pattern and number of send components in connector don't match.");
74
Esys_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: number of input for main pattern and number of send components in connector don't match.");
76
76
if (col_couplePattern->numInput != col_connector->recv->numSharedComponents) {
77
Paso_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: number of inputs for column couple pattern and number of received components in connector don't match.");
77
Esys_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: number of inputs for column couple pattern and number of received components in connector don't match.");
79
79
if (row_couplePattern->numOutput != row_connector->recv->numSharedComponents) {
80
Paso_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: number of inputs for row couple pattern and number of received components in connector don't match.");
80
Esys_setError(VALUE_ERROR,"Paso_SystemMatrixPattern_alloc: number of inputs for row couple pattern and number of received components in connector don't match.");
83
83
out=MEMALLOC(1,Paso_SystemMatrixPattern);
84
if (Paso_checkPtr(out)) return NULL;
84
if (Esys_checkPtr(out)) return NULL;
86
86
out->reference_counter=1;
87
87
out->mainPattern=Paso_Pattern_getReference(mainPattern);