Commit eb790bc4 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#9 Improve Doxygen comments in ThirdParty/Wrappers/Petsc.

#859 Remove obsolete, duplicate or unused functions.

#859 Change the prototype of Vector::DotProduct, and remove in bidomain-related models undue (and entirely useless) calls to Mpi::AllReduce().
parent 53586a0b
......@@ -315,9 +315,6 @@ namespace HappyHeart
template<ParameterNS::Type TypeT>
void VariationalFormulation<TypeT>::ComputeEnergy()
{
double energy = 0.;
double energy_temp = 0.;
const NumberingSubset& numbering_subset = GetNumberingSubset();
const GlobalVector& system_solution = parent::GetSystemSolution(numbering_subset);
const GlobalVector& system_solution_two_iterations_before = GetVectorSystemSolutionTwoIterationsBefore();
......@@ -346,7 +343,8 @@ namespace HappyHeart
midpoint_system_solution.Scale(dt * dt, __FILE__, __LINE__);
Wrappers::Petsc::DotProduct(diff_system_solution, midpoint_system_solution, energy, __FILE__, __LINE__);
double energy =
Wrappers::Petsc::DotProduct(diff_system_solution, midpoint_system_solution, __FILE__, __LINE__);
midpoint_system_solution.Copy(system_solution,__FILE__, __LINE__);
Wrappers::Petsc::AXPY(1., system_solution_two_iterations_before, midpoint_system_solution,
......@@ -356,8 +354,9 @@ namespace HappyHeart
Wrappers::Petsc::MatMult(stiffness_matrix, midpoint_system_solution, diff_system_solution,
__FILE__, __LINE__);
Wrappers::Petsc::DotProduct(midpoint_system_solution, diff_system_solution, energy_temp,
__FILE__, __LINE__);
const double energy_temp =
Wrappers::Petsc::DotProduct(midpoint_system_solution, diff_system_solution,
__FILE__, __LINE__);
energy = 0.5 * (energy + energy_temp);
......
......@@ -427,21 +427,13 @@ namespace HappyHeart
const auto& numbering_subset = GetNumberingSubset();
auto& system_solution = this->GetNonCstSystemSolution(numbering_subset);
double mean = 0.;
Wrappers::Petsc::DotProduct(mean_vector_extracellular_potential, system_solution, mean, __FILE__, __LINE__);
double omega = 0.;
const double mean =
Wrappers::Petsc::DotProduct(mean_vector_extracellular_potential, system_solution, __FILE__, __LINE__);
auto& vector_of_one = GetNonCstVectorOfOneOnExtracellularPotential();
Wrappers::Petsc::DotProduct(mean_vector_extracellular_potential, vector_of_one, omega, __FILE__, __LINE__);
this->MpiHappyHeart().AllReduce(mean,
Wrappers::MpiNS::Op::Sum);
this->MpiHappyHeart().AllReduce(omega,
Wrappers::MpiNS::Op::Sum);
const double omega =
Wrappers::Petsc::DotProduct(mean_vector_extracellular_potential, vector_of_one, __FILE__, __LINE__);
Wrappers::Petsc::AXPY(-mean / omega, vector_of_one, system_solution, __FILE__, __LINE__);
}
......
......@@ -451,12 +451,8 @@ namespace HappyHeart
const auto& numbering_subset = GetNumberingSubset();
auto& system_solution = this->GetNonCstSystemSolution(numbering_subset);
double mean = 0.;
Wrappers::Petsc::DotProduct(mean_vector_extracellular_potential, system_solution, mean, __FILE__, __LINE__);
this->MpiHappyHeart().AllReduce(mean,
Wrappers::MpiNS::Op::Sum);
const double mean =
Wrappers::Petsc::DotProduct(mean_vector_extracellular_potential, system_solution, __FILE__, __LINE__);
auto& vector_of_one = GetNonCstVectorOfOneOnExtracellularPotential();
......
......@@ -831,10 +831,8 @@ namespace HappyHeart
void VariationalFormulation::ComputeEnergy()
{
double energy = 0.;
auto& diff_displacement = GetNonCstVectorDiffDisplacement();
const auto& diplacement_at_previous_time_step = GetVectorCurrentDisplacement();
const auto& displacement_at_previous_time_step = GetVectorCurrentDisplacement();
const auto& velocity_at_previous_time_step = GetVectorCurrentVelocity();
Wrappers::Petsc::MatMult(GetMatrixMassPerSquareTimeStep(),
......@@ -842,24 +840,23 @@ namespace HappyHeart
diff_displacement,
__FILE__, __LINE__);
Wrappers::Petsc::DotProduct(velocity_at_previous_time_step, diff_displacement, energy, __FILE__, __LINE__);
double energy =
Wrappers::Petsc::DotProduct(velocity_at_previous_time_step, diff_displacement , __FILE__, __LINE__);
const double time_step = GetTimeManager().GetTimeStep();
energy *= (time_step*time_step) / 2.; // Because in the mass there is a coefficient.
double stiffness_related_energy;
energy *= (time_step * time_step) * 0.5; // Because in the mass there is a coefficient.
Wrappers::Petsc::MatMult(GetMatrixLinearStiffness(),
diplacement_at_previous_time_step,
displacement_at_previous_time_step,
diff_displacement,
__FILE__, __LINE__);
Wrappers::Petsc::DotProduct(diplacement_at_previous_time_step, diff_displacement, stiffness_related_energy, __FILE__, __LINE__);
const double stiffness_related_energy =
Wrappers::Petsc::DotProduct(displacement_at_previous_time_step, diff_displacement, __FILE__, __LINE__);
energy += stiffness_related_energy;
energy *=0.5;
energy *= 0.5;
Wrappers::Petsc::PrintMessageOnFirstProcessor("\nEnergy : %1.12e\n",
MpiHappyHeart(),
......
......@@ -104,7 +104,7 @@ namespace HappyHeart
__FILE__, __LINE__);
}
const double norm = Wrappers::Petsc::NormL2(mpi, delta_displacement, __FILE__, __LINE__);
const double norm = delta_displacement.Norm(NORM_2, __FILE__, __LINE__);
if (iteration_index == 0u)
absolute_error = norm;
......
......@@ -392,15 +392,13 @@ namespace HappyHeart
intermediate_quantity,
__FILE__, __LINE__);
const double numerator = Wrappers::Petsc::ScalarProduct(mpi,
solid_displacement_before_SoF_evolution_on_interface,
intermediate_quantity,
__FILE__, __LINE__);
const double numerator = Wrappers::Petsc::DotProduct(solid_displacement_before_SoF_evolution_on_interface,
intermediate_quantity,
__FILE__, __LINE__);
const double denominator = Wrappers::Petsc::ScalarProduct(mpi,
solid_displacement_evolution_before_and_after_SoF_on_interface,
intermediate_quantity,
__FILE__, __LINE__);
const double denominator = Wrappers::Petsc::DotProduct(solid_displacement_evolution_before_and_after_SoF_on_interface,
intermediate_quantity,
__FILE__, __LINE__);
const double omega = numerator / denominator; // no tests upon denominator as both numerator and denominator
// might be very tiny.
......
......@@ -131,7 +131,7 @@ namespace HappyHeart
__FILE__, __LINE__);
}
const double norm = Wrappers::Petsc::NormL2(mpi, delta_displacement, __FILE__, __LINE__);
const double norm = delta_displacement.Norm(NORM_2, __FILE__, __LINE__);
if (iteration_index == 0u)
absolute_error = norm;
......
......@@ -417,21 +417,13 @@ namespace HappyHeart
const auto& numbering_subset = GetNumberingSubset();
auto& system_solution = this->GetNonCstSystemSolution(numbering_subset);
double mean = 0.;
Wrappers::Petsc::DotProduct(mean_vector_extracellular_potential, system_solution, mean, __FILE__, __LINE__);
double omega = 0.;
const double mean =
Wrappers::Petsc::DotProduct(mean_vector_extracellular_potential, system_solution, __FILE__, __LINE__);
auto& vector_of_one = GetNonCstVectorOfOneOnExtracellularPotential();
Wrappers::Petsc::DotProduct(mean_vector_extracellular_potential, vector_of_one, omega, __FILE__, __LINE__);
this->MpiHappyHeart().AllReduce(mean,
Wrappers::MpiNS::Op::Sum);
this->MpiHappyHeart().AllReduce(omega,
Wrappers::MpiNS::Op::Sum);
const double omega =
Wrappers::Petsc::DotProduct(mean_vector_extracellular_potential, vector_of_one, __FILE__, __LINE__);
Wrappers::Petsc::AXPY(- mean / omega, vector_of_one, system_solution, __FILE__, __LINE__);
}
......
......@@ -48,9 +48,9 @@ namespace HappyHeart
template<class HyperelasticLawT>
double PoroHyperelasticLaw<HyperelasticLawT>::Wbulk(const InvariantHolder& invariant_holder,
const QuadraturePoint& quadrature_point,
const GeometricElt& geom_elt,
DataNS::TimeLabel3 time_label) const
const QuadraturePoint& quadrature_point,
const GeometricElt& geom_elt,
DataNS::TimeLabel3 time_label) const
{
const double sqrt_I3 = std::sqrt(invariant_holder.GetInvariant<3>());
......
......@@ -129,7 +129,7 @@ namespace HappyHeart
}
{
const double norm = Wrappers::Petsc::NormL2(mpi, delta_displacement, __FILE__, __LINE__);
const double norm = delta_displacement.Norm(NORM_2, __FILE__, __LINE__);
if (implicit_iteration_index == 0)
abs = norm;
......
......@@ -145,8 +145,7 @@ namespace HappyHeart
* \param[in] Ncolumn Number of columns.
* \param[in] matrix_pattern Pattern of the matrix (number of elements expected on each row_).
* \copydetails doxygen_hide_mpi_param
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*
* The matrix hence created will keep the non-zero structure: even if a value becomes 0 it will
* go on being held as a non-zero emplacement.
......@@ -165,8 +164,7 @@ namespace HappyHeart
* \param[in] Nglobal_column Number of columns on the global processor.
* \param[in] matrix_pattern Pattern of the matrix (number of elements expected on each row_).
* \copydetails doxygen_hide_mpi_param
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*
*/
void InitParallelMatrix(unsigned int Nlocal_row, unsigned int Nlocal_column,
......@@ -191,6 +189,8 @@ namespace HappyHeart
*
* Ideally it shouldn't be used at all except in the implementation of few of the associated
* function such as MatMatMult.
*
* \param[in] petsc_matrix Native Petsc matrix which should be put inside current object.
*/
void SetFromPetscMat(Mat petsc_matrix);
......@@ -203,8 +203,7 @@ namespace HappyHeart
* - MAT_DO_NOT_COPY_VALUES
* - MAT_COPY_VALUES
* - MAT_SHARE_NONZERO_PATTERN (share the nonzero patterns with the previous matrix but do not copy them.)
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*
* To make the third option work, the \a original matrix must have been assembled (i.e. where are the
* non-zero values must already be determined accurately, not just how many of them there are on
......@@ -227,8 +226,7 @@ namespace HappyHeart
* you'll see there are more prerequisite to this choice (the pattern must be fully built).
* Within the frame of this wrapper there shouldn't be any problem provided one of the InitXXX()
* method has been called.
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*/
void Copy(const Matrix& source, const char* invoking_file, int invoking_line,
const MatStructure& structure = SAME_NONZERO_PATTERN);
......@@ -240,8 +238,7 @@ namespace HappyHeart
* \param[in] source Original matrix which layout AND content is copied.
* Beware: this method requires that \a source has already been deeply initialized (SetValues()
* and Assembly() should already have been called). See DuplicateLayout() for a lenghtier explanation.
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*
*/
void CompleteCopy(const Matrix& source, const char* invoking_file, int invoking_line);
......@@ -249,8 +246,7 @@ namespace HappyHeart
/*!
* \brief Get the number of elements in the local matrix.
*
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*
* \return First index is number of rows, second one the number of columns.
*/
......@@ -259,8 +255,7 @@ namespace HappyHeart
/*!
* \brief Get the number of elements in the global matrix (first is number of rows, second number of columns).
*
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*
* \return First index is number of rows, second one the number of columns.
*/
......@@ -270,8 +265,7 @@ namespace HappyHeart
/*!
* \brief Set all the entries to zero.
*
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*/
void ZeroEntries(const char* invoking_file, int invoking_line);
......@@ -281,8 +275,7 @@ namespace HappyHeart
*
* \param[in] row_indexes Indexes of the row considered (C - numbering).
* \param[in] diagonal_value Value fior the diagonal term. Put 0. if you want it zeroed too.
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*/
......@@ -295,8 +288,7 @@ namespace HappyHeart
/*!
* \brief Petsc Assembling of the matrix.
*
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*/
void Assembly(const char* invoking_file, int invoking_line);
......@@ -304,8 +296,11 @@ namespace HappyHeart
/*!
* \brief Indicates if a matrix has been assembled and is ready for use; for example, in matrix-vector product.
*
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \note This is a direct wrapper upon Petsc MatAssembled() function.
*
* \copydoc doxygen_hide_invoking_file_and_line
*
* \return True if the matrix has been assembled.
*/
bool IsAssembled(const char* invoking_file, int invoking_line) const;
......@@ -314,8 +309,7 @@ namespace HappyHeart
* \brief Wrapper over MatScale, that performs Y = a * Y.
*
* \param[in] a Factor by which the vector is scaled.
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*/
void Scale(PetscScalar a, const char* invoking_file, int invoking_line);
......@@ -338,8 +332,7 @@ namespace HappyHeart
* \param[in] values Values to put in the matrix. This array should be the same size as \a row_indexing
* x \a column_indexing: it is a block of values that is actually introduced!
* \param [in] insertOrAppend Petsc ADD_VALUES or INSERT_VALUES (see Petsc documentation).
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
* \param[in] do_ignore_zero_entries If yes, you might specify a block which encompass locations that
* are not within the pattern. For instance in our case above, you may specify \a row_indexing = { 1, 2 }
* and \a col_indexing = { 3, 5 } even if pattern says there are no value at (1, 5). In this case,
......@@ -361,8 +354,7 @@ namespace HappyHeart
*
* \param[in] row_index Program-wise index of the row which values will be set.
* \param[in] values Non-zero values to report in the matrix.
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*/
void SetValuesRow(PetscInt row_index,
const PetscScalar* values,
......@@ -380,8 +372,7 @@ namespace HappyHeart
* \param[in] column_index Index of the column which value will be set.
* \param[in] value Value to put in the matrix.
* \param [in] insertOrAppend Petsc ADD_VALUES or INSERT_VALUES (see Petsc documentation).
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*/
void SetValue(PetscInt row_index,
PetscInt column_index,
......@@ -399,8 +390,9 @@ namespace HappyHeart
* \param[in] row_index Program-wise index of the row. The row MUST be
* one of the row handled by the current processor.
* \param[in] column_index Program-wise index of the column.
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*
* \return Value of the chosen element in the matrix.
*/
PetscScalar GetValue(PetscInt row_index, PetscInt column_index,
const char* invoking_file, int invoking_line) const;
......@@ -414,8 +406,7 @@ namespace HappyHeart
*
* \param[in] row_index Program-wise index of the row. The row MUST be
* one of the row handled by the current processor.
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
* \param[out] row_content_position_list Position of the non-zero values in the row.
* \param[out] row_content_value_list Values of non-zero values in the row. This container is the same
* size as \a row_content_position
......@@ -436,8 +427,7 @@ namespace HappyHeart
*
* \param[in] row_index Program-wise index of the row. The row MUST be
* one of the row handled by the current processor.
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
* \param[out] row_content Key is position of the non-zero values, value the actual value.
* \todo At the moment row_content is allocated each time; it might be useful not to do this... But this
* means structure has to be kept for each line of the matrix considered.
......@@ -452,8 +442,7 @@ namespace HappyHeart
* \brief Wrapper over MatView.
*
* \copydetails doxygen_hide_mpi_param
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*/
void View(const Mpi& mpi, const char* invoking_file, int invoking_line) const;
......@@ -461,12 +450,12 @@ namespace HappyHeart
/*!
* \brief Wrapper over MatView in the case the viewer is a file.
*
* \copydoc doxygen_hide_mpi_param
* \param[in] format Format in which the matrix is written. See Petsc manual pages to get all the
* formats available; relevant ones so far are PETSC_VIEWER_DEFAULT and PETSC_VIEWER_ASCII_MATLAB.
* \copydetails doxygen_hide_mpi_param
* \param[in] output_file File into which the vector content will be written.
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*/
void View(const Mpi& mpi, const std::string& output_file, const char* invoking_file, int invoking_line,
PetscViewerFormat format = PETSC_VIEWER_DEFAULT) const;
......@@ -476,8 +465,8 @@ namespace HappyHeart
* \brief Wrapper over MatView in the case the viewer is a binary file.
*
* \param[in] output_file File into which the vector content will be written.
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
* \copydoc doxygen_hide_mpi_param
*/
void ViewBinary(const Mpi& mpi,
const std::string& output_file,
......@@ -487,7 +476,10 @@ namespace HappyHeart
/*!
* \brief Wrapper over MatNorm.
*
* Available norms are NORM_1, NORM_FROBENIUS and NORM_INFINITY.
* \param[in] type Type of norm. Available norms are NORM_1, NORM_FROBENIUS and NORM_INFINITY.
* \copydoc doxygen_hide_invoking_file_and_line
*
* \return Norm of the vector of the chose \a type.
*/
double Norm(NormType type, const char* invoking_file, int invoking_line) const;
......@@ -508,14 +500,25 @@ namespace HappyHeart
*/
bool do_petsc_destroy_;
// ============================
//! \cond IGNORE_BLOCK_IN_DOXYGEN
//! Friendship.
// ============================
friend void Swap(Matrix& A, Matrix& B);
// ============================
//! \endcond IGNORE_BLOCK_IN_DOXYGEN
// ============================
};
/*!
* \brief Swap two matrices.
*/
//! Swap two matrices.
void Swap(Matrix& A, Matrix& B);
......
......@@ -79,15 +79,18 @@ namespace HappyHeart
* \brief Wrapper over MatAXPY, that performs Y = a * X + Y.
*
*
* \tparam[in] NonZeroPatternT This value indicates the level of similarity between X and Y non zero patterns.
* \tparam NonZeroPatternT This value indicates the level of similarity between X and Y non zero patterns.
* \warning Beware: if X and Y aren't following the same pattern, 'Same' won't yield what
* you expect! In the case you're considering adding a part computed by a transfert matrix, you should
* use 'Subset'. In HappyHeart, I advise you to call in debug mode AssertSameNumberingSubset()
* (defined in Core) just before or after the function call; if the assert is raised it means you can't
* use 'Same'. \todo This could be enforced by a proper overload (but it mix Utilities and Core
* libraries...), but for the time being the separate assert will do.
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
*
* \param[in] a See formula above.
* \param[in] X See formula above.
* \param[in] Y See formula above.
*/
template
<
......@@ -110,13 +113,17 @@ namespace HappyHeart
/*!
* \brief Wrapper over MatMult, that performs v2 = matrix * v1.
*
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
* \param[in] matrix See formula above.
* \param[in] v1 See formula above.
* \param[in] v2 See formula above.
* \copydoc doxygen_hide_do_update_ghost_arg
*/
template<class MatrixT>
std::enable_if_t<std::is_base_of<Private::BaseMatrix, MatrixT>::value, void>
MatMult(const MatrixT& matrix, const Vector& v1, Vector& v2,
MatMult(const MatrixT& matrix,
const Vector& v1,
Vector& v2,
const char* invoking_file, int invoking_line,
update_ghost do_update_ghost = update_ghost::yes);
......@@ -124,13 +131,19 @@ namespace HappyHeart
/*!
* \brief Wrapper over MatMultAdd, that performs v3 = v2 + matrix * v1.
*
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
* \param[in] matrix See formula above.
* \param[in] v1 See formula above.
* \param[in] v2 See formula above.
* \param[in] v3 See formula above.
* \copydoc doxygen_hide_do_update_ghost_arg
*/
template<class MatrixT>
std::enable_if_t<std::is_base_of<Private::BaseMatrix, MatrixT>::value, void>
MatMultAdd(const MatrixT& matrix, const Vector& v1, const Vector& v2, Vector& v3,
MatMultAdd(const MatrixT& matrix,
const Vector& v1,
const Vector& v2,
Vector& v3,
const char* invoking_file, int invoking_line,
update_ghost do_update_ghost = update_ghost::yes);
......@@ -139,13 +152,17 @@ namespace HappyHeart
/*!
* \brief Wrapper over MatMultTranspose, that performs v2 = transpose(matrix) * v1.
*
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
* \copydoc doxygen_hide_do_update_ghost_arg
* \param[in] matrix See formula above.
* \param[in] v1 See formula above.
* \param[in] v2 See formula above.
*/
template<class MatrixT>
std::enable_if_t<std::is_base_of<Private::BaseMatrix, MatrixT>::value, void>
MatMultTranspose(const MatrixT& matrix, const Vector& v1, Vector& v2,
MatMultTranspose(const MatrixT& matrix,
const Vector& v1,
Vector& v2,
const char* invoking_file, int invoking_line,
update_ghost do_update_ghost = update_ghost::yes);
......@@ -153,13 +170,19 @@ namespace HappyHeart
/*!
* \brief Wrapper over MatMultTransposeAdd, that performs v3 = v2 + transpose(matrix) * v1.
*
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
* \param[in] invoking_line File that invoked the function or class; usually __LINE__.
* \copydoc doxygen_hide_invoking_file_and_line
* \copydoc doxygen_hide_do_update_ghost_arg
* \param[in] matrix See formula above.
* \param[in] v1 See formula above.
* \param[in] v2 See formula above.
* \param[in] v3 See formula above.
*/
template<class MatrixT>
std::enable_if_t<std::is_base_of<Private::BaseMatrix, MatrixT>::value, void>
MatMultTransposeAdd(const MatrixT& matrix, const Vector& v1, const Vector& v2, Vector& v3,
MatMultTransposeAdd(const MatrixT& matrix,
const Vector& v1,
const Vector& v2,
Vector& v3,
const char* invoking_file, int invoking_line,
update_ghost do_update_ghost = update_ghost::yes);
......@@ -186,7 +209,7 @@ namespace HappyHeart
/*!
* \brief Wrapper over MatMatMult, that performs C = A * B.