*/
static unsigned int memory_consumption ();
+ /**
+ * Exception.
+ */
+ DeclException1 (ExcInvalidTensorIndex,
+ int,
+ << "Invalid tensor index " << arg1);
+
private:
/**
* Array of tensors holding the
/* ----------------- Non-member functions operating on tensors. ------------ */
-/* Exception class. This is certainly not the best possible place for its
- declaration, but at present, local classes to any of Tensor<> can't
- be properly accessed (haven't investigated why). If anyone has a better
- idea, realize it!
-*/
-//TODO:[WB] (compiler) move the exceptions back into the Tensor class, if the compiler allows to do so. Also rename them back (i.e. drop the initial Tensor* from the name)
-DeclException1 (ExcInvalidTensorIndex,
- int,
- << "Invalid tensor index " << arg1);
-
/**
* Output operator for tensors. Print the elements consecutively, with
break;
default:
- Assert (false, ExcInvalidTensorIndex (index2));
+ Assert (false,
+ (typename Tensor<2,dim>::ExcInvalidTensorIndex (index2)));
};
break;
case 2:
break;
default:
- Assert (false, ExcInvalidTensorIndex (index2));
+ Assert (false,
+ (typename Tensor<2,dim>::ExcInvalidTensorIndex (index2)));
};
break;
default:
- Assert (false, ExcInvalidTensorIndex (index1));
+ Assert (false, (typename Tensor<2,dim>::ExcInvalidTensorIndex (index1)));
};
};
break;
default:
- Assert (false, ExcInvalidTensorIndex (index1));
+ Assert (false,
+ (typename Tensor<2,dim>::ExcInvalidTensorIndex (index1)));
};
};
*/
static unsigned int memory_consumption ();
+ /**
+ * Exception
+ */
+ DeclException1 (ExcDimTooSmall,
+ int,
+ << "Given dimensions must be >= 1, but was " << arg1);
+
private:
/**
* Store the values in a simple
friend class Point<dim>;
};
- /**
- * Exception
- */
-//TODO:[WB] (compiler) move the exceptions back into the Tensor class, if the compiler allows to do so. Also rename them back (i.e. drop the initial Tensor* from the name)
-DeclException2(ExcWrongVectorSize, int, int, << "Tensor has " << arg1
- << " entries, but vector has size " << arg2);
-DeclException1 (ExcDimTooSmall,
- int,
- << "Given dimensions must be >= 1, but was " << arg1);
-
/**
* Prints the values of this point in the