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));
28 std::vector<int> & phase){
37 double psi, phi, w, arg;
39 Epetra_SerialDenseVector vector_x(3);
41 Epetra_SerialDenseMatrix matrix_X(3,Mesh.
el_type);
43 double crotation = std::cos(
rotation);
44 double srotation = std::sin(
rotation);
48 for (
int il=0; il<32; ++il){
60 ti = tau_beta<int>(
i);
63 tj = tau_beta<int>(
j);
69 w = std::sqrt(-std::log(psi));
70 k1 = (M_PI/
l1)*ti*c + (M_PI/
l2)*tj*
s;
71 k2 = (M_PI/
l2)*tj*c - (M_PI/
l1)*ti*
s;
73 for (
int e_lid=il; e_lid<n_local_cells; e_lid++){
76 for (
unsigned inode=0; inode<Mesh.
el_type; ++inode){
82 for (
int gp=0; gp<n_gauss_cells; ++gp){
95 vector_x.Multiply(
'N',
'N',1.0,matrix_X,shape_functions,0.0);
97 arg = 2.0*M_PI*phi + k1*vector_x(0) + k2*vector_x(1);
98 v(e_lid*n_gauss_cells+gp) += std::sqrt(2.0*si*sj)*w*std::cos(arg);
116 double psi, phi, w, arg;
118 Epetra_SerialDenseVector vector_x(2);
120 Epetra_SerialDenseMatrix matrix_X(2,Mesh.
el_type);
134 for (
int il=0; il<32; ++il){
136 ti = tau_beta<int>(
i);
139 tj = tau_beta<int>(
j);
144 w = std::sqrt(-std::log(psi));
145 for (
int e_lid=0; e_lid<n_local_cells; ++e_lid){
147 if(phase[e_gid]==il){
148 for (
unsigned inode=0; inode<Mesh.
el_type; ++inode){
153 vector_x.Multiply(
'N',
'N',1.0,matrix_X,shape_functions,0.0);
154 arg = 2.0*M_PI*phi + (M_PI/
l1)*ti*vector_x(0) + (M_PI/
l2)*tj*vector_x(1);
155 v(e_lid) += std::sqrt(2.0*si*sj)*w*std::cos(arg);
166 for (
unsigned int i=0;
i<V.MyLength(); ++
i){
167 double erfx = boost::math::erf<double>(V[
i]/std::sqrt(2.0));
168 double y = (1.0/2.0)*(1.0 + erfx);
169 double yinv = boost::math::gamma_p_inv<double,double>(alpha,y);
175 for (
unsigned int i=0;
i<V.MyLength(); ++
i){
176 double erfx = boost::math::erf<double>(V[
i]/std::sqrt(2.0));
177 double y = (1.0/2.0)*(1.0 + erfx);
178 B[
i] = boost::math::ibeta_inv<double,double,double>(tau1,tau2,y);
void shape_functions(Epetra_SerialDenseVector &N, double &xi, double &eta, double &zeta)
std::vector< double > nodes_coord
void generator_one_gauss_point(Epetra_SerialDenseVector &v, mesh &Mesh, std::vector< int > &phase, double &xi, double &eta, double &zeta)
boost::random::mt19937 rng
void icdf_beta(Epetra_Vector &V, Epetra_Vector &B, double &tau1, double &tau2)
Epetra_SerialDenseVector eta_cells
Epetra_SerialDenseVector xi_cells
void generator_gauss_points(Epetra_SerialDenseVector &v, mesh &Mesh, std::vector< int > &phase)
std::vector< int > local_cells
void shape_functions(Epetra_SerialDenseVector &N, double &xi, double &eta, double &zeta)
std::vector< int > cells_nodes
double tau_beta(typearg &beta)
double s_tau(double &tau)
void shape_functions(Epetra_SerialDenseVector &N, double &xi, double &eta)
unsigned int n_gauss_cells
~shinozuka_layeredcomp_2d()
boost::random::uniform_real_distribution psi_
void icdf_gamma(Epetra_Vector &V, Epetra_Vector &G, double &alpha, double &beta)
Epetra_SerialDenseVector zeta_cells
shinozuka_layeredcomp_2d(int &nu)
boost::random::uniform_real_distribution phi_
void shape_functions(Epetra_SerialDenseVector &N, double &xi, double &eta, double &zeta)