32#ifndef LEENEWMARKFULL_H
33#define LEENEWMARKFULL_H
54 std::vector<Mode> damping_mode;
57 const triplet_form<double, uword> rabbit;
58 const triplet_form<double, uword> current_stiffness;
59 const triplet_form<double, uword> current_mass;
61 const bool build_graph =
false;
62 mutable sp_mat stiffness_graph, mass_graph;
64 using index_tm =
decltype(current_mass)::index_type;
65 using index_ts =
decltype(current_stiffness)::index_type;
67 [[nodiscard]] uword get_amplifier()
const;
68 [[nodiscard]] uword get_total_size()
const override;
70 void update_stiffness()
const override;
71 void update_residual()
const override;
73 void assemble_mass(uword, uword,
double)
const;
74 void assemble_stiffness(uword, uword,
double)
const;
75 void assemble_mass(
const std::vector<uword>&,
const std::vector<uword>&,
const std::vector<double>&)
const;
76 void assemble_stiffness(
const std::vector<uword>&,
const std::vector<uword>&,
const std::vector<double>&)
const;
78 template<sp_d in_dt, sp_i in_it>
void assemble(sp_mat&,
const triplet_form<in_dt, in_it>&, uword, uword,
double)
const;
80 void formulate_block(uword&,
double,
double,
int)
const;
81 void formulate_block(uword&,
const std::vector<double>&,
const std::vector<double>&,
const std::vector<int>&)
const;
82 void assemble_by_mode_zero(uword&,
double,
double)
const;
83 void assemble_by_mode_one(uword&,
double,
double,
int)
const;
84 void assemble_by_mode_two(uword&,
double,
double,
int,
int)
const;
85 void assemble_by_mode_three(uword&,
double,
double,
double)
const;
86 void assemble_by_mode_four(uword&,
double,
double,
int,
int,
int,
int,
double)
const;
96 void print()
override;
99template<sp_d in_dt, sp_i in_it>
void LeeNewmarkFull::assemble(sp_mat& graph,
const triplet_form<in_dt, in_it>& in_mat,
const uword row_shift,
const uword col_shift,
const double scalar)
const {
100 stiffness->triplet_mat.assemble(in_mat, row_shift, col_shift, scalar);
102 if(build_graph) graph(row_shift /
n_block, col_shift /
n_block) += scalar;
A LeeNewmarkBase class defines a solver using Newmark algorithm with Lee damping model.
Definition LeeNewmarkBase.h:36
const uword n_block
Definition LeeNewmarkBase.h:45
unique_ptr< MetaMat< double > > stiffness
Definition LeeNewmarkBase.h:57
StiffnessType
Definition LeeNewmarkBase.h:38
A LeeNewmarkFull class defines a solver using Newmark algorithm with Lee damping model.
Definition LeeNewmarkFull.h:37
void print() override
Definition LeeNewmarkFull.cpp:527
int initialize() override
Definition LeeNewmarkFull.cpp:349
int process_constraint() override
Definition LeeNewmarkFull.cpp:363
int process_constraint_resistance() override
Definition LeeNewmarkFull.cpp:514
LeeNewmarkFull(unsigned, std::vector< Mode > &&, double, double, StiffnessType)
Definition LeeNewmarkFull.cpp:322
Type
Definition LeeNewmarkFull.h:39
Definition LeeNewmarkFull.h:47
vec p
Definition LeeNewmarkFull.h:49
double zeta
Definition LeeNewmarkFull.h:50
double omega
Definition LeeNewmarkFull.h:50
Type t
Definition LeeNewmarkFull.h:48