Skip to content

Commit cd602c3

Browse files
Merge pull request #1716 from davidrudlstorfer/restructure_beaminteraction_input
Restructure and modularize beaminteraction input
2 parents 24da693 + e0f1b3e commit cd602c3

94 files changed

Lines changed: 1606 additions & 1393 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/adapter/4C_adapter_str_structure_new.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
#include "4C_adapter_str_wrapper.hpp"
1818
#include "4C_beam3_kirchhoff.hpp"
1919
#include "4C_beam3_reissner.hpp"
20+
#include "4C_beaminteraction_contact_beam_to_solid_input.hpp"
21+
#include "4C_beaminteraction_contact_beam_to_sphere_input.hpp"
2022
#include "4C_binstrategy.hpp"
2123
#include "4C_contact_input.hpp"
2224
#include "4C_fem_condition.hpp"
2325
#include "4C_fem_condition_point_coupling_redistribution.hpp"
2426
#include "4C_fem_discretization.hpp"
2527
#include "4C_fem_dofset.hpp"
2628
#include "4C_global_data.hpp"
27-
#include "4C_inpar_beam_to_solid.hpp"
28-
#include "4C_inpar_beaminteraction.hpp"
2929
#include "4C_inpar_fsi.hpp"
3030
#include "4C_io.hpp"
3131
#include "4C_io_pstream.hpp"
@@ -530,21 +530,21 @@ void Adapter::StructureBaseAlgorithmNew::set_model_types(
530530
.sublist("SPHERE BEAM LINK")
531531
.get<bool>("SPHEREBEAMLINKING") or
532532
beamtobeamcontactconditions.size() > 0 or
533-
Teuchos::getIntegralValue<Inpar::BeamInteraction::Strategy>(
533+
Teuchos::getIntegralValue<BeamInteraction::Strategy>(
534534
Global::Problem::instance()->beam_interaction_params().sublist("BEAM TO SPHERE CONTACT"),
535-
"STRATEGY") != Inpar::BeamInteraction::bstr_none or
536-
Teuchos::getIntegralValue<Inpar::BeamToSolid::BeamToSolidContactDiscretization>(
535+
"STRATEGY") != BeamInteraction::Strategy::bstr_none or
536+
Teuchos::getIntegralValue<BeamToSolid::BeamToSolidContactDiscretization>(
537537
Global::Problem::instance()->beam_interaction_params().sublist(
538538
"BEAM TO SOLID VOLUME MESHTYING"),
539-
"CONTACT_DISCRETIZATION") != Inpar::BeamToSolid::BeamToSolidContactDiscretization::none or
540-
Teuchos::getIntegralValue<Inpar::BeamToSolid::BeamToSolidContactDiscretization>(
539+
"CONTACT_DISCRETIZATION") != BeamToSolid::BeamToSolidContactDiscretization::none or
540+
Teuchos::getIntegralValue<BeamToSolid::BeamToSolidContactDiscretization>(
541541
Global::Problem::instance()->beam_interaction_params().sublist(
542542
"BEAM TO SOLID SURFACE MESHTYING"),
543-
"CONTACT_DISCRETIZATION") != Inpar::BeamToSolid::BeamToSolidContactDiscretization::none or
544-
Teuchos::getIntegralValue<Inpar::BeamToSolid::BeamToSolidContactDiscretization>(
543+
"CONTACT_DISCRETIZATION") != BeamToSolid::BeamToSolidContactDiscretization::none or
544+
Teuchos::getIntegralValue<BeamToSolid::BeamToSolidContactDiscretization>(
545545
Global::Problem::instance()->beam_interaction_params().sublist(
546546
"BEAM TO SOLID SURFACE CONTACT"),
547-
"CONTACT_DISCRETIZATION") != Inpar::BeamToSolid::BeamToSolidContactDiscretization::none or
547+
"CONTACT_DISCRETIZATION") != BeamToSolid::BeamToSolidContactDiscretization::none or
548548
Global::Problem::instance()->parameters().isParameter(
549549
"BEAM INTERACTION/BEAM TO SOLID EDGE CONTACT") or
550550
beampotconditions.size() > 0 or beampenaltycouplingconditions_direct.size() > 0 or

src/beam3/4C_beam3_base.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "4C_beam3_base.hpp"
99

1010
#include "4C_beaminteraction_calc_utils.hpp"
11+
#include "4C_beaminteraction_crosslinking_submodel_evaluator.hpp"
1112
#include "4C_browniandyn_input.hpp" // enums
1213
#include "4C_comm_pack_helpers.hpp"
1314
#include "4C_fem_geometry_periodic_boundingbox.hpp"
@@ -27,7 +28,7 @@ Discret::Elements::Beam3Base::Beam3Base(int id, int owner)
2728
: Core::Elements::Element(id, owner),
2829
Tref_(0),
2930
centerline_hermite_(true),
30-
filamenttype_(Inpar::BeamInteraction::filetype_none),
31+
filamenttype_(BeamInteraction::FilamentType::filetype_none),
3132
interface_ptr_(nullptr),
3233
browndyn_interface_ptr_(nullptr)
3334
{
@@ -388,7 +389,7 @@ void Discret::Elements::Beam3Base::get_directions_of_shifts(std::vector<double>&
388389
/*--------------------------------------------------------------------------------------------*
389390
*--------------------------------------------------------------------------------------------*/
390391
void Discret::Elements::Beam3Base::get_pos_of_binding_spot(Core::LinAlg::Matrix<3, 1>& pos,
391-
std::vector<double>& disp, Inpar::BeamInteraction::CrosslinkerType linkertype, int bspotlocn,
392+
std::vector<double>& disp, BeamInteraction::CrosslinkerType linkertype, int bspotlocn,
392393
Core::Geo::MeshFree::BoundingBox const& periodic_boundingbox) const
393394
{
394395
const double xi = bspotposxi_.at(linkertype)[bspotlocn];
@@ -402,8 +403,7 @@ void Discret::Elements::Beam3Base::get_pos_of_binding_spot(Core::LinAlg::Matrix<
402403
/*--------------------------------------------------------------------------------------------*
403404
*--------------------------------------------------------------------------------------------*/
404405
void Discret::Elements::Beam3Base::get_triad_of_binding_spot(Core::LinAlg::Matrix<3, 3>& triad,
405-
std::vector<double>& disp, Inpar::BeamInteraction::CrosslinkerType linkertype,
406-
int bspotlocn) const
406+
std::vector<double>& disp, BeamInteraction::CrosslinkerType linkertype, int bspotlocn) const
407407
{
408408
const double xi = bspotposxi_.at(linkertype)[bspotlocn];
409409
// get position

src/beam3/4C_beam3_base.hpp

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
#include "4C_config.hpp"
1212

1313
#include "4C_beam3_spatial_discretization_utils.hpp"
14+
#include "4C_beaminteraction_crosslinking_submodel_evaluator.hpp"
1415
#include "4C_fem_discretization.hpp"
1516
#include "4C_fem_general_element.hpp"
1617
#include "4C_fem_general_elementtype.hpp"
1718
#include "4C_fem_general_node.hpp"
1819
#include "4C_fem_general_utils_fem_shapefunctions.hpp"
1920
#include "4C_fem_general_utils_integration.hpp"
20-
#include "4C_inpar_beaminteraction.hpp"
2121
#include "4C_inpar_structure.hpp"
2222
#include "4C_linalg_vector.hpp"
2323

@@ -549,19 +549,19 @@ namespace Discret
549549
//! get centerline pos at binding spot with locn x stored in element parameter space
550550
//! coordinates \in [-1,1] from displacement state vector
551551
void get_pos_of_binding_spot(Core::LinAlg::Matrix<3, 1>& pos, std::vector<double>& disp,
552-
Inpar::BeamInteraction::CrosslinkerType linkertype, int bspotlocn,
552+
BeamInteraction::CrosslinkerType linkertype, int bspotlocn,
553553
Core::Geo::MeshFree::BoundingBox const& periodic_boundingbox) const;
554554

555555
//! get triad at binding spot with locn x stored in element parameter space coordinates \in
556556
//! [-1,1] from displacement state vector
557557
void get_triad_of_binding_spot(Core::LinAlg::Matrix<3, 3>& triad, std::vector<double>& disp,
558-
Inpar::BeamInteraction::CrosslinkerType linkertype, int bspotlocn) const;
558+
BeamInteraction::CrosslinkerType linkertype, int bspotlocn) const;
559559

560560
/** \brief get entire binding spot information of element
561561
*
562562
*/
563-
std::map<Inpar::BeamInteraction::CrosslinkerType, std::vector<double>> const&
564-
get_binding_spots() const
563+
std::map<BeamInteraction::CrosslinkerType, std::vector<double>> const& get_binding_spots()
564+
const
565565
{
566566
return bspotposxi_;
567567
}
@@ -574,8 +574,7 @@ namespace Discret
574574
/** \brief get number of binding spots of certain binding spot type on this element
575575
*
576576
*/
577-
unsigned int get_number_of_binding_spots(
578-
Inpar::BeamInteraction::CrosslinkerType linkertype) const
577+
unsigned int get_number_of_binding_spots(BeamInteraction::CrosslinkerType linkertype) const
579578
{
580579
return bspotposxi_.at(linkertype).size();
581580
}
@@ -584,7 +583,7 @@ namespace Discret
584583
*
585584
*/
586585
double get_binding_spot_xi(
587-
Inpar::BeamInteraction::CrosslinkerType linkertype, unsigned int bspotlocn) const
586+
BeamInteraction::CrosslinkerType linkertype, unsigned int bspotlocn) const
588587
{
589588
if (bspotlocn > bspotposxi_.at(linkertype).size())
590589
FOUR_C_THROW("number of requested binding spot exceeds total number of binding spots");
@@ -596,7 +595,7 @@ namespace Discret
596595
*
597596
*/
598597
void set_binding_spots(
599-
std::map<Inpar::BeamInteraction::CrosslinkerType, std::vector<double>> bspotposxi)
598+
std::map<BeamInteraction::CrosslinkerType, std::vector<double>> bspotposxi)
600599
{
601600
bspotposxi_.clear();
602601
bspotposxi_ = bspotposxi;
@@ -606,20 +605,20 @@ namespace Discret
606605
*
607606
*/
608607
void set_positions_of_binding_spot_type(
609-
Inpar::BeamInteraction::CrosslinkerType linkertype, std::vector<double> const& bspotposxi)
608+
BeamInteraction::CrosslinkerType linkertype, std::vector<double> const& bspotposxi)
610609
{
611610
bspotposxi_[linkertype] = bspotposxi;
612611
}
613612

614613
/** \brief set/get type of filament the element is part of
615614
*
616615
*/
617-
void set_filament_type(Inpar::BeamInteraction::FilamentType filamenttype)
616+
void set_filament_type(BeamInteraction::FilamentType filamenttype)
618617
{
619618
filamenttype_ = filamenttype;
620619
}
621620

622-
Inpar::BeamInteraction::FilamentType get_filament_type() const { return filamenttype_; }
621+
BeamInteraction::FilamentType get_filament_type() const { return filamenttype_; }
623622

624623
/**
625624
* \brief Get the bounding volume of the element for geometric search
@@ -636,10 +635,10 @@ namespace Discret
636635
private:
637636
//! position of binding spots on beam element in local coordinate system
638637
//! size of vector equals number of binding spots on this element
639-
std::map<Inpar::BeamInteraction::CrosslinkerType, std::vector<double>> bspotposxi_;
638+
std::map<BeamInteraction::CrosslinkerType, std::vector<double>> bspotposxi_;
640639

641640
//! type of filament element belongs to
642-
Inpar::BeamInteraction::FilamentType filamenttype_;
641+
BeamInteraction::FilamentType filamenttype_;
643642

644643
//! @}
645644

src/beam3/4C_beam3_discretization_runtime_vtu_writer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,8 @@ void BeamDiscretizationRuntimeOutputWriter::append_element_filament_id_and_type(
629629
const Core::Conditions::Condition* cond =
630630
beam_line_filament_conditioned_nodes.find(ele->nodes()[0]->id())->second;
631631
double current_id = cond->parameters().get<int>("ID");
632-
double current_type = Inpar::BeamInteraction::string_to_filament_type(
633-
(cond->parameters().get<std::string>("TYPE")));
632+
double current_type =
633+
BeamInteraction::string_to_filament_type((cond->parameters().get<std::string>("TYPE")));
634634

635635
for (int i = 0; i < num_cells_per_element_[ibeamele]; ++i)
636636
{

src/beaminteraction/src/4C_beaminteraction_calc_utils.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ namespace BeamInteraction
237237
discret->get_condition("BeamLineFilamentCondition", filamentconditions);
238238

239239
// compute number of linker types
240-
std::vector<Inpar::BeamInteraction::CrosslinkerType> linkertypes = params.linker_types();
240+
std::vector<BeamInteraction::CrosslinkerType> linkertypes = params.linker_types();
241241

242242
// loop over all relevant (on myrank) filaments
243243
for (auto const& filiter : relevantfilaments)
@@ -302,7 +302,7 @@ namespace BeamInteraction
302302
<< Core::IO::endl;
303303
Core::IO::cout(Core::IO::debug)
304304
<< numbspot << " binding spots of type "
305-
<< Inpar::BeamInteraction::crosslinker_type_to_string(linkertypes[linkertype_i])
305+
<< BeamInteraction::crosslinker_type_to_string(linkertypes[linkertype_i])
306306
<< " on filament " << filiter << " (consists of "
307307
<< static_cast<int>(sortedfilamenteles.size()) << " elements)"
308308
<< " with: " << Core::IO::endl;
@@ -457,8 +457,8 @@ namespace BeamInteraction
457457
*-----------------------------------------------------------------------------*/
458458
void set_binding_spots_positions_on_filament(
459459
std::vector<Core::Elements::Element*>& sortedfilamenteles, double start,
460-
Inpar::BeamInteraction::CrosslinkerType linkertype, int numbspot,
461-
double filamentbspotinterval, double tol)
460+
BeamInteraction::CrosslinkerType linkertype, int numbspot, double filamentbspotinterval,
461+
double tol)
462462
{
463463
// default no occupied binding spots
464464
std::pair<double, double> elearcinterval = std::make_pair(0.0, 0.0);
@@ -504,7 +504,7 @@ namespace BeamInteraction
504504
/*-----------------------------------------------------------------------------*
505505
*-----------------------------------------------------------------------------*/
506506
void get_pos_and_triad_of_binding_spot(Core::Elements::Element* ele,
507-
Core::Geo::MeshFree::BoundingBox& pbb, Inpar::BeamInteraction::CrosslinkerType linkertype,
507+
Core::Geo::MeshFree::BoundingBox& pbb, BeamInteraction::CrosslinkerType linkertype,
508508
int locbspotnum, Core::LinAlg::Matrix<3, 1>& bspotpos,
509509
Core::LinAlg::Matrix<3, 3>& bspottriad, std::vector<double>& eledisp)
510510
{
@@ -526,7 +526,7 @@ namespace BeamInteraction
526526
*-----------------------------------------------------------------------------*/
527527
void get_pos_and_triad_of_binding_spot(Core::FE::Discretization const& discret,
528528
Core::Elements::Element* ele, Core::LinAlg::Vector<double>& ia_discolnp,
529-
Core::Geo::MeshFree::BoundingBox& pbb, Inpar::BeamInteraction::CrosslinkerType linkertype,
529+
Core::Geo::MeshFree::BoundingBox& pbb, BeamInteraction::CrosslinkerType linkertype,
530530
int locbspotnum, Core::LinAlg::Matrix<3, 1>& bspotpos,
531531
Core::LinAlg::Matrix<3, 3>& bspottriad)
532532
{

src/beaminteraction/src/4C_beaminteraction_calc_utils.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
#include "4C_config.hpp"
1212

13-
#include "4C_binstrategy_utils.hpp"
14-
#include "4C_inpar_beaminteraction.hpp"
13+
#include "4C_beaminteraction_crosslinking_submodel_evaluator.hpp"
1514
#include "4C_linalg_fevector.hpp"
1615
#include "4C_linalg_fixedsizematrix.hpp"
1716
#include "4C_linalg_mapextractor.hpp"
@@ -285,21 +284,21 @@ namespace BeamInteraction
285284
*-----------------------------------------------------------------------------*/
286285
void set_binding_spots_positions_on_filament(
287286
std::vector<Core::Elements::Element*>& sortedfilamenteles, double start,
288-
Inpar::BeamInteraction::CrosslinkerType linkertype, int numbspot,
289-
double filamentbspotinterval, double tol);
287+
BeamInteraction::CrosslinkerType linkertype, int numbspot, double filamentbspotinterval,
288+
double tol);
290289

291290
/*-----------------------------------------------------------------------------*
292291
*-----------------------------------------------------------------------------*/
293292
void get_pos_and_triad_of_binding_spot(Core::Elements::Element* ele,
294-
Core::Geo::MeshFree::BoundingBox& pbb, Inpar::BeamInteraction::CrosslinkerType linkertype,
293+
Core::Geo::MeshFree::BoundingBox& pbb, BeamInteraction::CrosslinkerType linkertype,
295294
int locbspotnum, Core::LinAlg::Matrix<3, 1>& bspotpos,
296295
Core::LinAlg::Matrix<3, 3>& bspottriad, std::vector<double>& eledisp);
297296

298297
/*-----------------------------------------------------------------------------*
299298
*-----------------------------------------------------------------------------*/
300299
void get_pos_and_triad_of_binding_spot(Core::FE::Discretization const& discret,
301300
Core::Elements::Element* ele, Core::LinAlg::Vector<double>& ia_discolnp,
302-
Core::Geo::MeshFree::BoundingBox& pbb, Inpar::BeamInteraction::CrosslinkerType linkertype,
301+
Core::Geo::MeshFree::BoundingBox& pbb, BeamInteraction::CrosslinkerType linkertype,
303302
int locbspotnum, Core::LinAlg::Matrix<3, 1>& bspotpos,
304303
Core::LinAlg::Matrix<3, 3>& bspottriad);
305304

0 commit comments

Comments
 (0)