void DRMLoadPattern::applyLoad(double time) { DRMBoundaryLayerDecorator *myDecorator = new DRMBoundaryLayerDecorator(); myDecorator->setDomain(this->getDomain()); Vector U(24); Vector Ud(24); Vector Udd(24); Vector load(24); U.Zero(); Ud.Zero(); Udd.Zero(); load.Zero(); myDecorator->setMap(this->eNodes); for(std::map<int,Element*>::iterator pos=this->elem.begin(); pos!=this->elem.end(); pos++) { int eleTag = pos->first; Element* ele = (Element*) pos->second; if (ele != 0) { U.Zero(); Ud.Zero(); Udd.Zero(); load.Zero(); myDecorator->setBrick(ele); this->myHandler->getMotions(ele, time, U, Ud, Udd); myDecorator->applyDRMLoad(this->factor,load, U, Ud, Udd); } } delete myDecorator; }
/// The OS equation void residual_fn( const DenseVector<D_complex> &z, DenseVector<D_complex> &g ) const { // define the equation as 5 1st order equations g[ phi ] = z[ phid ]; g[ phid ] = z[ psi ] + alpha * alpha * z[ phi ]; g[ psi ] = z[ psid ]; g[ psid ] = alpha * alpha * z[ psi ] + D_complex( 0.0, 1.0 ) * alpha * Re * ( U( coord(0) ) * z[ psi ] - Udd( coord(0) ) * z[ phi ] ) - D_complex( 0.0, 1.0 ) * alpha * Re * z[ eval ] * z[ psi ]; g[ eval ] = 0.0; }