Hi! Sorry to ask a question again. I tried to implement a TensorFunction instead of the Function and found that this object is not symmetrical physically. I am working on a damage problem but as a more simple example let us consider a 3D x-y spin model. This model is in the three-dimensional space but its quantities (magnetization) are two-dimensional. In other words, on the 3D space the local vector of magnetization can rotate only in the x-y plane. This situation prohibits me to use the TensorFunction to return both values and gradients. Indeed, typedef Tensor<rank,dim> TensorFunction< rank, dim >::value_type means that to return a vector of 2-dimensional magnetization i need rank=1 and dim=2. But then i need for the 2-component magnetization to return for each component its 3-dimensional gradients. I cannot use already typedef Tensor<rank+1,dim> TensorFunction< rank, dim >::gradient_type because i need a 2-component Vector of 3-dimensional Tensors. Tensor<rank+1,dim> of rank=2 and dimensionality 2 will not do the trick. The reason of the question is that in the TensorFunction the dimensionality of the function is restricted to the dimensionality of the embedding space. Best, Sergey
_______________________________________________
