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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1388 - (show annotations)
Fri Jan 11 07:45:58 2008 UTC (11 years, 7 months ago) by trankine
File MIME type: text/plain
File size: 2780 byte(s)
And get the *(&(*&(* name right
1
2 /* $Id$ */
3
4 /*******************************************************
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
16 /**************************************************************/
17
18 /* Paso: SystemMatrixPattern_unrollBlocks */
19
20 /**************************************************************/
21
22 /* Author: gross@access.edu.au */
23
24 /**************************************************************/
25
26 #include "SystemMatrixPattern.h"
27
28 /**************************************************************/
29
30 /* creates SystemMatrixPattern */
31
32 Paso_SystemMatrixPattern* Paso_SystemMatrixPattern_unrollBlocks(Paso_SystemMatrixPattern* pattern,
33 int type, dim_t output_block_size,dim_t input_block_size) {
34 Paso_SystemMatrixPattern*out=NULL;
35 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 }
56 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
62 if (Paso_noError()) {
63 return out;
64 } else {
65 Paso_SystemMatrixPattern_free(out);
66 return NULL;
67 }
68 }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26