@@ -35,6 +35,13 @@ std::shared_ptr<Core::Elements::Element> Discret::Elements::SolidLineType<dim>::
3535 return nullptr ;
3636}
3737
38+
39+ template <unsigned dim>
40+ Discret::Elements::SolidLine<dim>::SolidLine(const Discret::Elements::SolidLine<dim>& old) noexcept
41+ : Core::Elements::FaceElement(old), num_dof_per_node_(old.num_dof_per_node_)
42+ {
43+ }
44+
3845template <unsigned dim>
3946Discret::Elements::SolidLine<dim>::SolidLine(int id, int owner, int nnode, const int * nodeids,
4047 Core::Nodes::Node** nodes, Core::Elements::Element* parent, const int lline)
@@ -43,6 +50,15 @@ Discret::Elements::SolidLine<dim>::SolidLine(int id, int owner, int nnode, const
4350 set_node_ids (nnode, nodeids);
4451 build_nodal_pointers (nodes);
4552 set_parent_master_element (parent, lline);
53+
54+ num_dof_per_node_ = parent_element ()->num_dof_per_node (*SolidLine::nodes ()[0 ]);
55+ // Safety check if all nodes have the same number of dofs!
56+ for (int nlid = 1 ; nlid < num_node (); ++nlid)
57+ {
58+ if (num_dof_per_node_ != parent_master_element ()->num_dof_per_node (*SolidLine::nodes ()[nlid]))
59+ FOUR_C_THROW (" You need different NumDofPerNode for each node on this solid line? ({} != {})" ,
60+ num_dof_per_node_, parent_master_element ()->num_dof_per_node (*SolidLine::nodes ()[nlid]));
61+ }
4662}
4763
4864template <unsigned dim>
@@ -72,6 +88,18 @@ Core::FE::CellType Discret::Elements::SolidLine<dim>::shape() const
7288 });
7389}
7490
91+ template <unsigned dim>
92+ void Discret::Elements::SolidLine<dim>::pack(Core::Communication::PackBuffer& data) const
93+ {
94+ data.add_to_pack (num_dof_per_node_);
95+ }
96+
97+ template <unsigned dim>
98+ void Discret::Elements::SolidLine<dim>::unpack(Core::Communication::UnpackBuffer& buffer)
99+ {
100+ buffer.extract_from_pack (num_dof_per_node_);
101+ }
102+
75103template <unsigned dim>
76104void Discret::Elements::SolidLine<dim>::print(std::ostream& os) const
77105{
0 commit comments