Skip to content

Commit b228e7e

Browse files
Simplify beaminteraction potential params
1 parent 9f6caad commit b228e7e

File tree

24 files changed

+275
-463
lines changed

24 files changed

+275
-463
lines changed

src/beamcontact/4C_beamcontact_beam3contact_manager.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -275,27 +275,27 @@ CONTACT::Beam3cmanager::Beam3cmanager(Core::FE::Discretization& discret, double
275275
mi_->clear();
276276
// read potential law parameters from input and check
277277
{
278-
std::string pot_law_exponents_in(
278+
std::string potential_law_exponents_in(
279279
Teuchos::getNumericStringParameter(sbeampotential_, "POT_LAW_EXPONENT"));
280280

281-
Core::IO::ValueParser pot_law_exponents_parser(
282-
pot_law_exponents_in, {.user_scope_message = "While reading potential law exponents: "});
281+
Core::IO::ValueParser potential_law_exponents_parser(potential_law_exponents_in,
282+
{.user_scope_message = "While reading potential law exponents: "});
283283

284-
while (!pot_law_exponents_parser.at_end())
284+
while (!potential_law_exponents_parser.at_end())
285285
{
286-
mi_->push_back(pot_law_exponents_parser.read<double>());
286+
mi_->push_back(potential_law_exponents_parser.read<double>());
287287
}
288288
}
289289
{
290-
std::string pot_law_prefactors_in(
290+
std::string potential_law_prefactors_in(
291291
Teuchos::getNumericStringParameter(sbeampotential_, "POT_LAW_PREFACTOR"));
292292

293-
Core::IO::ValueParser pot_law_prefactors_parser(pot_law_prefactors_in,
293+
Core::IO::ValueParser potential_law_prefactors_parser(potential_law_prefactors_in,
294294
{.user_scope_message = "While reading potential law prefactors: "});
295295

296-
while (!pot_law_prefactors_parser.at_end())
296+
while (!potential_law_prefactors_parser.at_end())
297297
{
298-
ki_->push_back(pot_law_prefactors_parser.read<double>());
298+
ki_->push_back(potential_law_prefactors_parser.read<double>());
299299
}
300300
}
301301
if (!ki_->empty())

src/beaminteraction/src/potential/4C_beaminteraction_potential_input.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ void BeamPotential::set_valid_parameters(std::map<std::string, Core::IO::InputSp
5959
{.description = "Use regularization of force law at separations smaller than this separation",
6060
.default_value = -1.0}));
6161

62-
beampotential.specs.emplace_back(parameter<int>("NUM_INTEGRATION_SEGMENTS",
62+
beampotential.specs.emplace_back(parameter<int>("N_INTEGRATION_SEGMENTS",
6363
{.description = "Number of integration segments used per beam element", .default_value = 1}));
6464

65-
beampotential.specs.emplace_back(parameter<int>("NUM_GAUSSPOINTS",
65+
beampotential.specs.emplace_back(parameter<int>("N_GAUSS_POINTS",
6666
{.description = "Number of Gauss points used per integration segment", .default_value = 10}));
6767

6868
beampotential.specs.emplace_back(parameter<bool>("AUTOMATIC_DIFFERENTIATION",

src/beaminteraction/src/potential/4C_beaminteraction_potential_pair_base.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ std::shared_ptr<BeamInteraction::BeamPotentialPair> BeamInteraction::BeamPotenti
8686
return std::make_shared<BeamInteraction::BeamToSpherePotentialPair<2, 1>>();
8787
else
8888
{
89-
if (beam_potential_params.use_fad())
89+
if (beam_potential_params.use_fad)
9090
return std::make_shared<
9191
BeamInteraction::BeamToBeamPotentialPair<2, 1, Sacado::Fad::DFad<double>>>();
9292
else
@@ -99,7 +99,7 @@ std::shared_ptr<BeamInteraction::BeamPotentialPair> BeamInteraction::BeamPotenti
9999
return std::make_shared<BeamInteraction::BeamToSpherePotentialPair<3, 1>>();
100100
else
101101
{
102-
if (beam_potential_params.use_fad())
102+
if (beam_potential_params.use_fad)
103103
return std::make_shared<
104104
BeamInteraction::BeamToBeamPotentialPair<3, 1, Sacado::Fad::DFad<double>>>();
105105
else
@@ -112,7 +112,7 @@ std::shared_ptr<BeamInteraction::BeamPotentialPair> BeamInteraction::BeamPotenti
112112
return std::make_shared<BeamInteraction::BeamToSpherePotentialPair<4, 1>>();
113113
else
114114
{
115-
if (beam_potential_params.use_fad())
115+
if (beam_potential_params.use_fad)
116116
return std::make_shared<
117117
BeamInteraction::BeamToBeamPotentialPair<4, 1, Sacado::Fad::DFad<double>>>();
118118
else
@@ -125,7 +125,7 @@ std::shared_ptr<BeamInteraction::BeamPotentialPair> BeamInteraction::BeamPotenti
125125
return std::make_shared<BeamInteraction::BeamToSpherePotentialPair<5, 1>>();
126126
else
127127
{
128-
if (beam_potential_params.use_fad())
128+
if (beam_potential_params.use_fad)
129129
return std::make_shared<
130130
BeamInteraction::BeamToBeamPotentialPair<5, 1, Sacado::Fad::DFad<double>>>();
131131
else
@@ -154,7 +154,7 @@ std::shared_ptr<BeamInteraction::BeamPotentialPair> BeamInteraction::BeamPotenti
154154
return std::make_shared<BeamInteraction::BeamToSpherePotentialPair<2, 2>>();
155155
else
156156
{
157-
if (beam_potential_params.use_fad())
157+
if (beam_potential_params.use_fad)
158158
return std::make_shared<
159159
BeamInteraction::BeamToBeamPotentialPair<2, 2, Sacado::Fad::DFad<double>>>();
160160
else
@@ -203,7 +203,7 @@ void BeamInteraction::BeamPotentialPair::check_init_setup() const
203203
*-----------------------------------------------------------------------------------------------*/
204204
Core::FE::GaussRule1D BeamInteraction::BeamPotentialPair::get_gauss_rule() const
205205
{
206-
switch (params()->number_gauss_points())
206+
switch (params()->n_gauss_points)
207207
{
208208
case 5:
209209
{
@@ -236,7 +236,7 @@ Core::FE::GaussRule1D BeamInteraction::BeamPotentialPair::get_gauss_rule() const
236236
}
237237

238238
default:
239-
FOUR_C_THROW("{} Gauss points are not supported yet!", params()->number_gauss_points());
239+
FOUR_C_THROW("{} Gauss points are not supported yet!", params()->n_gauss_points);
240240
}
241241

242242
return Core::FE::GaussRule1D::undefined;

src/beaminteraction/src/potential/4C_beaminteraction_potential_pair_base.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace Core::Elements
3333
namespace BeamInteraction
3434
{
3535
// forward declaration ...
36-
class BeamPotentialParams;
36+
struct BeamPotentialParams;
3737

3838

3939
/*!

0 commit comments

Comments
 (0)