template <class STREAM>
void print(STREAM &out) const;
+ /**
+ * Writes the IndexSet into a text based
+ * file format, that can be read in again
+ * using the read() function.
+ */
+ void write(std::ostream & out) const;
+
+ /**
+ * Constructs the IndexSet from a text
+ * based representation given by the
+ * stream @param in written by the
+ * write() function.
+ */
+ void read(std::istream & in);
+
+
#ifdef DEAL_II_USE_TRILINOS
/**
* Given an MPI communicator,
}
+
+void
+IndexSet::write(std::ostream & out) const
+{
+ compress();
+ out << size() << " ";
+ out << ranges.size() << std::endl;
+ std::vector<Range>::const_iterator r = ranges.begin();
+ for ( ;r!=ranges.end(); ++r)
+ {
+ out << r->begin << " " << r->end << std::endl;
+ }
+}
+
+
+
+void
+IndexSet::read(std::istream & in)
+{
+ unsigned int s, numranges, b, e;
+ in >> s >> numranges;
+ ranges.clear();
+ set_size(s);
+ for (unsigned int i=0;i<numranges;++i)
+ {
+ in >> b >> e;
+ add_range(b,e);
+ }
+}
+
+
+
void
IndexSet::subtract_set (const IndexSet & other)
{
}
+
+
+
#ifdef DEAL_II_USE_TRILINOS
Epetra_Map
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams