Skip to content

Commit 969a8e1

Browse files
committed
Move TSI input to module folder
1 parent 5c4ceb0 commit 969a8e1

14 files changed

+280
-298
lines changed

src/inpar/4C_inpar_plasticity.cpp

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

1010
#include "4C_inpar_structure.hpp"
11-
#include "4C_inpar_tsi.hpp"
1211
#include "4C_io_input_spec_builders.hpp"
13-
FOUR_C_NAMESPACE_OPEN
14-
12+
#include "4C_tsi_input.hpp"
1513

14+
FOUR_C_NAMESPACE_OPEN
1615

1716
void Inpar::Plasticity::set_valid_parameters(std::map<std::string, Core::IO::InputSpec>& list)
1817
{
@@ -81,14 +80,14 @@ void Inpar::Plasticity::set_valid_parameters(std::map<std::string, Core::IO::Inp
8180
{.description = "tolerance in the EAS increment norm for the Newton iteration",
8281
.default_value = 1.0E-8}),
8382

84-
deprecated_selection<Inpar::TSI::DissipationMode>("DISSIPATION_MODE",
83+
deprecated_selection<TSI::DissipationMode>("DISSIPATION_MODE",
8584
{
86-
{"pl_multiplier", Inpar::TSI::pl_multiplier},
87-
{"pl_flow", Inpar::TSI::pl_flow},
88-
{"Taylor_Quinney", Inpar::TSI::Taylor_Quinney},
85+
{"pl_multiplier", TSI::pl_multiplier},
86+
{"pl_flow", TSI::pl_flow},
87+
{"Taylor_Quinney", TSI::Taylor_Quinney},
8988
},
9089
{.description = "method to calculate the plastic dissipation",
91-
.default_value = Inpar::TSI::pl_multiplier})},
90+
.default_value = TSI::pl_multiplier})},
9291
{.defaultable = true});
9392
}
9493

src/inpar/4C_inpar_tsi.hpp

Lines changed: 0 additions & 114 deletions
This file was deleted.

src/inpar/4C_inpar_validparameters.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
#include "4C_inpar_ssti.hpp"
5454
#include "4C_inpar_sti.hpp"
5555
#include "4C_inpar_structure.hpp"
56-
#include "4C_inpar_tsi.hpp"
5756
#include "4C_inpar_volmortar.hpp"
5857
#include "4C_inpar_wear.hpp"
5958
#include "4C_inpar_xfem.hpp"
@@ -65,6 +64,7 @@
6564
#include "4C_porofluid_pressure_based_elast_scatra_input.hpp"
6665
#include "4C_porofluid_pressure_based_input.hpp"
6766
#include "4C_thermo_input.hpp"
67+
#include "4C_tsi_input.hpp"
6868

6969
#include <Teuchos_any.hpp>
7070
#include <Teuchos_Array.hpp>
@@ -195,7 +195,7 @@ std::map<std::string, Core::IO::InputSpec> Input::valid_parameters()
195195
Inpar::Plasticity::set_valid_parameters(specs);
196196

197197
Thermo::set_valid_parameters(specs);
198-
Inpar::TSI::set_valid_parameters(specs);
198+
TSI::set_valid_parameters(specs);
199199

200200
Inpar::FLUID::set_valid_parameters(specs);
201201
Inpar::LowMach::set_valid_parameters(specs);

src/mat/4C_mat_plastic_VarConstUpdate.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ namespace Mat
379379
Mat::PAR::PlasticElastHyperVCU* mat_params() const override { return params_; }
380380

381381
/// get dissipation mode
382-
Inpar::TSI::DissipationMode dis_mode() const override { return Inpar::TSI::pl_flow; }
382+
TSI::DissipationMode dis_mode() const override { return TSI::pl_flow; }
383383

384384
/// inverse plastic deformation gradient for each Gauss point at current state
385385
std::vector<Core::LinAlg::Matrix<3, 3>> plastic_defgrd_inverse_;

src/mat/4C_mat_plasticelasthyper.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Mat::PAR::PlasticElastHyper::PlasticElastHyper(const Core::Mat::PAR::Parameter::
4848
rY_13_(matdata.parameters.get<double>("rY_13")),
4949
cpl_(0.),
5050
stab_s_(0.),
51-
dis_mode_(Inpar::TSI::pl_multiplier)
51+
dis_mode_(TSI::pl_multiplier)
5252
{
5353
// check if sizes fit
5454
if (nummat_ != (int)matids_.size())
@@ -299,7 +299,7 @@ void Mat::PlasticElastHyper::unpack(Core::Communication::UnpackBuffer& buffer)
299299
}
300300

301301
// dissipation mode
302-
Inpar::TSI::DissipationMode mode;
302+
TSI::DissipationMode mode;
303303
extract_from_pack(buffer, mode);
304304
set_dissipation_mode(mode);
305305

@@ -368,11 +368,11 @@ void Mat::PlasticElastHyper::setup(int numgp, const Core::IO::InputParameterCont
368368

369369
/*----------------------------------------------------------------------*/
370370
/*----------------------------------------------------------------------*/
371-
void Mat::PlasticElastHyper::setup_tsi(const int numgp, const int numdofperelement, const bool eas,
372-
const Inpar::TSI::DissipationMode mode)
371+
void Mat::PlasticElastHyper::setup_tsi(
372+
const int numgp, const int numdofperelement, const bool eas, const TSI::DissipationMode mode)
373373
{
374374
// dissipation mode
375-
if (mode == Inpar::TSI::pl_multiplier)
375+
if (mode == TSI::pl_multiplier)
376376
if (mat_params()->rY_11_ != 0. || mat_params()->rY_22_ != 0. || mat_params()->rY_33_ != 0. ||
377377
mat_params()->rY_12_ != 0. || mat_params()->rY_23_ != 0. || mat_params()->rY_13_ != 0.)
378378
FOUR_C_THROW("TSI with Hill plasticity not available with DISSIPATION_MODE pl_multiplier");
@@ -400,11 +400,11 @@ void Mat::PlasticElastHyper::setup_tsi(const int numgp, const int numdofpereleme
400400
if (pl_spin_chi() != 0.) FOUR_C_THROW("no thermo-plasticitiy with plastic spin");
401401

402402
/// Hill TSI only with pl_flow dissipation
403-
if (mat_params()->rY_11_ != 0. && mode == Inpar::TSI::pl_multiplier)
403+
if (mat_params()->rY_11_ != 0. && mode == TSI::pl_multiplier)
404404
FOUR_C_THROW("hill thermo plasticity not with dissipation mode pl_multiplier");
405405

406406
/// viscoplastic TSI only with pl_flow dissipation
407-
if (visc() != 0. && mode == Inpar::TSI::pl_multiplier)
407+
if (visc() != 0. && mode == TSI::pl_multiplier)
408408
FOUR_C_THROW("thermo-visco-plasticity not with dissipation mode pl_multiplier");
409409
}
410410

@@ -1059,7 +1059,7 @@ void Mat::PlasticElastHyper::evaluate_ncp(const Core::LinAlg::Matrix<3, 3>* mStr
10591059
// TSI
10601060
if (dNCPdT != nullptr)
10611061
{
1062-
if (dis_mode() == Inpar::TSI::Taylor_Quinney)
1062+
if (dis_mode() == TSI::Taylor_Quinney)
10631063
{
10641064
double plHeating = taylor_quinney() * eta_v_strainlike.dot(deltaDp_v);
10651065
Core::LinAlg::Matrix<6, 1> dHpDeta(Core::LinAlg::Initialization::zero);
@@ -1081,14 +1081,14 @@ void Mat::PlasticElastHyper::evaluate_ncp(const Core::LinAlg::Matrix<3, 3>* mStr
10811081
(*temp) * delta_alpha_i_[gp];
10821082
switch (dis_mode())
10831083
{
1084-
case Inpar::TSI::pl_multiplier:
1084+
case TSI::pl_multiplier:
10851085
plHeating += delta_alpha_i_[gp] * (0. + inityield() * (1. - yield_soft() * dT) +
10861086
isohard() * (1. - hard_soft() * dT) * aI +
10871087
(infyield() * (1. - hard_soft() * dT) -
10881088
inityield() * (1. - yield_soft() * dT)) *
10891089
(1. - exp(-expisohard() * aI)));
10901090
break;
1091-
case Inpar::TSI::pl_flow:
1091+
case TSI::pl_flow:
10921092
plHeating += eta_v_strainlike.dot(deltaDp_v);
10931093
break;
10941094
default:
@@ -1103,13 +1103,13 @@ void Mat::PlasticElastHyper::evaluate_ncp(const Core::LinAlg::Matrix<3, 3>* mStr
11031103
delta_alpha_i_[gp];
11041104
switch (dis_mode())
11051105
{
1106-
case Inpar::TSI::pl_multiplier:
1106+
case TSI::pl_multiplier:
11071107
dPlHeatingDT += -delta_alpha_i_[gp] *
11081108
(0. + inityield() * yield_soft() + isohard() * hard_soft() * aI +
11091109
(infyield() * hard_soft() - inityield() * yield_soft()) *
11101110
(1. - exp(-expisohard() * aI)));
11111111
break;
1112-
case Inpar::TSI::pl_flow:
1112+
case TSI::pl_flow:
11131113
// do nothing
11141114
break;
11151115
default:
@@ -1128,7 +1128,7 @@ void Mat::PlasticElastHyper::evaluate_ncp(const Core::LinAlg::Matrix<3, 3>* mStr
11281128
exp(-expisohard() * aI));
11291129
switch (dis_mode())
11301130
{
1131-
case Inpar::TSI::pl_multiplier:
1131+
case TSI::pl_multiplier:
11321132
dPlHeatingDdai +=
11331133
+inityield() * (1. - yield_soft() * dT) +
11341134
isohard() * (1. - hard_soft() * dT) *
@@ -1137,7 +1137,7 @@ void Mat::PlasticElastHyper::evaluate_ncp(const Core::LinAlg::Matrix<3, 3>* mStr
11371137
((1. - exp(-expisohard() * aI)) +
11381138
delta_alpha_i_[gp] * expisohard() * exp(-expisohard() * aI));
11391139
break;
1140-
case Inpar::TSI::pl_flow:
1140+
case TSI::pl_flow:
11411141
// do nothing
11421142
break;
11431143
default:
@@ -1159,7 +1159,7 @@ void Mat::PlasticElastHyper::evaluate_ncp(const Core::LinAlg::Matrix<3, 3>* mStr
11591159
-2. * dPlHeatingDdai * abseta_H * dDpHeta / (pow(absHeta, 4.)), HetaH_strainlike, 1.);
11601160
}
11611161

1162-
if (dis_mode() == Inpar::TSI::pl_flow) dHpDeta.update(1., deltaDp_v_strainlike, 1.);
1162+
if (dis_mode() == TSI::pl_flow) dHpDeta.update(1., deltaDp_v_strainlike, 1.);
11631163

11641164
// derivative w.r.t. C
11651165
dHdC->multiply_tn(*dMdC, dHpDeta);
@@ -1171,7 +1171,7 @@ void Mat::PlasticElastHyper::evaluate_ncp(const Core::LinAlg::Matrix<3, 3>* mStr
11711171
tmp61.multiply(PlAniso_full_, eta_v_strainlike);
11721172
dHdDp->update(dPlHeatingDdai * abseta_H / (absHeta * absHeta), tmp61, 1.);
11731173
}
1174-
if (dis_mode() == Inpar::TSI::pl_flow) dHdDp->update(1., eta_v_strainlike, 1.);
1174+
if (dis_mode() == TSI::pl_flow) dHdDp->update(1., eta_v_strainlike, 1.);
11751175

11761176
// scaling with time step
11771177
plHeating /= dt;

src/mat/4C_mat_plasticelasthyper.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
#include "4C_config.hpp"
1414

1515
#include "4C_comm_parobjectfactory.hpp"
16-
#include "4C_inpar_tsi.hpp"
1716
#include "4C_mat_elasthyper.hpp"
1817
#include "4C_mat_so3_material.hpp"
1918
#include "4C_material_parameter_base.hpp"
19+
#include "4C_tsi_input.hpp"
2020

2121
#define AS_CONVERGENCE_TOL 1.e-12
2222

@@ -98,7 +98,7 @@ namespace Mat
9898
/// stabilization parameter "s" controlling the shape of the NCP function
9999
double stab_s_;
100100
/// method to calculate plastic dissipation in TSI problem
101-
Inpar::TSI::DissipationMode dis_mode_;
101+
TSI::DissipationMode dis_mode_;
102102

103103

104104
/// create material instance of matching type with my parameters
@@ -262,18 +262,18 @@ namespace Mat
262262
virtual double taylor_quinney() const { return mat_params()->taylor_quinney_; }
263263

264264
/// set dissipation mode
265-
virtual void set_dissipation_mode(Inpar::TSI::DissipationMode mode)
265+
virtual void set_dissipation_mode(TSI::DissipationMode mode)
266266
{
267267
if (mat_params() != nullptr) mat_params()->dis_mode_ = mode;
268268
}
269269

270270
/// get dissipation mode
271-
virtual Inpar::TSI::DissipationMode dis_mode() const
271+
virtual TSI::DissipationMode dis_mode() const
272272
{
273273
if (mat_params() != nullptr)
274274
return mat_params()->dis_mode_;
275275
else
276-
return (Inpar::TSI::DissipationMode)0;
276+
return (TSI::DissipationMode)0;
277277
}
278278

279279
/// evaluate quantities for elastic stiffness matrix
@@ -397,7 +397,7 @@ namespace Mat
397397

398398
/// setup material TSI data
399399
virtual void setup_tsi(const int numgp, const int numdofperelement, const bool eas,
400-
const Inpar::TSI::DissipationMode mode);
400+
const TSI::DissipationMode mode);
401401

402402
/// setup plastic orthotropy tensor H
403403
virtual void setup_hill_plasticity(const Core::IO::InputParameterContainer& container);

0 commit comments

Comments
 (0)