void CWsRootWindow::SetSystemFaded(TBool aFaded, TUint8 aBlackMap, TUint8 aWhiteMap) { WS_ASSERT_DEBUG(Screen(),EWsPanicNoScreen); TBool stateChanged = EFalse; //will be set to true if one or more windows change fade state. for(CWsWindowGroup* win=Child();win!=NULL;win=win->NextSibling()) { TWalkWindowTreeSetSystemFaded wwt(aFaded, win, aBlackMap, aWhiteMap, stateChanged); win->WalkWindowTree(wwt,EWalkChildren); } MWsWindowTreeObserver* windowTreeObserver = Screen()->WindowTreeObserver(); if(windowTreeObserver && stateChanged) { windowTreeObserver->FadeAllChildren(*this, aFaded); } }
/** MWsWindow */ MWsWindow * CWsWindow::FindChildByHandle(TUint32 aHandle) { TWalkWindowTreeFindByHandle wwt(aHandle); WalkWindowTree(wwt, EWalkChildren); return wwt.Found(); }
//********************************************************************** void IsotropicPlaneStressWrinkling::CalculateCauchyStresses( Vector& Cauchy_StressVector, const Matrix& F, const Vector& PK2_StressVector, const Vector& GreenLagrangeStrainVector) { //compute effective thickness variation Vector EffectiveStrain = GreenLagrangeStrainVector; Matrix Feff(2,2); if (MathUtils<double>::Norm3(mEw) != 0) { EffectiveStrain += mEw; //double emin=0.00; double emax=0.00; Vector vmin; Vector vmax; Matrix Finv(2,2); double Fdet; MathUtils<double>::InvertMatrix2(F,Finv,Fdet); Matrix wwt(2,2); Matrix Ewrink(2,2); Ewrink(0,0) = mEw[0]; Ewrink(0,1) = mEw[2]*0.5; Ewrink(1,0) = mEw[2]*0.5; Ewrink(1,1) = mEw[1]; noalias(wwt) = prod( Ewrink, trans(Finv) ); wwt = prod(Finv, wwt); std::cout << "oribbbbbbbbbile" << std::endl; // noalias(wwt) = prod( Finv, prod( Ewrink, trans(Finv) ) ); std::cout << "efficiency" << std::endl; // noalias(wwt) = prod( Finv, prod<Matrix>(Ewrink,trans(Finv)) ); // Matrix::MatMulAndAdd_B_D_Btrans(wwt,Finv,Ewrink); double alpha = fabs(wwt(0,0) + wwt(1,1)); wwt /= alpha; double beta = -1.00 + sqrt(2*alpha+1.00); noalias(Feff) = prod(wwt,F); //Matrix::MatMul(Feff,wwt,F); Feff *= beta; Feff += F; } else { Feff = F; } double epsz = ((mNU)/(1-mNU))*(EffectiveStrain[0] + EffectiveStrain[1]); double h_h0_ratio = sqrt(1-2.00*epsz); double DetF = MathUtils<double>::Det2(Feff); Matrix S(2,2); S(0,0) = PK2_StressVector[0]; S(0,1) = PK2_StressVector[2]; S(1,0) = PK2_StressVector[2]; S(1,1) = PK2_StressVector[1]; Matrix s(2,2); noalias(s) = prod(Feff, Matrix(prod(S, trans(Feff)) ) ); std::cout << "efficienza!!" << std::endl; // noalias(s) = prod(Feff, prod<Matrix>(S, trans(Feff) ) ); // Matrix::MatMulAndAdd_B_D_Btrans(s,Feff,S); //s = F*S*Ftrans Cauchy_StressVector[0] = s(0,0); Cauchy_StressVector[1] = s(1,1); Cauchy_StressVector[2] = s(0,1); Cauchy_StressVector /= DetF * h_h0_ratio; }