escript
Revision_
|
00001 00002 /***************************************************************************** 00003 * 00004 * Copyright (c) 2003-2014 by University of Queensland 00005 * http://www.uq.edu.au 00006 * 00007 * Primary Business: Queensland, Australia 00008 * Licensed under the Open Software License version 3.0 00009 * http://www.opensource.org/licenses/osl-3.0.php 00010 * 00011 * Development until 2012 by Earth Systems Science Computational Center (ESSCC) 00012 * Development 2012-2013 by School of Earth Sciences 00013 * Development from 2014 by Centre for Geoscience Computing (GeoComp) 00014 * 00015 *****************************************************************************/ 00016 00017 00018 /****************************************************************************/ 00019 00020 /* Paso: system matrix pattern */ 00021 00022 /****************************************************************************/ 00023 00024 /* Copyrights by ACcESS Australia 2004,2005 */ 00025 /* Author: Lutz Gross, l.gross@uq.edu.au */ 00026 00027 /****************************************************************************/ 00028 00029 #ifndef __PASO_SYSTEMMATRIXPATTERN_H__ 00030 #define __PASO_SYSTEMMATRIXPATTERN_H__ 00031 00032 #include "Distribution.h" 00033 #include "Pattern.h" 00034 #include "Coupler.h" 00035 00036 namespace paso { 00037 00038 struct SystemMatrixPattern; 00039 typedef boost::shared_ptr<SystemMatrixPattern> SystemMatrixPattern_ptr; 00040 typedef boost::shared_ptr<const SystemMatrixPattern> const_SystemMatrixPattern_ptr; 00041 00042 PASO_DLL_API 00043 struct SystemMatrixPattern : boost::enable_shared_from_this<SystemMatrixPattern> 00044 { 00045 // constructor 00046 SystemMatrixPattern(int type, Distribution_ptr output_distribution, 00047 Distribution_ptr input_distribution, Pattern_ptr mainPattern, 00048 Pattern_ptr col_couplePattern, Pattern_ptr row_couplePattern, 00049 Connector_ptr col_connector, Connector_ptr row_connector); 00050 00051 ~SystemMatrixPattern() 00052 { 00053 Esys_MPIInfo_free(mpi_info); 00054 } 00055 00056 inline index_t getNumOutput() const { 00057 return mainPattern->numOutput; 00058 } 00059 00060 SystemMatrixPattern_ptr unrollBlocks(int type, dim_t output_block_size, 00061 dim_t input_block_size); 00062 00063 int type; 00064 Esys_MPIInfo* mpi_info; 00065 Pattern_ptr mainPattern; 00066 Pattern_ptr col_couplePattern; 00067 Pattern_ptr row_couplePattern; 00068 Connector_ptr col_connector; 00069 Connector_ptr row_connector; 00070 Distribution_ptr output_distribution; 00071 Distribution_ptr input_distribution; 00072 }; 00073 00074 00075 } // namespace paso 00076 00077 #endif // __PASO_SYSTEMMATRIXPATTERN_H__ 00078