7#ifndef __SPRINGELEMENT_HPP__
8#define __SPRINGELEMENT_HPP__
12using EntData = EntitiesFieldData::EntData;
33 :
public boost::enable_shared_from_this<DataAtIntegrationPtsSprings> {
36 boost::make_shared<MatrixDouble>();
37 boost::shared_ptr<MatrixDouble>
xAtPts = boost::make_shared<MatrixDouble>();
39 boost::make_shared<MatrixDouble>();
41 boost::shared_ptr<MatrixDouble>
hMat = boost::make_shared<MatrixDouble>();
42 boost::shared_ptr<MatrixDouble>
FMat = boost::make_shared<MatrixDouble>();
43 boost::shared_ptr<MatrixDouble>
HMat = boost::make_shared<MatrixDouble>();
45 boost::make_shared<MatrixDouble>();
47 boost::make_shared<VectorDouble>();
67 CHKERRABORT(PETSC_COMM_WORLD,
ierr);
72 PetscOptionsBegin(PETSC_COMM_WORLD,
"",
"Problem",
"none");
91 if (
bit->getName().compare(0, 9,
"SPRING_BC") == 0) {
93 const int id =
bit->getMeshsetId();
98 std::vector<double> attributes;
99 bit->getAttributes(attributes);
100 if (attributes.size() < 2) {
102 "Springs should have 2 attributes but there is %ld",
106 mapSpring[id].springStiffnessNormal = attributes[0];
107 mapSpring[id].springStiffnessTangent = attributes[1];
110 MOFEM_LOG_C(
"WORLD", Sev::verbose,
"\nSpring block %d\n",
id);
111 MOFEM_LOG_C(
"WORLD", Sev::verbose,
"\tNormal stiffness %3.4g\n",
113 MOFEM_LOG_C(
"WORLD", Sev::verbose,
"\tTangent stiffness %3.4g\n",
168 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &data);
179 OpSpringFs(boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
186 if (
field_name.compare(0, 16,
"SPATIAL_POSITION") != 0)
230 MoFEMErrorCode
doWork(
int row_side,
int col_side, EntityType row_type,
231 EntityType col_type,
EntData &row_data,
242 OpSpringKs(boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
316 MoFEMErrorCode
doWork(
int row_side,
int col_side, EntityType row_type,
317 EntityType col_type,
EntData &row_data,
322 const std::string field_name_1,
323 const std::string field_name_2)
325 field_name_1.c_str(), field_name_2.c_str(),
OPROWCOL),
353 MoFEMErrorCode
doWork(
int row_side,
int col_side, EntityType row_type,
354 EntityType col_type,
EntData &row_data,
371 const string field_name_1,
const string field_name_2,
372 boost::shared_ptr<DataAtIntegrationPtsSprings> data_at_spring_pts)
426 const string field_name_1,
const string field_name_2,
427 boost::shared_ptr<DataAtIntegrationPtsSprings> data_at_spring_pts)
429 data_at_spring_pts) {
465 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide>
sideFe;
481 virtual MoFEMErrorCode
doWork(
int row_side,
int col_side,
482 EntityType row_type, EntityType col_type,
496 const string field_name_1,
const string field_name_2,
497 boost::shared_ptr<DataAtIntegrationPtsSprings> data_at_spring_pts,
498 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
499 std::string &side_fe_name)
520 MoFEMErrorCode
doWork(
int row_side,
int col_side, EntityType row_type,
521 EntityType col_type,
EntData &row_data,
525 const string field_name_1,
const string field_name_2,
526 boost::shared_ptr<DataAtIntegrationPtsSprings> data_at_pts,
527 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
528 std::string &side_fe_name)
530 side_fe, side_fe_name) {
550 MoFEMErrorCode
doWork(
int row_side,
int col_side, EntityType row_type,
551 EntityType col_type,
EntData &row_data,
612 const string field_name_1,
const string field_name_2,
613 boost::shared_ptr<DataAtIntegrationPtsSprings> data_at_spring_pts,
614 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
615 std::string &side_fe_name)
617 side_fe, side_fe_name) {
666 const string field_name_1,
const string field_name_2,
667 boost::shared_ptr<DataAtIntegrationPtsSprings> data_at_spring_pts)
669 data_at_spring_pts) {
679 :
public VolumeElementForcesAndSourcesCoreOnContactPrismSide::
686 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &row_data);
690 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
692 bool ho_geometry =
false)
717 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
dataAtPts;
718 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide>
sideFe;
731 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &row_data);
788 const string material_field,
789 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
791 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
803 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
816 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
854 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &row_data);
862 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
876 boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings>
877 data_at_integration_pts)
912 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &row_data);
932 const std::string mesh_nodals_positions =
"MESH_NODE_POSITIONS");
949 static MoFEMErrorCode
951 const std::string mesh_nodals_positions,
952 Range &spring_triangles);
967 boost::shared_ptr<FaceElementForcesAndSourcesCore> fe_spring_lhs_ptr,
968 boost::shared_ptr<FaceElementForcesAndSourcesCore> fe_spring_rhs_ptr,
970 const std::string mesh_nodals_positions =
"MESH_NODE_POSITIONS",
971 double stiffness_scale = 1.);
986 boost::shared_ptr<FaceElementForcesAndSourcesCore> fe_spring_lhs_ptr_dx,
987 boost::shared_ptr<FaceElementForcesAndSourcesCore> fe_spring_lhs_ptr_dX,
988 boost::shared_ptr<FaceElementForcesAndSourcesCore> fe_spring_rhs_ptr,
989 boost::shared_ptr<DataAtIntegrationPtsSprings> data_at_integration_pts,
990 const std::string
field_name,
const std::string mesh_nodals_positions,
991 std::string side_fe_name);
ForcesAndSourcesCore::UserDataOperator UserDataOperator
#define MOFEM_LOG_C(channel, severity, format,...)
static PetscErrorCode ierr
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_ATOM_TEST_INVALID
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define _IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet having a particular BC meshset in a moFEM field.
implementation of Data Operators for Forces and Sources
constexpr auto field_name
virtual moab::Interface & get_moab()=0
bool sYmm
If true assume that matrix is symmetric structure.
Deprecated interface functions.
Data on single entity (This is passed as argument to DataOperator::doWork)
default operator for TRI element
friend class UserDataOperator
@ OPCOL
operator doWork function is executed on FE columns
@ OPROW
operator doWork function is executed on FE rows
@ OPROWCOL
operator doWork is executed on FE rows &columns
friend class UserDataOperator
default operator for TET element