28 #include "libmesh/dof_map.h" 33 _initialized (false) {
40 std::map<const libMesh::Node*, const MAST::KinematicCouplingConstraint*>::const_iterator
44 for ( ; it != end; it++)
53 (
const std::vector<std::pair<
const libMesh::Node*, std::set<const libMesh::Node*>>>& couplings,
54 bool constrain_rotations) {
56 for (
unsigned int i=0; i<couplings.size(); i++)
66 const libMesh::Node& slave,
67 bool constrain_rotations) {
89 std::vector<std::tuple<libMesh::dof_id_type, libMesh::DofConstraintRow, Real>>
94 std::vector<std::tuple<libMesh::dof_id_type, libMesh::DofConstraintRow, Real>>::iterator
98 for ( ; it != end; it++)
99 dof_map.add_constraint_row(std::get<0>(*it), std::get<1>(*it), std::get<2>(*it),
true);
106 (std::vector<std::tuple<libMesh::dof_id_type, libMesh::DofConstraintRow, Real>>& constrs) {
111 std::map<const libMesh::Node*, const MAST::KinematicCouplingConstraint*>::const_iterator
118 for ( ; it != end; it++)
119 idx += it->second->n_constrain_nodes();
121 constrs.reserve(idx);
125 for ( ; it != end; it++) {
127 std::vector<std::tuple<libMesh::dof_id_type, libMesh::DofConstraintRow, Real>>
130 it->second->get_dof_constraint_row(constraints);
132 for (
unsigned int i=0; i<constraints.size(); i++)
133 constrs.push_back(constraints[i]);
136 libmesh_assert_equal_to(constrs.size(), idx);
MAST::NonlinearSystem & system()
std::map< const libMesh::Node *, const MAST::KinematicCouplingConstraint * > _slave_node_constraints
virtual ~KinematicCoupling()
void add_dof_constraints_to_dof_map()
initializes the dof constraint rows in the DofMap object associated with the system.
This object stores the information about the coupling of nodes.
void add_master_and_slave(const std::set< const libMesh::Node * > &master, const libMesh::Node &slave, bool constrain_rotations)
Constrain the slave node to the specified set of master nodes.
MAST::SystemInitialization & _system_init
This provides a base class to couple degrees-of-freedom within a single system.
virtual void get_constraint_rows(std::vector< std::tuple< libMesh::dof_id_type, libMesh::DofConstraintRow, Real >> &constrs)
Provides the vector of constraints and right-hand-side value pairs to be added to the system...
KinematicCoupling(MAST::SystemInitialization &sys_init)