Skip to content

Commit a5ee75d

Browse files
committed
clang-format
1 parent 359bbfe commit a5ee75d

35 files changed

Lines changed: 215 additions & 214 deletions

bindings/c/src/Behaviour.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ mgis_status mgis_bv_behaviour_get_internal_state_variable_name(
595595
}
596596
} // end of mgis_bv_behaviour_get_internal_state_variable_name
597597

598-
namespace c_internals{
598+
namespace c_internals {
599599

600600
static mgis_status getVariableType(mgis_bv_VariableType& t,
601601
const mgis::behaviour::Variable& v) {

bindings/c/src/Integrate.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@ mgis_status mgis_bv_behaviour_integration_options_set_speed_of_sound_flag(
8282
return mgis_report_failure("invalid argument");
8383
}
8484
if (s == MGIS_BV_INTEGRATION_WITHOUT_SPEED_OF_SOUND) {
85-
o->compute_speed_of_sound = static_cast<bool>(mgis::behaviour::SpeedOfSoundFlag::INTEGRATION_WITHOUT_SPEED_OF_SOUND);
85+
o->compute_speed_of_sound = static_cast<bool>(
86+
mgis::behaviour::SpeedOfSoundFlag::INTEGRATION_WITHOUT_SPEED_OF_SOUND);
8687
} else if (s == MGIS_BV_INTEGRATION_WITH_SPEED_OF_SOUND) {
87-
o->compute_speed_of_sound = static_cast<bool>(mgis::behaviour::SpeedOfSoundFlag::INTEGRATION_WITH_SPEED_OF_SOUND);
88+
o->compute_speed_of_sound = static_cast<bool>(
89+
mgis::behaviour::SpeedOfSoundFlag::INTEGRATION_WITH_SPEED_OF_SOUND);
8890
} else {
8991
return mgis_report_failure("invalid speed of sound flag");
9092
}
@@ -157,7 +159,6 @@ mgis_status mgis_bv_integrate_material_data_manager_with_options(
157159
return mgis_report_success();
158160
} // end of mgis_bv_integrate_material_data_manager_with_options
159161

160-
161162
mgis_status mgis_bv_integrate_material_data_manager_part(
162163
int* const r,
163164
mgis_bv_MaterialDataManager* const m,

bindings/c/src/MaterialStateManager.cxx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ mgis_status mgis_bv_material_state_manager_set_non_uniform_material_property(
270270
const auto& mp = getVariable(m->b.mps, n);
271271
const auto mpsize = getVariableSize(mp, m->b.hypothesis);
272272
if (s == MGIS_BV_LOCAL_STORAGE) {
273-
setMaterialProperty(*m, n, {v, static_cast<mgis_size_type>(m->n * mpsize)},
273+
setMaterialProperty(*m, n,
274+
{v, static_cast<mgis_size_type>(m->n * mpsize)},
274275
mgis::behaviour::MaterialStateManager::LOCAL_STORAGE);
275276
} else {
276277
setMaterialProperty(
@@ -317,8 +318,7 @@ mgis_status mgis_bv_material_state_manager_is_material_property_uniform(
317318

318319
MGIS_C_EXPORT mgis_status
319320
mgis_bv_material_state_manager_set_uniform_scalar_mass_density(
320-
mgis_bv_MaterialStateManager* const m,
321-
const mgis_real v) {
321+
mgis_bv_MaterialStateManager* const m, const mgis_real v) {
322322
if (m == nullptr) {
323323
return mgis_report_failure("null state manager");
324324
}
@@ -355,8 +355,7 @@ mgis_status mgis_bv_material_state_manager_set_non_uniform_mass_density(
355355
} // end of mgis_bv_material_state_manager_set_non_uniform_mass_density
356356

357357
mgis_status mgis_bv_material_state_manager_is_mass_density_defined(
358-
int* const b,
359-
const mgis_bv_MaterialStateManager* const m) {
358+
int* const b, const mgis_bv_MaterialStateManager* const m) {
360359
*b = 0;
361360
if (m == nullptr) {
362361
return mgis_report_failure("null state manager");
@@ -370,8 +369,7 @@ mgis_status mgis_bv_material_state_manager_is_mass_density_defined(
370369
} // end of mgis_bv_material_state_manager_is_mass_density_defined
371370

372371
mgis_status mgis_bv_material_state_manager_is_mass_density_uniform(
373-
int* const b,
374-
const mgis_bv_MaterialStateManager* const m) {
372+
int* const b, const mgis_bv_MaterialStateManager* const m) {
375373
*b = 0;
376374
if (m == nullptr) {
377375
return mgis_report_failure("null state manager");
@@ -401,8 +399,7 @@ mgis_bv_material_state_manager_set_uniform_scalar_external_state_variable(
401399
} // end of
402400
// mgis_bv_material_state_manager_set_uniform_scalar_external_state_variable
403401

404-
mgis_status
405-
mgis_bv_material_state_manager_set_uniform_external_state_variable(
402+
mgis_status mgis_bv_material_state_manager_set_uniform_external_state_variable(
406403
mgis_bv_MaterialStateManager* const m,
407404
const char* const n,
408405
mgis_real* const v,
@@ -452,7 +449,7 @@ mgis_bv_material_state_manager_set_non_uniform_external_state_variable(
452449
mgis::behaviour::MaterialStateManager::LOCAL_STORAGE);
453450
} else {
454451
setExternalStateVariable(
455-
*m, n, {v, static_cast<mgis_size_type>(esvsize * m->n)},
452+
*m, n, {v, static_cast<mgis_size_type>(esvsize * m->n)},
456453
mgis::behaviour::MaterialStateManager::EXTERNAL_STORAGE);
457454
}
458455
} catch (...) {

bindings/c/src/Model.cxx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* \file Model.cxx
3-
* \brief
3+
* \brief
44
* \author Thomas Helfer
55
* \date 14/10/2021
66
* \copyright (C) Copyright Thomas Helfer 2018.
@@ -17,9 +17,9 @@
1717
extern "C" {
1818

1919
mgis_status mgis_model_load(mgis_model_Model** ptr,
20-
const char* const l,
21-
const char* const m,
22-
const char* const h) {
20+
const char* const l,
21+
const char* const m,
22+
const char* const h) {
2323
*ptr = nullptr;
2424
try {
2525
const auto model = mgis::model::load(l, m, mgis::behaviour::fromString(h));
@@ -39,5 +39,4 @@ mgis_status mgis_model_free_model(mgis_model_Model** m) {
3939
return mgis_bv_free_behaviour(m);
4040
} // end of mgis_model_free_model
4141

42-
} // end of extern "C"
43-
42+
} // end of extern "C"

bindings/c/src/State.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ mgis_status mgis_bv_state_get_material_property_by_offset(
222222
}
223223
return mgis_report_success();
224224
} // end of mgis_bv_state_get_material_property_by_offset
225-
225+
226226
mgis_status mgis_bv_state_set_internal_state_variable_by_name(
227227
mgis_bv_State* const s, const char* const n, const mgis_real* const v) {
228228
if (s == nullptr) {
@@ -242,22 +242,22 @@ mgis_status mgis_bv_state_set_internal_state_variable_by_name(
242242
return mgis_report_success();
243243
} // end of mgis_bv_state_set_internal_state_variable_by_name
244244

245-
mgis_status mgis_bv_state_get_internal_state_variables(
246-
mgis_real** v, mgis_bv_State* const s) {
245+
mgis_status mgis_bv_state_get_internal_state_variables(mgis_real** v,
246+
mgis_bv_State* const s) {
247247
if (s == nullptr) {
248248
return mgis_report_failure("invalid argument (null state)");
249249
}
250250
if (v == nullptr) {
251251
return mgis_report_failure("invalid argument (null values)");
252252
}
253-
if(s->internal_state_variables.empty()){
253+
if (s->internal_state_variables.empty()) {
254254
*v = nullptr;
255255
return mgis_report_failure("no internal state variables declared");
256256
}
257257
*v = s->internal_state_variables.data();
258258
return mgis_report_success();
259259
} // end of mgis_bv_state_get_internal_state_variable_by_name
260-
260+
261261
mgis_status mgis_bv_state_get_internal_state_variable_by_name(
262262
mgis_real** v, mgis_bv_State* const s, const char* const n) {
263263
if (s == nullptr) {
@@ -337,15 +337,15 @@ mgis_status mgis_bv_state_set_external_state_variable_by_name(
337337
return mgis_report_success();
338338
} // end of mgis_bv_state_set_external_state_variable_by_name
339339

340-
mgis_status mgis_bv_state_get_external_state_variables(
341-
mgis_real** v, mgis_bv_State* const s) {
340+
mgis_status mgis_bv_state_get_external_state_variables(mgis_real** v,
341+
mgis_bv_State* const s) {
342342
if (s == nullptr) {
343343
return mgis_report_failure("invalid argument (null state)");
344344
}
345345
if (v == nullptr) {
346346
return mgis_report_failure("invalid argument (null values)");
347347
}
348-
if(s->external_state_variables.empty()){
348+
if (s->external_state_variables.empty()) {
349349
*v = nullptr;
350350
return mgis_report_failure("no external state variables declared");
351351
}

bindings/python/src/Integrate.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ static int BehaviourDataView_executeInitializeFunction2(
4949

5050
static mgis::behaviour::BehaviourIntegrationResult
5151
MaterialDataManager_executeInitializeFunction(
52-
mgis::behaviour::MaterialDataManager& m,
53-
const std::string& n) {
52+
mgis::behaviour::MaterialDataManager& m, const std::string& n) {
5453
return mgis::behaviour::executeInitializeFunction(m, n);
5554
}
5655

bindings/python/src/MaterialStateManager.cxx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ static void MaterialStateManager_setMaterialProperty2(
103103
} // end of MaterialStateManager_setMaterialProperty
104104

105105
static void MaterialStateManager_setMassDensity(
106-
mgis::behaviour::MaterialStateManager& s,
107-
const mgis::real v) {
106+
mgis::behaviour::MaterialStateManager& s, const mgis::real v) {
108107
mgis::behaviour::setMassDensity(s, v);
109108
} // end of MaterialStateManager_setMassDensity
110109

@@ -198,10 +197,8 @@ void declareMaterialStateManager() {
198197
&MaterialStateManager_setMaterialProperty);
199198
boost::python::def("setMaterialProperty",
200199
&MaterialStateManager_setMaterialProperty2);
201-
boost::python::def("setMassDensity",
202-
&MaterialStateManager_setMassDensity);
203-
boost::python::def("setMassDensity",
204-
&MaterialStateManager_setMassDensity2);
200+
boost::python::def("setMassDensity", &MaterialStateManager_setMassDensity);
201+
boost::python::def("setMassDensity", &MaterialStateManager_setMassDensity2);
205202
boost::python::def("setExternalStateVariable",
206203
&MaterialStateManager_setExternalStateVariable);
207204
boost::python::def("setExternalStateVariable",

bindings/python/src/Variable.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ static mgis::size_type getVariableOffsetByString(
4646

4747
// mgis::string_view is not exposed
4848
static const mgis::behaviour::Variable& getVariableByString(
49-
const std::vector<mgis::behaviour::Variable>& vs,
50-
const std::string& n) {
49+
const std::vector<mgis::behaviour::Variable>& vs, const std::string& n) {
5150
return mgis::behaviour::getVariable(vs, n);
5251
} // getVariableByString
5352

@@ -56,7 +55,8 @@ static mgis::size_type getVariableSizeByString(
5655
const std::vector<mgis::behaviour::Variable>& vs,
5756
const std::string& n,
5857
const mgis::behaviour::Hypothesis h) {
59-
return mgis::behaviour::getVariableSize(mgis::behaviour::getVariable(vs, n), h);
58+
return mgis::behaviour::getVariableSize(mgis::behaviour::getVariable(vs, n),
59+
h);
6060
} // getVariableSizeByString
6161

6262
// forward declaration

bindings/python/src/model-module.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@
1717
// forward declaration
1818
void declareModel();
1919

20-
BOOST_PYTHON_MODULE(model) {
21-
declareModel();
22-
} // end of module model
20+
BOOST_PYTHON_MODULE(model) { declareModel(); } // end of module model

include/MGIS/Behaviour/FiniteStrainBehaviourOptions.hxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace mgis::behaviour {
3333
*
3434
* where \f(F\f) is the deformation gradient and \f(J\f) its determinant.
3535
*
36-
* \note some authors use a different convention to define the
36+
* \note some authors use a different convention to define the
3737
* first Piola-Kirchhoff stress using the transpose of \f(P\f)
3838
*/
3939
enum StressMeasure {
@@ -53,7 +53,8 @@ namespace mgis::behaviour {
5353
DPK1_DF, /*!< derivative of the first Piola-Kirchoff stress with
5454
respect to the deformation gradient */
5555
DTAU_DDF /*!< derivative of the Kirchoff stress with
56-
respect to the spatial increment of the deformation gradient */
56+
respect to the spatial increment of the deformation gradient
57+
*/
5758
} tangent_operator = DSIG_DF;
5859
}; // end of struct FiniteStrainBehaviourOptions
5960

0 commit comments

Comments
 (0)