~vcs-imports/escript-finley/trunk

« back to all changes in this revision

Viewing changes to paso/src/SystemMatrixPattern.c

  • Committer: jfenwick
  • Date: 2010-10-11 01:48:14 UTC
  • Revision ID: svn-v4:77569008-7704-0410-b7a0-a92fef0b09fd:trunk:3259
Merging dudley and scons updates from branches

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
                                                         Paso_Connector* row_connector) 
40
40
{
41
41
  Paso_SystemMatrixPattern*out=NULL;
42
 
  Paso_resetError();
 
42
  Esys_resetError();
43
43
 
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.");
46
46
     return NULL;
47
47
  }
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.");
50
50
     return NULL;
51
51
  }
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.");
54
54
     return NULL;
55
55
  }
56
56
 
57
57
 
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.");
60
60
  }
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.");
63
63
  }
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.");
66
66
  }
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.");
69
69
  }
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.");
72
72
  }
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.");
75
75
  }
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.");
78
78
  }
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.");
81
81
  }
82
82
 
83
83
  out=MEMALLOC(1,Paso_SystemMatrixPattern);
84
 
  if (Paso_checkPtr(out)) return NULL;
 
84
  if (Esys_checkPtr(out)) return NULL;
85
85
  out->type=type;
86
86
  out->reference_counter=1;
87
87
  out->mainPattern=Paso_Pattern_getReference(mainPattern);
91
91
  out->col_connector=Paso_Connector_getReference(col_connector);
92
92
  out->output_distribution=Paso_Distribution_getReference(output_distribution);
93
93
  out->input_distribution=Paso_Distribution_getReference(input_distribution);
94
 
  out->mpi_info= Paso_MPIInfo_getReference(output_distribution->mpi_info);
 
94
  out->mpi_info= Esys_MPIInfo_getReference(output_distribution->mpi_info);
95
95
  #ifdef Paso_TRACE
96
96
  printf("Paso_SystemMatrixPattern_dealloc: system matrix pattern as been allocated.\n");
97
97
  #endif
120
120
        Paso_Connector_free(in->col_connector);
121
121
        Paso_Distribution_free(in->output_distribution);
122
122
        Paso_Distribution_free(in->input_distribution);
123
 
        Paso_MPIInfo_free(in->mpi_info);
 
123
        Esys_MPIInfo_free(in->mpi_info);
124
124
        MEMFREE(in);
125
125
        #ifdef Paso_TRACE
126
126
        printf("Paso_SystemMatrixPattern_free: system matrix pattern as been deallocated.\n");