5#ifndef DUNE_ISTL_MATRIXMARKET_HH
6#define DUNE_ISTL_MATRIXMARKET_HH
24#include <dune/common/exceptions.hh>
25#include <dune/common/fmatrix.hh>
26#include <dune/common/fvector.hh>
27#include <dune/common/gmpfield.hh>
28#include <dune/common/hybridutilities.hh>
29#include <dune/common/quadmath.hh>
30#include <dune/common/stdstreams.hh>
31#include <dune/common/simd/simd.hh>
86 static std::string
str()
141 template<
unsigned int precision>
142 struct mm_numeric_type<
Dune::GMPField<precision>>
151 static std::string
str()
169 static std::string
str()
219 template<
typename T,
typename A>
224 os<<
"%%MatrixMarket matrix coordinate ";
225 os<<mm_numeric_type<Simd::Scalar<typename Imp::BlockTraits<T>::field_type>>::str()<<
" general"<<std::endl;
229 template<
typename B,
typename A>
234 os<<
"%%MatrixMarket matrix array ";
235 os<<mm_numeric_type<Simd::Scalar<typename Imp::BlockTraits<B>::field_type>>::str()<<
" general"<<std::endl;
239 template<
typename T,
int j>
244 os<<
"%%MatrixMarket matrix array ";
245 os<<mm_numeric_type<T>::str()<<
" general"<<std::endl;
249 template<
typename T,
int i,
int j>
254 os<<
"%%MatrixMarket matrix array ";
255 os<<mm_numeric_type<T>::str()<<
" general"<<std::endl;
270 template<
typename T,
typename A>
274 static_assert(IsNumber<T>::value,
"Only scalar entries are expected here!");
276 static void print(std::ostream& os,
const M&)
278 os<<
"% ISTL_STRUCT blocked ";
279 os<<
"1 1"<<std::endl;
283 template<
typename T,
typename A,
int i>
288 static void print(std::ostream& os,
const M&)
290 os<<
"% ISTL_STRUCT blocked ";
291 os<<i<<
" "<<1<<std::endl;
295 template<
typename T,
typename A>
299 static_assert(IsNumber<T>::value,
"Only scalar entries are expected here!");
301 static void print(std::ostream& os,
const M&)
303 os<<
"% ISTL_STRUCT blocked ";
304 os<<
"1 1"<<std::endl;
308 template<
typename T,
typename A,
int i,
int j>
313 static void print(std::ostream& os,
const M&)
315 os<<
"% ISTL_STRUCT blocked ";
316 os<<i<<
" "<<j<<std::endl;
321 template<
typename T,
int i,
int j>
326 static void print(std::ostream& ,
const M& )
330 template<
typename T,
int i>
333 typedef FieldVector<T,i>
M;
335 static void print(std::ostream& ,
const M& )
390 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
405 dverb<<buffer<<std::endl;
407 if(buffer!=
"%%MatrixMarket") {
409 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
420 if(buffer !=
"matrix")
423 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
437 std::transform(buffer.begin(), buffer.end(), buffer.begin(),
444 if(buffer !=
"array")
446 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
453 if(buffer !=
"coordinate")
455 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
461 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
475 std::transform(buffer.begin(), buffer.end(), buffer.begin(),
481 if(buffer !=
"integer")
483 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
492 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
499 if(buffer !=
"complex")
501 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
508 if(buffer !=
"pattern")
510 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
516 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
525 std::transform(buffer.begin(), buffer.end(), buffer.begin(),
531 if(buffer !=
"general")
533 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
540 if(buffer !=
"hermitian")
542 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
548 if(buffer.size()==1) {
549 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
557 if(buffer !=
"symmetric")
559 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
566 if(buffer !=
"skew-symmetric")
568 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
574 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
579 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
582 file.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
588 template<std::
size_t brows, std::
size_t bcols>
589 std::tuple<std::size_t, std::size_t, std::size_t>
592 std::size_t blockrows=rows/brows;
593 std::size_t blockcols=cols/bcols;
594 std::size_t blocksize=brows*bcols;
595 std::size_t blockentries=0;
600 blockentries = entries/blocksize;
break;
602 blockentries = 2*entries/blocksize;
break;
604 blockentries = (2*entries-rows)/blocksize;
break;
606 blockentries = (2*entries-rows)/blocksize;
break;
608 throw Dune::NotImplemented();
610 return std::make_tuple(blockrows, blockcols, blockentries);
689 return is>>data.number;
718 template<
typename D,
int brows,
int bcols>
730 static_assert(IsNumber<T>::value && brows==1 && bcols==1,
"Only scalar entries are expected here!");
731 for (
auto iter=matrix.
begin(); iter!= matrix.
end(); ++iter)
733 auto brow=iter.index();
734 for (
auto siter=rows[brow].begin(); siter != rows[brow].end(); ++siter)
735 (*iter)[siter->index] = siter->number;
748 for (
auto iter=matrix.begin(); iter!= matrix.end(); ++iter)
750 for (
auto brow=iter.index()*brows,
751 browend=iter.index()*brows+brows;
752 brow<browend; ++brow)
754 for (
auto siter=rows[brow].begin(), send=rows[brow].end();
755 siter != send; ++siter)
756 (*iter)[siter->index/bcols][brow%brows][siter->index%bcols]=siter->number;
762 template<
int brows,
int bcols>
776 std::enable_if_t<!is_complex<T>::value, T>
conj(
const T& r){
781 std::enable_if_t<is_complex<T>::value, T>
conj(
const T& r){
789 template<
typename B,
typename A>
798 template<
typename B,
int i,
int j,
typename A>
807 template<
typename T,
typename A,
typename D>
809 std::istream& file, std::size_t entries,
821 std::vector<std::set<IndexData<D> > > rows(matrix.
N()*brows);
823 auto readloop = [&] (
auto symmetryFixup) {
824 for(std::size_t i = 0; i < entries; ++i) {
830 assert(row/bcols<matrix.
N());
832 assert(data.
index/bcols<matrix.
M());
833 rows[row].insert(data);
835 symmetryFixup(row, data);
842 readloop([](
auto...){});
845 readloop([&](
auto row,
auto data) {
847 data_sym.
index = row;
848 rows[data.index].insert(data_sym);
852 readloop([&](
auto row,
auto data) {
854 data_sym.number = -data.number;
855 data_sym.
index = row;
856 rows[data.index].insert(data_sym);
860 readloop([&](
auto row,
auto data) {
862 data_sym.number =
conj(data.number);
863 data_sym.
index = row;
864 rows[data.index].insert(data_sym);
868 DUNE_THROW(Dune::NotImplemented,
869 "Only general, symmetric, skew-symmetric and hermitian is supported right now!");
874 for(
typename Matrix::CreateIterator iter=matrix.
createbegin();
877 for(std::size_t brow=iter.index()*brows, browend=iter.index()*brows+brows;
878 brow<browend; ++brow)
880 typedef typename std::set<IndexData<D> >::const_iterator Siter;
881 for(Siter siter=rows[brow].begin(), send=rows[brow].end();
882 siter != send; ++siter, ++nnz)
883 iter.insert(siter->index/bcols);
892 Setter(rows, matrix);
895 inline std::tuple<std::string, std::string>
splitFilename(
const std::string& filename) {
896 std::size_t lastdot = filename.find_last_of(
".");
897 if(lastdot == std::string::npos)
898 return std::make_tuple(filename,
"");
900 std::string potentialFileExtension = filename.substr(lastdot);
901 if (potentialFileExtension ==
".mm" || potentialFileExtension ==
".mtx")
902 return std::make_tuple(filename.substr(0, lastdot), potentialFileExtension);
904 return std::make_tuple(filename,
"");
920 if(!readMatrixMarketBanner(istr, header)) {
921 std::cerr <<
"First line was not a correct Matrix Market banner. Using default:\n"
922 <<
"%%MatrixMarket matrix coordinate real general"<<std::endl;
925 istr.seekg(0, std::ios::beg);
927 header.
type=array_type;
942 template<
typename T,
typename A>
948 for (
int i=0; size>0; ++i, --size)
949 istr>>Simd::lane(lane,vector[i]);
952 template<
typename T,
typename A,
int entries>
958 for(
int i=0; size>0; ++i, --size) {
961 Simd::lane(lane, vector[i/entries][i%entries])=val;
972 template<
typename T,
typename A>
980 std::size_t rows, cols;
982 if(cols!=Simd::lanes<field_type>()) {
983 if(Simd::lanes<field_type>() == 1)
989 if(header.type!=array_type)
993 if constexpr (Dune::IsNumber<T>())
998 auto blocksize = dummy.size();
999 std::size_t size=rows/blocksize;
1000 if(size*blocksize!=rows)
1006 istr.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
1007 for(
size_t l=0;l<Simd::lanes<field_type>();++l){
1018 template<
typename T,
typename A>
1026 if(!readMatrixMarketBanner(istr, header)) {
1027 std::cerr <<
"First line was not a correct Matrix Market banner. Using default:\n"
1028 <<
"%%MatrixMarket matrix coordinate real general"<<std::endl;
1031 istr.seekg(0, std::ios::beg);
1035 std::size_t rows, cols, entries;
1051 std::size_t nnz, blockrows, blockcols;
1054 constexpr int brows = mm_multipliers<Matrix>::rows;
1055 constexpr int bcols = mm_multipliers<Matrix>::cols;
1057 std::tie(blockrows, blockcols, nnz) = calculateNNZ<brows, bcols>(rows, cols, entries, header);
1059 istr.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
1062 matrix.
setSize(blockrows, blockcols, nnz);
1065 if(header.type==array_type)
1066 DUNE_THROW(Dune::NotImplemented,
"Array format currently not supported for matrices!");
1068 readSparseEntries(matrix, istr, entries, header, NumericWrapper<typename Matrix::field_type>());
1072 template<
typename B>
1078 if constexpr (IsNumber<B>())
1079 ostr << rowidx <<
" " << colidx <<
" " << entry << std::endl;
1082 for (
auto row=entry.begin(); row != entry.end(); ++row, ++rowidx) {
1084 for (
auto col = row->begin();
col != row->end(); ++
col, ++coli)
1085 ostr<< rowidx<<
" "<<coli<<
" "<<*
col<<std::endl;
1091 template<
typename V>
1093 const std::integral_constant<int,1>&,
1096 ostr<<Simd::lane(lane,entry)<<std::endl;
1100 template<
typename V>
1102 const std::integral_constant<int,0>&,
1108 const int isnumeric = mm_numeric_type<Simd::Scalar<typename V::block_type>>::is_numeric;
1109 typedef typename V::const_iterator VIter;
1111 for(VIter i=vector.begin(); i != vector.end(); ++i)
1114 std::integral_constant<int,isnumeric>(),
1118 template<
typename T,
typename A>
1121 return vector.size();
1124 template<
typename T,
typename A,
int i>
1127 return vector.size()*i;
1131 template<
typename V>
1133 const std::integral_constant<int,0>&)
1136 typedef typename V::field_type field_type;
1138 ostr<<
countEntries(vector)<<
" "<<Simd::lanes<field_type>()<<std::endl;
1139 const int isnumeric = mm_numeric_type<Simd::Scalar<V>>::is_numeric;
1140 for(
size_t l=0;l<Simd::lanes<field_type>(); ++l){
1146 template<
typename M>
1149 const std::integral_constant<int,1>&)
1155 typedef typename M::const_iterator riterator;
1156 typedef typename M::ConstColIterator citerator;
1157 for(riterator row=matrix.begin(); row != matrix.end(); ++row)
1158 for(citerator
col = row->begin();
col != row->end(); ++
col)
1168 template<
typename M>
1175 mm_header_printer<M>::print(ostr);
1176 mm_block_structure_header<M>::print(ostr,matrix);
1193 template<
typename M>
1195 std::string filename,
1199 std::string rfilename;
1201 if (extension !=
"") {
1202 rfilename = pureFilename + extension;
1203 file.open(rfilename.c_str());
1205 DUNE_THROW(IOError,
"Could not open file for storage: " << rfilename.c_str());
1209 rfilename = pureFilename +
".mm";
1210 file.open(rfilename.c_str());
1212 DUNE_THROW(IOError,
"Could not open file for storage: " << rfilename.c_str());
1215 file.setf(std::ios::scientific,std::ios::floatfield);
1217 file.precision(prec);
1237 template<
typename M,
typename G,
typename L>
1239 std::string filename,
1241 bool storeIndices=
true,
1248 std::string rfilename;
1250 if (extension !=
"") {
1251 rfilename = pureFilename +
"_" + std::to_string(rank) + extension;
1252 file.open(rfilename.c_str());
1253 dverb<< rfilename <<std::endl;
1255 DUNE_THROW(IOError,
"Could not open file for storage: " << rfilename.c_str());
1259 rfilename = pureFilename +
"_" + std::to_string(rank) +
".mm";
1260 file.open(rfilename.c_str());
1261 dverb<< rfilename <<std::endl;
1263 DUNE_THROW(IOError,
"Could not open file for storage: " << rfilename.c_str());
1265 file.setf(std::ios::scientific,std::ios::floatfield);
1267 file.precision(prec);
1275 rfilename = pureFilename +
"_" + std::to_string(rank) +
".idx";
1276 file.open(rfilename.c_str());
1278 DUNE_THROW(IOError,
"Could not open file for storage: " << rfilename.c_str());
1279 file.setf(std::ios::scientific,std::ios::floatfield);
1281 typedef typename IndexSet::const_iterator Iterator;
1282 for(Iterator iter = comm.
indexSet().begin();
1283 iter != comm.
indexSet().end(); ++iter) {
1284 file << iter->global()<<
" "<<(std::size_t)iter->local()<<
" "
1285 <<(int)iter->local().attribute()<<
" "<<(int)iter->local().isPublic()<<std::endl;
1288 file<<
"neighbours:";
1289 const std::set<int>& neighbours=comm.
remoteIndices().getNeighbours();
1290 typedef std::set<int>::const_iterator SIter;
1291 for(SIter neighbour=neighbours.begin(); neighbour != neighbours.end(); ++neighbour) {
1292 file<<
" "<< *neighbour;
1311 template<
typename M,
typename G,
typename L>
1313 const std::string& filename,
1315 bool readIndices=
true)
1320 typedef typename LocalIndexT::Attribute Attribute;
1322 int rank = comm.communicator().rank();
1325 std::string rfilename;
1327 if (extension !=
"") {
1328 rfilename = pureFilename +
"_" + std::to_string(rank) + extension;
1329 file.open(rfilename.c_str(), std::ios::in);
1330 dverb<< rfilename <<std::endl;
1332 DUNE_THROW(IOError,
"Could not open file: " << rfilename.c_str());
1336 rfilename = pureFilename +
"_" + std::to_string(rank) +
".mm";
1337 file.open(rfilename.c_str(), std::ios::in);
1339 rfilename = pureFilename +
"_" + std::to_string(rank) +
".mtx";
1340 file.open(rfilename.c_str(), std::ios::in);
1341 dverb<< rfilename <<std::endl;
1343 DUNE_THROW(IOError,
"Could not open file: " << rfilename.c_str());
1354 IndexSet& pis=comm.pis;
1355 rfilename = pureFilename +
"_" + std::to_string(rank) +
".idx";
1356 file.open(rfilename.c_str());
1358 DUNE_THROW(IOError,
"Could not open file: " << rfilename.c_str());
1360 DUNE_THROW(InvalidIndexSetState,
"Index set is not empty!");
1363 while(!file.eof() && file.peek()!=
'n') {
1372 pis.add(g,LocalIndexT(l,Attribute(c),b));
1380 if(s!=
"neighbours:")
1383 while(!file.eof()) {
1389 comm.ri.setNeighbours(nb);
1391 comm.ri.template rebuild<false>();
1406 template<
typename M>
1408 const std::string& filename)
1411 std::string rfilename;
1413 if (extension !=
"") {
1414 rfilename = pureFilename + extension;
1415 file.open(rfilename.c_str());
1417 DUNE_THROW(IOError,
"Could not open file: " << rfilename.c_str());
1421 rfilename = pureFilename +
".mm";
1422 file.open(rfilename.c_str(), std::ios::in);
1424 rfilename = pureFilename +
".mtx";
1425 file.open(rfilename.c_str(), std::ios::in);
1427 DUNE_THROW(IOError,
"Could not open file: " << rfilename.c_str());
Implementation of the BCRSMatrix class.
Some handy generic functions for ISTL matrices.
Classes providing communication interfaces for overlapping Schwarz methods.
This file implements a vector space as a tensor product of a given vector space. The number of compon...
auto countNonZeros(const M &, typename std::enable_if_t< Dune::IsNumber< M >::value > *sfinae=nullptr)
Get the number of nonzero fields in the matrix.
Definition matrixutils.hh:119
void readMatrixMarket(Dune::BlockVector< T, A > &vector, std::istream &istr)
Reads a BlockVector from a matrix market file.
Definition matrixmarket.hh:973
void storeMatrixMarket(const M &matrix, std::string filename, int prec=default_precision)
Stores a parallel matrix/vector in matrix market format in a file.
Definition matrixmarket.hh:1194
void loadMatrixMarket(M &matrix, const std::string &filename, OwnerOverlapCopyCommunication< G, L > &comm, bool readIndices=true)
Load a parallel matrix/vector stored in matrix market format.
Definition matrixmarket.hh:1312
std::size_t countEntries(const BlockVector< T, A > &vector)
Definition matrixmarket.hh:1119
void writeMatrixMarket(const V &vector, std::ostream &ostr, const std::integral_constant< int, 0 > &)
Definition matrixmarket.hh:1132
void mm_print_vector_entry(const V &entry, std::ostream &ostr, const std::integral_constant< int, 1 > &, size_t lane)
Definition matrixmarket.hh:1092
static const int default_precision
Definition matrixmarket.hh:1181
void mm_read_vector_entries(Dune::BlockVector< T, A > &vector, std::size_t size, std::istream &istr, size_t lane)
Definition matrixmarket.hh:943
void mm_read_header(std::size_t &rows, std::size_t &cols, MatrixMarketImpl::MMHeader &header, std::istream &istr, bool isVector)
Definition matrixmarket.hh:914
void mm_print_entry(const B &entry, std::size_t rowidx, std::size_t colidx, std::ostream &ostr)
Definition matrixmarket.hh:1073
Definition allocator.hh:11
MatrixSparsityPatternGatherScatter< M, I >::ColIter MatrixSparsityPatternGatherScatter< M, I >::col
Definition matrixredistribute.hh:591
Definition matrixmarket.hh:67
std::tuple< std::size_t, std::size_t, std::size_t > calculateNNZ(std::size_t rows, std::size_t cols, std::size_t entries, const MMHeader &header)
Definition matrixmarket.hh:590
bool operator<(const IndexData< T > &i1, const IndexData< T > &i2)
LessThan operator.
Definition matrixmarket.hh:673
LineType
Definition matrixmarket.hh:339
@ DATA
Definition matrixmarket.hh:339
@ MM_HEADER
Definition matrixmarket.hh:339
@ MM_ISTLSTRUCT
Definition matrixmarket.hh:339
bool readMatrixMarketBanner(std::istream &file, MMHeader &mmHeader)
Definition matrixmarket.hh:396
void readSparseEntries(Dune::BCRSMatrix< T, A > &matrix, std::istream &file, std::size_t entries, const MMHeader &mmHeader, const D &)
Definition matrixmarket.hh:808
MM_TYPE
Definition matrixmarket.hh:342
@ array_type
Definition matrixmarket.hh:342
@ coordinate_type
Definition matrixmarket.hh:342
@ unknown_type
Definition matrixmarket.hh:342
std::istream & operator>>(std::istream &is, NumericWrapper< T > &num)
Definition matrixmarket.hh:657
void skipComments(std::istream &file)
Definition matrixmarket.hh:382
bool lineFeed(std::istream &file)
Definition matrixmarket.hh:358
@ MM_MAX_LINE_LENGTH
Definition matrixmarket.hh:340
MM_STRUCTURE
Definition matrixmarket.hh:346
@ skew_symmetric
Definition matrixmarket.hh:346
@ general
Definition matrixmarket.hh:346
@ hermitian
Definition matrixmarket.hh:346
@ unknown_structure
Definition matrixmarket.hh:346
@ symmetric
Definition matrixmarket.hh:346
MM_CTYPE
Definition matrixmarket.hh:344
@ unknown_ctype
Definition matrixmarket.hh:344
@ pattern
Definition matrixmarket.hh:344
@ complex_type
Definition matrixmarket.hh:344
@ double_type
Definition matrixmarket.hh:344
@ integer_type
Definition matrixmarket.hh:344
std::enable_if_t<!is_complex< T >::value, T > conj(const T &r)
Definition matrixmarket.hh:776
std::tuple< std::string, std::string > splitFilename(const std::string &filename)
Definition matrixmarket.hh:895
A sparse block matrix with compressed row storage.
Definition bcrsmatrix.hh:467
Iterator begin()
Get iterator to first row.
Definition bcrsmatrix.hh:672
@ row_wise
Build in a row-wise manner.
Definition bcrsmatrix.hh:518
Iterator end()
Get iterator to one beyond last row.
Definition bcrsmatrix.hh:678
CreateIterator createend()
get create iterator pointing to one after the last block
Definition bcrsmatrix.hh:1103
size_type M() const
number of columns (counted in blocks)
Definition bcrsmatrix.hh:2010
CreateIterator createbegin()
get initial create iterator
Definition bcrsmatrix.hh:1097
size_type N() const
number of rows (counted in blocks)
Definition bcrsmatrix.hh:2004
void setBuildMode(BuildMode bm)
Sets the build mode of the matrix.
Definition bcrsmatrix.hh:831
void setSize(size_type rows, size_type columns, size_type nnz=0)
Set the size of the matrix.
Definition bcrsmatrix.hh:859
A vector of blocks with memory management.
Definition bvector.hh:392
void resize(size_type size)
Resize the vector.
Definition bvector.hh:496
typename Imp::BlockTraits< B >::field_type field_type
export the type representing the field
Definition bvector.hh:398
A generic dynamic dense matrix.
Definition matrix.hh:561
Helper metaprogram to get the matrix market string representation of the numeric type.
Definition matrixmarket.hh:78
static std::string str()
Definition matrixmarket.hh:86
@ is_numeric
Whether T is a supported numeric type.
Definition matrixmarket.hh:83
static std::string str()
Definition matrixmarket.hh:102
@ is_numeric
Whether T is a supported numeric type.
Definition matrixmarket.hh:99
@ is_numeric
Whether T is a supported numeric type.
Definition matrixmarket.hh:115
static std::string str()
Definition matrixmarket.hh:118
@ is_numeric
Whether T is a supported numeric type.
Definition matrixmarket.hh:131
static std::string str()
Definition matrixmarket.hh:134
@ is_numeric
Whether T is a supported numeric type.
Definition matrixmarket.hh:183
static std::string str()
Definition matrixmarket.hh:186
static std::string str()
Definition matrixmarket.hh:202
@ is_numeric
Whether T is a supported numeric type.
Definition matrixmarket.hh:199
Meta program to write the correct Matrix Market header.
Definition matrixmarket.hh:217
static void print(std::ostream &os)
Definition matrixmarket.hh:222
static void print(std::ostream &os)
Definition matrixmarket.hh:232
static void print(std::ostream &os)
Definition matrixmarket.hh:242
static void print(std::ostream &os)
Definition matrixmarket.hh:252
Metaprogram for writing the ISTL block structure header.
Definition matrixmarket.hh:268
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:276
BlockVector< T, A > M
Definition matrixmarket.hh:273
BlockVector< FieldVector< T, i >, A > M
Definition matrixmarket.hh:286
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:288
BCRSMatrix< T, A > M
Definition matrixmarket.hh:298
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:301
BCRSMatrix< FieldMatrix< T, i, j >, A > M
Definition matrixmarket.hh:311
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:313
FieldMatrix< T, i, j > M
Definition matrixmarket.hh:324
static void print(std::ostream &, const M &)
Definition matrixmarket.hh:326
static void print(std::ostream &, const M &)
Definition matrixmarket.hh:335
FieldVector< T, i > M
Definition matrixmarket.hh:333
Definition matrixmarket.hh:349
MM_STRUCTURE structure
Definition matrixmarket.hh:355
MM_TYPE type
Definition matrixmarket.hh:353
MMHeader()
Definition matrixmarket.hh:350
MM_CTYPE ctype
Definition matrixmarket.hh:354
Definition matrixmarket.hh:621
std::size_t index
Definition matrixmarket.hh:622
a wrapper class of numeric values.
Definition matrixmarket.hh:638
T number
Definition matrixmarket.hh:639
Utility class for marking the pattern type of the MatrixMarket matrices.
Definition matrixmarket.hh:650
Functor to the data values of the matrix.
Definition matrixmarket.hh:720
void operator()(const std::vector< std::set< IndexData< D > > > &rows, BCRSMatrix< T > &matrix)
Sets the matrix values.
Definition matrixmarket.hh:727
void operator()(const std::vector< std::set< IndexData< D > > > &rows, BCRSMatrix< FieldMatrix< T, brows, bcols > > &matrix)
Sets the matrix values.
Definition matrixmarket.hh:745
void operator()(const std::vector< std::set< IndexData< PatternDummy > > > &, M &)
Definition matrixmarket.hh:766
Definition matrixmarket.hh:771
Definition matrixmarket.hh:787
@ cols
Definition matrixmarket.hh:794
@ rows
Definition matrixmarket.hh:793
@ rows
Definition matrixmarket.hh:802
@ cols
Definition matrixmarket.hh:803
Definition matrixmarket.hh:911
Definition matrixutils.hh:27
@ value
True if T is an ISTL matrix.
Definition matrixutils.hh:509
A class setting up standard communication for a two-valued attribute set with owner/overlap/copy sema...
Definition owneroverlapcopy.hh:174
const ParallelIndexSet & indexSet() const
Get the underlying parallel index set.
Definition owneroverlapcopy.hh:462
OwnerOverlapCopyCommunication(MPI_Comm comm_, SolverCategory::Category cat_=SolverCategory::overlapping, bool freecomm_=false)
Definition owneroverlapcopy.hh:554
const Communication< MPI_Comm > & communicator() const
Definition owneroverlapcopy.hh:299
const RemoteIndices & remoteIndices() const
Get the underlying remote indices.
Definition owneroverlapcopy.hh:471
Dune::ParallelIndexSet< GlobalIdType, LI, 512 > ParallelIndexSet
The type of the parallel index set.
Definition owneroverlapcopy.hh:449