Skip to content

Commit 2c2aae1

Browse files
authored
Merge pull request #693 from sebproell/typedefs
Remove the `typedef` keyword
2 parents e527607 + 3b97b80 commit 2c2aae1

File tree

111 files changed

+491
-691
lines changed

Some content is hidden

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

111 files changed

+491
-691
lines changed

src/art_net/4C_art_net_artery_ele_calc_lin_exp.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace Discret
3737
class ArteryEleCalcLinExp : public ArteryEleCalc<distype>
3838
{
3939
private:
40-
typedef ArteryEleCalc<distype> my;
40+
using my = ArteryEleCalc<distype>;
4141

4242
/// private constructor, since we are a Singleton.
4343
ArteryEleCalcLinExp(const int numdofpernode, const std::string& disname);

src/art_net/4C_art_net_artery_ele_calc_pres_based.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace Discret
3737
class ArteryEleCalcPresBased : public ArteryEleCalc<distype>
3838
{
3939
private:
40-
typedef ArteryEleCalc<distype> my;
40+
using my = ArteryEleCalc<distype>;
4141

4242
/// private constructor, since we are a Singleton.
4343
ArteryEleCalcPresBased(const int numdofpernode, const std::string& disname);

src/beam3/4C_beam3_kirchhoff.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#include <memory>
2828

29-
typedef Sacado::Fad::DFad<double> FAD;
29+
using FAD = Sacado::Fad::DFad<double>;
3030

3131
#define REFERENCE_NODE \
3232
2 // number of reference-node for the calculation of the rotation of the other triads (local

src/beam3/4C_beam3_reissner.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
FOUR_C_NAMESPACE_OPEN
2828

29-
typedef Sacado::Fad::DFad<double> FAD;
29+
using FAD = Sacado::Fad::DFad<double>;
3030

3131
// forward declaration ...
3232
namespace Core::LinAlg

src/beaminteraction/src/4C_beaminteraction_beam_to_beam_contact_defines.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ NEIGHBORTOL ca. 3, since the sum of |xi1| and |xi2| has to be larger than three
103103
FOUR_C_THROW(
104104
"check functionality of FAD based linearization in case of beam3k and beam3r with Hermite cl "
105105
"intpol");
106-
typedef Sacado::Fad::DFad<double> TYPE;
106+
using TYPE = Sacado::Fad::DFad<double>;
107107
// #define FADCHECKS //Decide whether FAD checks via Sacado are printed as output or not
108108
#else
109-
typedef double TYPE;
109+
using TYPE = double;
110110
#endif
111111

112112
#define CHECKBOUNDARYCONTACT // Detection of beam ends in order to open the contact, when one beam
@@ -227,7 +227,7 @@ FOUR_C_THROW("CONSISTENTTRANSITION does not work in combination with ENDPOINTSEG
227227
// #define AUTOMATICDIFFBTS // Decide if automatic differentiation via Sacado
228228
// is used default: Off
229229
#ifdef AUTOMATICDIFFBTS
230-
typedef Sacado::Fad::DFad<double> TYPEBTS;
230+
using TYPEBTS = Sacado::Fad::DFad<double>;
231231
// #define FADCHECKSTIFFNESS // Decide if FAD checks for contact stiffness are
232232
// printed as output
233233
#ifndef FADCHECKSTIFFNESS
@@ -238,7 +238,7 @@ typedef Sacado::Fad::DFad<double> TYPEBTS;
238238
// gauss points are printed as output
239239
#endif
240240
#else
241-
typedef double TYPEBTS;
241+
using TYPEBTS = double;
242242
#endif
243243

244244
// #define FDCHECKSTIFFNESS // Decide if differentiation via finite

src/beaminteraction/src/4C_beaminteraction_beam_to_beam_contact_utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
FOUR_C_NAMESPACE_OPEN
2626

27-
typedef Sacado::Fad::DFad<double> FAD;
27+
using FAD = Sacado::Fad::DFad<double>;
2828

2929
namespace BeamInteraction
3030
{

src/beaminteraction/src/4C_beaminteraction_str_model_evaluator.hpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,10 @@ namespace Solid
5858
class BeamInteraction : public Generic
5959
{
6060
public:
61-
typedef std::map<enum Inpar::BeamInteraction::SubModelType,
62-
std::shared_ptr<FourC::BeamInteraction::SUBMODELEVALUATOR::Generic>>
63-
Map;
64-
typedef std::vector<std::shared_ptr<FourC::BeamInteraction::SUBMODELEVALUATOR::Generic>>
65-
Vector;
61+
using Map = std::map<enum Inpar::BeamInteraction::SubModelType,
62+
std::shared_ptr<FourC::BeamInteraction::SUBMODELEVALUATOR::Generic>>;
63+
using Vector =
64+
std::vector<std::shared_ptr<FourC::BeamInteraction::SUBMODELEVALUATOR::Generic>>;
6665

6766
//! constructor
6867
BeamInteraction();

src/contact/4C_contact_coupling2d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ void CONTACT::Coupling2dManager::consistent_dual_shape()
459459
}
460460

461461
// map iterator
462-
typedef Core::Gen::Pairedvector<int, double>::const_iterator _CI;
462+
using _CI = Core::Gen::Pairedvector<int, double>::const_iterator;
463463

464464
// no overlap: the applied dual shape functions don't matter, as the integration domain is void
465465
if ((ximax == -1.0 && ximin == 1.0) || (ximax - ximin < 4. * MORTARINTLIM)) return;

src/contact/4C_contact_coupling3d.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,8 @@ bool CONTACT::Coupling3d::slave_vertex_linearization(
384384
sIntEle->node_linearization(nodelin);
385385

386386
// map iterator
387-
typedef Core::Gen::Pairedvector<int, double>::const_iterator
388-
_CI; // linearization of element center Auxc()
387+
using _CI = Core::Gen::Pairedvector<int,
388+
double>::const_iterator; // linearization of element center Auxc()
389389
std ::vector<Core::Gen::Pairedvector<int, double>> linauxc(
390390
3, slave_element().num_node()); // assume 3 dofs per node
391391

@@ -523,8 +523,8 @@ bool CONTACT::Coupling3d::master_vertex_linearization(
523523
sIntEle->node_linearization(snodelin);
524524

525525
// map iterator
526-
typedef Core::Gen::Pairedvector<int, double>::const_iterator
527-
_CI; // linearization of element center Auxc()
526+
using _CI = Core::Gen::Pairedvector<int,
527+
double>::const_iterator; // linearization of element center Auxc()
528528
std ::vector<Core::Gen::Pairedvector<int, double>> linauxc(
529529
3, slave_element().num_node()); // assume 3 dofs per node
530530

@@ -639,7 +639,7 @@ bool CONTACT::Coupling3d::lineclip_vertex_linearization(const Mortar::Vertex& cu
639639
const int nmrows = master_int_element().num_node();
640640

641641
// iterator
642-
typedef Core::Gen::Pairedvector<int, double>::const_iterator _CI;
642+
using _CI = Core::Gen::Pairedvector<int, double>::const_iterator;
643643

644644
// compute factor Z
645645
std::array<double, 3> crossZ = {0.0, 0.0, 0.0};
@@ -840,7 +840,7 @@ bool CONTACT::Coupling3d::center_linearization(
840840
{
841841
// preparations
842842
int clipsize = (int)(clip().size());
843-
typedef Core::Gen::Pairedvector<int, double>::const_iterator CI;
843+
using CI = Core::Gen::Pairedvector<int, double>::const_iterator;
844844

845845
// number of nodes
846846
const int nsrows = slave_element().num_node();
@@ -1689,7 +1689,7 @@ void CONTACT::Coupling3dManager::consistent_dual_shape()
16891689

16901690
// various variables
16911691
double detg = 0.0;
1692-
typedef Core::Gen::Pairedvector<int, double>::const_iterator _CI;
1692+
using _CI = Core::Gen::Pairedvector<int, double>::const_iterator;
16931693

16941694
// initialize matrices de and me
16951695
Core::LinAlg::SerialDenseMatrix me(nnodes, nnodes, true);
@@ -1928,8 +1928,8 @@ void CONTACT::Coupling3dManager::consistent_dual_shape()
19281928
// (this is done according to a quite complex formula, which
19291929
// we get from the linearization of the biorthogonality condition:
19301930
// Lin (Me * Ae = De) -> Lin(Ae)=Lin(De)*Inv(Me)-Ae*Lin(Me)*Inv(Me) )
1931-
typedef Core::Gen::Pairedvector<int,
1932-
Core::LinAlg::Matrix<max_nnodes + 1, max_nnodes>>::const_iterator _CIM;
1931+
using _CIM = Core::Gen::Pairedvector<int,
1932+
Core::LinAlg::Matrix<max_nnodes + 1, max_nnodes>>::const_iterator;
19331933
for (_CIM p = derivde_new.begin(); p != derivde_new.end(); ++p)
19341934
{
19351935
Core::LinAlg::Matrix<max_nnodes + 1, max_nnodes>& dtmp = derivde_new[p->first];

0 commit comments

Comments
 (0)