Skip to content

Commit 4539f3c

Browse files
committed
rename function in utilities.
1 parent 45639f9 commit 4539f3c

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

include/aspect/utilities.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,10 +1062,12 @@ namespace aspect
10621062
std::vector<Operator> create_model_operator_list(const std::vector<std::string> &operator_names);
10631063

10641064
/**
1065-
* Create matrix with unit at independent indices
1065+
* A function that returns a SymmetricTensor, whose entries are zero, except for
1066+
* the k'th component, which is set to one. If k is not on the main diagonal the
1067+
* resulting tensor is symmetrized.
10661068
*/
10671069
template <int dim>
1068-
SymmetricTensor<2,dim> symmetric_independent_component_matrix (const unsigned int k);
1070+
SymmetricTensor<2,dim> nth_basis_for_symmetric_tensors (const unsigned int k);
10691071

10701072
}
10711073
}

source/utilities.cc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2534,11 +2534,10 @@ namespace aspect
25342534

25352535
template <int dim>
25362536
SymmetricTensor<2,dim>
2537-
symmetric_independent_component_matrix (const unsigned int k)
2537+
nth_basis_for_symmetric_tensors (const unsigned int k)
25382538
{
2539-
// somehow I need this, because otherwise it complains that I am passing 3 arguments and it only takes 2...
2540-
const bool boolian = k < SymmetricTensor<2,dim>::n_independent_components;
2541-
Assert(boolian, ExcMessage("The component is larger then the amount of independent components in the matrix.") );
2539+
Assert((k < SymmetricTensor<2,dim>::n_independent_components),
2540+
ExcMessage("The component is larger then the amount of independent components in the matrix.") );
25422541

25432542
const TableIndices<2> indices_ij = SymmetricTensor<2,dim>::unrolled_to_component_indices (k);
25442543

@@ -2633,8 +2632,8 @@ namespace aspect
26332632
template std_cxx11::array<double,2> convert_point_to_array<2>(const Point<2> &point);
26342633
template std_cxx11::array<double,3> convert_point_to_array<3>(const Point<3> &point);
26352634

2636-
template SymmetricTensor<2,2> symmetric_independent_component_matrix (const unsigned int k);
2637-
template SymmetricTensor<2,3> symmetric_independent_component_matrix (const unsigned int k);
2635+
template SymmetricTensor<2,2> nth_basis_for_symmetric_tensors (const unsigned int k);
2636+
template SymmetricTensor<2,3> nth_basis_for_symmetric_tensors (const unsigned int k);
26382637

26392638
}
26402639
}

0 commit comments

Comments
 (0)