Ejemplo n.º 1
0
void
Quad10_2D_SUPG :: computeGradUMatrix(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep)
{
    FloatArray dnx(4), dny(4), u, u1(4), u2(4);
    FloatMatrix dn;

    answer.resize(2, 2);
    answer.zero();

    this->computeVectorOfVelocities(VM_Total, tStep, u);

    velocityInterpolation.evaldNdx( dn, gp->giveNaturalCoordinates(), FEIElementGeometryWrapper(this) );
    for ( int i = 1; i <= 4; i++ ) {
        dnx.at(i) = dn.at(i, 1);
        dny.at(i) = dn.at(i, 2);

        u1.at(i) = u.at(2 * i - 1);
        u2.at(i) = u.at(2 * i);
    }


    answer.at(1, 1) =  u1.dotProduct(dnx);
    answer.at(1, 2) =  u1.dotProduct(dny);
    answer.at(2, 1) =  u2.dotProduct(dnx);
    answer.at(2, 2) =  u2.dotProduct(dny);
}
Ejemplo n.º 2
0
int main(void)
{
	cpu_init();

#if defined(CONFIG_INTERRUPT_MODE)
	interrupt_init();
#endif

	soc_init();
	board_early_init();
	gpio_init();

#if defined(CONFIG_TIMER)
	timer_init();
#endif

#if defined(CONFIG_USB)
	usb_init();
#endif

#if defined(CONFIG_SERIAL)
	serial_init();
#endif


#if defined(CONFIG_DNX)
	dnx();
#endif

#if defined(CONFIG_HARDWARE_CHARGING)
	hardware_charging_init();
	hardware_charging();
#endif

#if defined(CONFIG_PANIC)
	panic_dump();
#endif

	early_fixup();
	early_sign_of_life();

#if defined(CONFIG_RTC)
	rtc_init();
#endif

#if defined(CONFIG_WATCHDOG)
	watchdog_init();
#endif

#if defined(CONFIG_SPI)
	spi_init();
#endif

#if defined(CONFIG_I2C)
	i2c_init();
#endif

	board_misc_init();

	late_fixup();
	late_sign_of_life();
	board_late_init();
	boot_logic();

#if defined(CONFIG_GPIO_TST)
	gpio_tst();
#endif

	while (1) ;

	return 0;
}