* representing the two points.
*/
double distance (const Point<dim> &p) const;
+
+ /**
+ * Read or write the data of this object to or
+ * from a stream for the purpose of serialization
+ */
+ template <class Archive>
+ void serialize(Archive & ar, const unsigned int version);
};
/*------------------------------- Inline functions: Point ---------------------------*/
return (Point<dim>(*this) /= factor);
}
+
+template <int dim>
+template <class Archive>
+inline
+void
+Point<dim>::serialize(Archive & ar, const unsigned int)
+{
+ // forward to serialization
+ // function in the base class
+ ar & static_cast<Tensor<1,dim> &>(*this);
+}
+
#endif // DOXYGEN
*/
static unsigned int memory_consumption ();
-
+ /**
+ * Read or write the data of this object to or
+ * from a stream for the purpose of serialization
+ */
+ template <class Archive>
+ void serialize(Archive & ar, const unsigned int version);
+
private:
/**
* A structure that describes
return table[i];
}
-
+template <int rank, int dim>
+template <class Archive>
+inline
+void
+SymmetricTensor<rank,dim>::serialize(Archive & ar, const unsigned int)
+{
+ ar & data;
+}
#endif // DOXYGEN
int,
<< "Invalid tensor index " << arg1);
+ /**
+ * Read or write the data of this object to or
+ * from a stream for the purpose of serialization
+ */
+ template <class Archive>
+ void serialize(Archive & ar, const unsigned int version);
+
private:
/**
* Array of tensors holding the
return sizeof(Tensor<rank_,dim>);
}
+template <int rank_, int dim>
+template <class Archive>
+inline
+void
+Tensor<rank_,dim>::serialize(Archive & ar, const unsigned int)
+{
+ ar & subtensor;
+}
+
#endif // DOXYGEN
/* ----------------- Non-member functions operating on tensors. ------------ */
int,
<< "dim must be positive, but was " << arg1);
+ /**
+ * Read or write the data of this object to or
+ * from a stream for the purpose of serialization
+ */
+ template <class Archive>
+ void serialize(Archive & ar, const unsigned int version);
+
private:
/**
* The value of this scalar object.
DeclException1 (ExcDimTooSmall,
int,
<< "dim must be positive, but was " << arg1);
+
+ /**
+ * Read or write the data of this object to or
+ * from a stream for the purpose of serialization
+ */
+ template <class Archive>
+ void serialize(Archive & ar, const unsigned int version);
+
private:
- /**
+ /**
* Store the values in a simple
* array. For <tt>dim==0</tt> store
* one element, because otherways
value = 0;
}
+template <int dim>
+template <class Archive>
+inline
+void Tensor<0,dim>::serialize(Archive & ar, const unsigned int)
+{
+ ar & value;
+}
/*---------------------------- Inline functions: Tensor<1,dim> ------------------------*/
}
+template <int dim>
+template <class Archive>
+inline
+void Tensor<1,dim>::serialize(Archive & ar, const unsigned int)
+{
+ ar & values;
+}
#endif // DOXYGEN