OpenBeam
C++ library for static analysis of mechanical structures
CElementSpringDXDYRZ.h
1 /* +---------------------------------------------------------------------------+
2  | OpenBeam - C++ Finite Element Analysis library |
3  | |
4  | Copyright (C) 2010-2021 Jose Luis Blanco Claraco |
5  | University of Malaga |
6  | |
7  | OpenBeam is free software: you can redistribute it and/or modify |
8  | it under the terms of the GNU General Public License as published by |
9  | the Free Software Foundation, either version 3 of the License, or |
10  | (at your option) any later version. |
11  | |
12  | OpenBeam is distributed in the hope that it will be useful, |
13  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15  | GNU General Public License for more details. |
16  | |
17  | You should have received a copy of the GNU General Public License |
18  | along with OpenBeam. If not, see <http://www.gnu.org/licenses/>. |
19  | |
20  +---------------------------------------------------------------------------+
21  */
22 
23 #pragma once
24 
25 #include <memory>
26 
27 #include "CElement.h"
28 #include "types.h"
29 
30 namespace openbeam
31 {
36  public CElement,
37  public std::enable_shared_from_this<CElementSpringDXDYRZ>
38 {
39  public:
42  const size_t from_node_id,
43  const size_t to_node_id,
44  const num_t Kx,
45  const num_t Ky,
46  const num_t KRZ);
47 
51  void getLocalStiffnessMatrices(std::vector<TStiffnessSubmatrix>& outSubMats) const override;
52 
53  void getLocalDoFs(std::vector<used_DoFs_t>& dofs) const override;
54 
55  num_t Kx = 0, Ky = 0, KRz = 0;
56 
61  void loadParamsFromSet(const mrpt::containers::yaml& p, const EvaluationContext& ctx) override;
62 
66  void drawSVG(
67  void* _cairo_context,
68  const DrawStructureOptions& options,
69  const RenderInitData& ri,
70  const DrawElementExtraParams& draw_el_params,
71  const MeshOutputInfo* meshing_info) const override;
72  mrpt::viz::CSetOfObjects::Ptr getVisualization(
73  const DrawStructureOptions& options,
74  const DrawElementExtraParams& draw_el_params,
75  const MeshOutputInfo* meshing_info) const override
76  {
77  return {};
78  }
79 
81  void do_mesh(
82  const size_t my_idx,
83  CStructureProblem& out_fem,
84  MeshOutputInfo& out_info,
85  const MeshParams& params) override;
86 };
87 } // namespace openbeam
Definition: CElementSpringDXDYRZ.h:38
num_t KRz
Stiffness constants of the spring (N/m)
Definition: CElementSpringDXDYRZ.h:55
void getLocalDoFs(std::vector< used_DoFs_t > &dofs) const override
void do_mesh(const size_t my_idx, CStructureProblem &out_fem, MeshOutputInfo &out_info, const MeshParams &params) override
void loadParamsFromSet(const mrpt::containers::yaml &p, const EvaluationContext &ctx) override
void drawSVG(void *_cairo_context, const DrawStructureOptions &options, const RenderInitData &ri, const DrawElementExtraParams &draw_el_params, const MeshOutputInfo *meshing_info) const override
void getLocalStiffnessMatrices(std::vector< TStiffnessSubmatrix > &outSubMats) const override
Definition: CElement.h:49
Definition: CStructureProblem.h:36
Definition: DrawStructureOptions.h:102
Definition: DrawStructureOptions.h:34
Definition: types.h:160
Definition: CFiniteElementProblem.h:152
Definition: CFiniteElementProblem.h:142
Definition: DrawStructureOptions.h:114