//	general header for all functions in directory

#pragma once

#include <mpi.h>
#include <vector>

/**	Debug and print the vector with MPI, you can choose the process which should present its values
	@param[in]	x	vector to print
	@param[in]	icomm	the MPI process group that is used.
*/
void vecdebug(std::vector<double> const & x, const MPI_Comm &icomm);

/**	Calculate the scalar product of two vectors (MPI)
	@param[in]	x	vector
	@param[in]	y	vector
	@param[in]	icomm	the MPI process group that is used.
	@return sum		euclidean scalar product
*/
double par_scalar(std::vector<double> const & x, std::vector<double> const & y, const MPI_Comm &icomm);


/**	Determine min and max value of the vector and exchanging those two values
	@param[in,out]	x	vector
	@param[in,out]	min_val
	@param[in,out]	max_val
	@param[in]	icomm	the MPI process group that is used.
*/
void min_max_exch(std::vector<double> &x, double &min_val, double &max_val, const MPI_Comm &icomm);


