29 _is_accel_solve(false),
30 _initial_accel_set(false)
68 std::unique_ptr<NumericVector<Number>> new_solution_rate = nonlinear_solution.
clone();
69 (*new_solution_rate) -= old_nonlinear_soln;
77 std::unique_ptr<NumericVector<Number>> new_solution_accel =
old_solution_accel.clone();
78 (*new_solution_accel) *= -(1.0/(2.0*
_beta)-1.0);
103 libmesh_not_implemented();
153 std::string error =
"ERROR: Must first set initial acceleration using one of:\n";
154 error +=
"NewmarkSolver::compute_initial_accel()\n";
155 error +=
"NewmarkSolver::project_initial_accel()\n";
156 libmesh_error_msg(error);
209 ResFuncType time_deriv,
210 ResFuncType constraint,
211 ReinitFuncType reinit_func)
221 for (
unsigned int i=0; i != n_dofs; ++i)
222 old_elem_solution_rate(i) =
236 for (
unsigned int i=0; i != n_dofs; ++i)
237 old_elem_solution(i) =
259 request_jacobian =
false;
265 if (request_jacobian)
270 for (
unsigned int i=0; i != n_dofs; ++i)
271 old_elem_solution(i) =
276 for (
unsigned int i=0; i != n_dofs; ++i)
277 old_elem_solution_accel(i) =
312 (context.*reinit_func)(1.);
320 bool jacobian_computed = (
_system.
get_physics()->*time_deriv)(request_jacobian, context);
331 jacobian_computed = (
_system.
get_physics()->*constraint)(jacobian_computed, context) &&
335 if (request_jacobian)
337 if (jacobian_computed)
343 return jacobian_computed;
virtual unsigned int size() const override
virtual bool element_residual(bool request_jacobian, DiffContext &) override
virtual bool side_constraint(bool request_jacobian, DiffContext &)
const DenseMatrix< Number > & get_elem_jacobian() const
Number old_solution_accel(const dof_id_type global_dof_number) const
void swap(DenseMatrix< T > &other_matrix)
boostcopy::enable_if_c< ScalarTraits< T2 >::value, void >::type add(const T2 factor, const DenseVector< T3 > &vec)
std::unique_ptr< DiffSolver > _diff_solver
const DenseVector< Number > & get_elem_fixed_solution() const
const DenseVector< Number > & get_elem_solution_rate() const
virtual bool side_damping_residual(bool request_jacobian, DiffContext &)
Number old_nonlinear_solution(const dof_id_type global_dof_number) const
virtual bool side_residual(bool request_jacobian, DiffContext &) override
virtual std::unique_ptr< NumericVector< T > > clone() const =0
virtual bool nonlocal_time_derivative(bool request_jacobian, DiffContext &)
virtual bool damping_residual(bool request_jacobian, DiffContext &)
std::unique_ptr< NumericVector< Number > > _old_local_solution_accel
virtual bool nonlocal_constraint(bool request_jacobian, DiffContext &)
virtual void elem_reinit(Real)
bool _eulerian_time_deriv(bool request_jacobian, DiffContext &)
virtual void compute_initial_accel()
virtual bool mass_residual(bool request_jacobian, DiffContext &)
NewmarkSolver(sys_type &s)
virtual bool _general_residual(bool request_jacobian, DiffContext &, ResFuncType mass, ResFuncType damping, ResFuncType time_deriv, ResFuncType constraint, ReinitFuncType reinit)
Real elem_solution_rate_derivative
const DenseVector< Number > & get_elem_solution() const
const NumericVector< Number > & get_vector(const std::string &vec_name) const
std::unique_ptr< NumericVector< Number > > solution
Real elem_solution_derivative
void set_initial_accel_avail(bool initial_accel_set)
const std::vector< dof_id_type > & get_dof_indices() const
virtual void advance_timestep() override
Number old_solution_rate(const dof_id_type global_dof_number) const
virtual bool nonlocal_residual(bool request_jacobian, DiffContext &) override
virtual void solve() override
const DifferentiablePhysics * get_physics() const
virtual void advance_timestep() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void elem_side_reinit(Real)
virtual bool nonlocal_damping_residual(bool request_jacobian, DiffContext &)
virtual bool nonlocal_mass_residual(bool request_jacobian, DiffContext &c)
const DenseVector< Number > & get_elem_solution_accel() const
virtual Real error_order() const override
void project_vector(NumericVector< Number > &new_vector, FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr, int is_adjoint=-1) const
virtual void solve() override
virtual bool side_mass_residual(bool request_jacobian, DiffContext &)
std::unique_ptr< NumericVector< Number > > _old_local_solution_rate
virtual void add(const numeric_index_type i, const T value)=0
virtual bool side_time_derivative(bool request_jacobian, DiffContext &)
virtual bool element_constraint(bool request_jacobian, DiffContext &)
const DofMap & get_dof_map() const
Real elem_solution_accel_derivative
const std::vector< dof_id_type > & get_send_list() const
virtual void adjoint_advance_timestep() override
void project_initial_accel(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr)
virtual void nonlocal_reinit(Real)