/[escript]/trunk/paso/src/SystemMatrixPattern_unrollBlocks.c
ViewVC logotype

Annotation of /trunk/paso/src/SystemMatrixPattern_unrollBlocks.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1312 - (hide annotations)
Mon Sep 24 06:18:44 2007 UTC (12 years, 2 months ago) by ksteube
File MIME type: text/plain
File size: 2780 byte(s)
The MPI branch is hereby closed. All future work should be in trunk.

Previously in revision 1295 I merged the latest changes to trunk into trunk-mpi-branch.
In this revision I copied all files from trunk-mpi-branch over the corresponding
trunk files. I did not use 'svn merge', it was a copy.

1 ksteube 1312
2 jgs 150 /* $Id$ */
3    
4 ksteube 1312 /*******************************************************
5     *
6     * Copyright 2003-2007 by ACceSS MNRF
7     * Copyright 2007 by University of Queensland
8     *
9     * http://esscc.uq.edu.au
10     * Primary Business: Queensland, Australia
11     * Licensed under the Open Software License version 3.0
12     * http://www.opensource.org/licenses/osl-3.0.php
13     *
14     *******************************************************/
15 dhawcroft 631
16 jgs 150 /**************************************************************/
17    
18 ksteube 1312 /* Paso: SystemMatrixPattern_unrollBlocks */
19 jgs 150
20     /**************************************************************/
21    
22     /* Author: gross@access.edu.au */
23    
24     /**************************************************************/
25    
26     #include "SystemMatrixPattern.h"
27    
28     /**************************************************************/
29    
30     /* creates SystemMatrixPattern */
31    
32 ksteube 1312 Paso_SystemMatrixPattern* Paso_SystemMatrixPattern_unrollBlocks(Paso_SystemMatrixPattern* pattern,
33     int type, dim_t output_block_size,dim_t input_block_size) {
34 gross 1028 Paso_SystemMatrixPattern*out=NULL;
35 ksteube 1312 Paso_Pattern *new_mainPattern=NULL, *new_couplePattern=NULL;
36     Paso_Distribution* new_output_distribution=NULL, *new_input_distribution=NULL;
37     Paso_Coupler *new_coupler=NULL;
38    
39     new_mainPattern=Paso_Pattern_unrollBlocks(pattern->mainPattern,type,output_block_size,input_block_size);
40     new_couplePattern=Paso_Pattern_unrollBlocks(pattern->couplePattern,type,output_block_size,input_block_size);
41     new_output_distribution=Paso_Distribution_alloc(pattern->output_distribution->mpi_info,
42     pattern->output_distribution->first_component,
43     output_block_size,0);
44     new_input_distribution=Paso_Distribution_alloc(pattern->input_distribution->mpi_info,
45     pattern->input_distribution->first_component,
46     input_block_size,0);
47     new_coupler=Paso_Coupler_unroll(pattern->coupler,input_block_size);
48     if (Paso_noError()) {
49     out=Paso_SystemMatrixPattern_alloc(type,
50     new_output_distribution,
51     new_input_distribution,
52     new_mainPattern,
53     new_couplePattern,
54     new_coupler);
55 gross 415 }
56 ksteube 1312 Paso_Pattern_free(new_mainPattern);
57     Paso_Pattern_free(new_couplePattern);
58     Paso_Distribution_free(new_output_distribution);
59     Paso_Distribution_free(new_input_distribution);
60     Paso_Coupler_free(new_coupler);
61 jgs 150
62 ksteube 1312 if (Paso_noError()) {
63     return out;
64     } else {
65     Paso_SystemMatrixPattern_free(out);
66     return NULL;
67 jgs 150 }
68     }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26