v0.10.0
SpringElement.hpp
Go to the documentation of this file.
1 /** \file SpringElements.hpp
2  \brief Header file for spring element implementation
3 */
4 
5 /* This file is part of MoFEM.
6  * MoFEM is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by the
8  * Free Software Foundation, either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * MoFEM is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14  * License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>. */
18 
19 #ifndef __SPRINGELEMENT_HPP__
20 #define __SPRINGELEMENT_HPP__
21 
22 /** \brief Set of functions declaring elements and setting operators
23  * to apply spring boundary condition
24  */
25 struct MetaSpringBC {
26 
27  /**
28  * \brief Declare spring element
29  *
30  * Search cubit sidesets and blocksets with spring bc and declare surface
31  * element
32 
33  * Blockset has to have name “SPRING_BC”. The first three attributes of the
34  * blockset are spring stiffness value.
35 
36  *
37  * @param m_field Interface insurance
38  * @param field_name Field name (e.g. SPATIAL_POSITION)
39  * @param mesh_nodals_positions Name of field on which ho-geometry is defined
40  * @return Error code
41  */
43  MoFEM::Interface &m_field, const std::string field_name,
44  const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
45 
46  /**
47  * \brief Implementation of spring element. Set operators to calculate LHS and
48  * RHS
49  *
50  * @param m_field Interface insurance
51  * @param fe_spring_lhs_ptr Pointer to the FE instance for LHS
52  * @param fe_spring_rhs_ptr Pointer to the FE instance for RHS
53  * @param field_name Field name (e.g. SPATIAL_POSITION)
54  * @param mesh_nodals_positions Name of field on which ho-geometry is defined
55  * @return Error code
56  */
58  MoFEM::Interface &m_field,
59  boost::shared_ptr<FaceElementForcesAndSourcesCore> fe_spring_lhs_ptr,
60  boost::shared_ptr<FaceElementForcesAndSourcesCore> fe_spring_rhs_ptr,
61  const std::string field_name,
62  const std::string mesh_nodals_positions = "MESH_NODE_POSITIONS");
63 
64  /**
65  * \brief Implementation of spring element. Set operators to calculate LHS and
66  * RHS
67  *
68  * @param t_tangent1 First local tangent vector
69  * @param t_tangent2 Second local tangent vector
70  * @param t_normal Local normal vector
71  * @param t_spring_local Spring stiffness in local coords
72  * @return t_spring_global Spring stiffness in global coords
73  // */
76  FTensor::Tensor1<double, 3> t_tangent1,
77  FTensor::Tensor1<double, 3> t_tangent2,
78  FTensor::Tensor2<double, 3, 3> t_spring_local);
79 };
80 
81 #endif //__SPRINGELEMENT_HPP__
Deprecated interface functions.
static MoFEMErrorCode setSpringOperators(MoFEM::Interface &m_field, boost::shared_ptr< FaceElementForcesAndSourcesCore > fe_spring_lhs_ptr, boost::shared_ptr< FaceElementForcesAndSourcesCore > fe_spring_rhs_ptr, const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS")
Implementation of spring element. Set operators to calculate LHS and RHS.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:67
static MoFEMErrorCode addSpringElements(MoFEM::Interface &m_field, const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS")
Declare spring element.
Set of functions declaring elements and setting operators to apply spring boundary condition.
static FTensor::Tensor2< double, 3, 3 > transformLocalToGlobal(FTensor::Tensor1< double, 3 > t_normal, FTensor::Tensor1< double, 3 > t_tangent1, FTensor::Tensor1< double, 3 > t_tangent2, FTensor::Tensor2< double, 3, 3 > t_spring_local)
Implementation of spring element. Set operators to calculate LHS and RHS.