9 psi_(0.0,1.0), phi_(0.0,1.0), order(nu), l1(length_x), l2(length_y){
15 template<
typename typearg>
17 double tau = -1.0 + (2.0*double(beta)-1.0)/double(
order);
22 double s = (2.0/double(
order))*(1.0-fabs(tau));
36 double psi, phi, w, arg;
40 ti = tau_beta<int>(
i);
44 tj = tau_beta<int>(
j);
49 w = std::sqrt(-std::log(psi));
54 for (
int inode=0; inode<v.MyLength(); ++inode){
62 arg = 2.0*M_PI*phi + (M_PI/
l1)*ti*(x*c - y*s) + (M_PI/
l2)*tj*(x*s + y*c);
63 v[inode] += std::sqrt(2.0*si*sj)*w*std::cos(arg);
72 for (
unsigned int i=0;
i<V.MyLength(); ++
i){
73 double erfx = boost::math::erf<double>(V[
i]/std::sqrt(2.0));
74 double y = (1.0/2.0)*(1.0 + erfx);
75 double yinv = boost::math::gamma_p_inv<double,double>(alpha,y);
81 for (
unsigned int i=0;
i<V.MyLength(); ++
i){
82 double erfx = boost::math::erf<double>(V[
i]/std::sqrt(2.0));
83 double y = (1.0/2.0)*(1.0 + erfx);
84 B[
i] = boost::math::ibeta_inv<double,double,double>(tau1,tau2,y);
double s_tau(double &tau)
double tau_beta(typearg &beta)
std::vector< double > nodes_coord
void icdf_gamma(Epetra_Vector &V, Epetra_Vector &G, double &alpha, double &beta)
boost::random::uniform_real_distribution psi_
void icdf_beta(Epetra_Vector &V, Epetra_Vector &B, double &tau1, double &tau2)
void generator(Epetra_Vector &v, mesh &Mesh)
boost::random::mt19937 rng
std::vector< int > local_nodes_without_ghosts
boost::random::uniform_real_distribution phi_