1 #include <lifev/core/fem/Newmark.hpp> 20 M_old_state.reset(
new vector_Type ( *state, Unique ) );
21 M_old_first_derivative.reset(
new vector_Type ( *first_derivative, Unique ) );
22 M_old_second_derivative.reset(
new vector_Type ( *second_derivative, Unique ) );
25 M_old_first_derivative->zero();
26 M_old_second_derivative->zero();
29 M_current_state.reset(
new vector_Type ( *state, Unique ) );
30 M_current_first_derivative.reset(
new vector_Type ( *first_derivative, Unique ) );
31 M_current_second_derivative.reset(
new vector_Type ( *second_derivative, Unique ) );
33 M_current_state->zero();
34 M_current_first_derivative->zero();
35 M_current_second_derivative->zero();
38 M_csi.reset(
new vector_Type ( *state, Unique ) );
44 ASSERT( M_beta != 0.0,
"Beta coefficient has not been set in Newmark");
46 ASSERT( M_timeStep != 0.0,
"Beta coefficient has not been set in Newmark");
50 *M_csi = ( ( ( 1.0/(M_timeStep*M_timeStep*M_beta) ) * ( *M_old_state ) ) +
51 ( ( 1.0/(M_timeStep*M_beta) ) * ( *M_old_first_derivative ) ) +
52 ( ( (1.0 - 2.0 * M_beta)/(2.0 * M_beta) ) * (*M_old_second_derivative) ) );
59 M_current_state->zero();
61 *M_current_state = *state;
63 ASSERT( M_beta != 0.0,
"Beta coefficient has not been set in Newmark");
65 ASSERT( M_gamma != 0.0,
"Gamma coefficient has not been set in Newmark");
67 ASSERT( M_timeStep != 0.0,
"Timestep has not been set in Newmark");
69 M_current_first_derivative->zero();
71 M_current_second_derivative->zero();
73 *M_current_second_derivative = ( ( 1.0/(M_timeStep*M_timeStep*M_beta) * (*M_current_state) ) - *M_csi );
75 *M_current_first_derivative = ( (*M_old_first_derivative) +
76 ( M_timeStep * M_gamma * (*M_current_second_derivative) ) +
77 ( M_timeStep * ( 1.0 - M_gamma ) * (*M_old_second_derivative) ) );
81 *M_old_state = *M_current_state;
83 *M_old_first_derivative = *M_current_first_derivative;
85 *M_old_second_derivative = *M_current_second_derivative;
94 M_old_state.reset(
new vector_Type ( *state, Unique ) );
95 M_old_first_derivative.reset(
new vector_Type ( *first_derivative, Unique ) );
96 M_old_second_derivative.reset(
new vector_Type ( *second_derivative, Unique ) );
99 M_current_state.reset(
new vector_Type ( *state, Unique ) );
100 M_current_first_derivative.reset(
new vector_Type ( *first_derivative, Unique ) );
101 M_current_second_derivative.reset(
new vector_Type ( *second_derivative, Unique ) );
103 M_current_state->zero();
104 M_current_first_derivative->zero();
105 M_current_second_derivative->zero();
108 M_csi.reset(
new vector_Type ( *state, Unique ) );
void restart(const vectorPtr_Type &state, const vectorPtr_Type &first_derivative, const vectorPtr_Type &second_derivative)
void shift(const vectorPtr_Type &state)
void updateInverseJacobian(const UInt &iQuadPt)
void initialize(const vectorPtr_Type &state, const vectorPtr_Type &first_derivative, const vectorPtr_Type &second_derivative)
std::shared_ptr< vector_Type > vectorPtr_Type