void Rectangle8::set_parameters() { ndime=2; nnode=8; ngauss=9; xi.resize(ndime,ngauss); xi(0,0) = -0.7745966692; xi(1,0) = xi(0,0); xi(0,1) = 0.0; xi(1,1) = xi(0,0); xi(0,2) = -xi(0,0); xi(1,2) = xi(0,0); xi(0,3) = xi(0,0); xi(1,3) = 0.0; xi(0,4) = 0.0; xi(1,4) = 0.0; xi(0,5) = -xi(0,0); xi(1,5) = 0.0; xi(0,6) = xi(0,0); xi(1,6) = -xi(0,0); xi(0,7) = 0.; xi(1,7) = -xi(0,0); xi(0,8) = -xi(0,0); xi(1,8) = -xi(0,0); set_derivatives(); celltype = 23; }
df1_one_variable inv(const df1_one_variable& x) { df1_one_variable z; double xinv=1.0/(*x.get_u()); *z.get_u()=xinv; double zp=-xinv*xinv; set_derivatives(z,x,xinv,zp); return z; }
df1_one_variable exp(const df1_one_variable& x) { df1_one_variable z; double u=::exp(*x.get_u()); *z.get_u()=u; double zp=u; set_derivatives(z,x,u,zp); return z; }
df1_one_variable log(const df1_one_variable& x) { df1_one_variable z; double u=::log(*x.get_u()); *z.get_u()=u; double zp=1/(*x.get_u()); set_derivatives(z,x,u,zp); return z; }
df1_one_variable sin(const df1_one_variable& x) { df1_one_variable z; double u=::sin(*x.get_u()); *z.get_u()=u; double zp=::cos(*x.get_u()); set_derivatives(z,x,u,zp); return z; }
df1_one_variable square(const df1_one_variable& x) { df1_one_variable z; double u=value(x); *z.get_u()=u*u; double zp=2.0*u; set_derivatives(z,x,u,zp); return z; }
/** * Description not yet available. * \param */ df1_two_variable operator * (const df1_two_variable& x, const df1_two_variable& y) { df1_two_variable z; double u= *x.get_u() * *y.get_u(); *z.get_u() = u; double f_u=*y.get_u(); double f_v=*x.get_u(); set_derivatives(z,x,y,u, f_u, f_v); return z; }
df1_one_variable sqrt(const df1_one_variable& x) { df1_one_variable z; double u=::sqrt(*x.get_u()); *z.get_u()=u; //double xinv=1.0/(*x.get_u()); double zp=0.5/u; set_derivatives(z,x,u,zp); return z; }
df1_one_variable tan(const df1_one_variable& x) { df1_one_variable z; double u=::tan(*x.get_u()); *z.get_u()=u; double v=1.0/::cos(*x.get_u()); //double w=::sin(*x.get_u()); double v2=v*v; double zp=v2; set_derivatives(z,x,u,zp); return z; }
df1_one_variable atan(const df1_one_variable& x) { df1_one_variable z; double cx=value(x); double d=1.0/(1+square(cx)); //double d2=square(d); double u=::atan(cx); *z.get_u()=u; double zp=d; set_derivatives(z,x,u,zp); return z; }