Skip to content

Commit 633c5af

Browse files
committed
Remove utils namespace
1 parent 1aa72b6 commit 633c5af

23 files changed

+325
-350
lines changed

src/porofluid_pressure_based/4C_porofluid_pressure_based_dyn.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void porofluidmultiphase_dyn(int restart)
8686
case Inpar::ArteryNetwork::ArteryPoroMultiphaseScatraCouplingMethod::ntp:
8787
{
8888
actdis->fill_complete();
89-
nearbyelepairs = POROFLUIDMULTIPHASE::Utils::extended_ghosting_artery_discretization(
89+
nearbyelepairs = POROFLUIDMULTIPHASE::extended_ghosting_artery_discretization(
9090
*actdis, arterydis, evaluate_on_lateral_surface, arterycoupl);
9191
break;
9292
}
@@ -123,7 +123,7 @@ void porofluidmultiphase_dyn(int restart)
123123
Teuchos::getIntegralValue<POROFLUIDMULTIPHASE::TimeIntegrationScheme>(porodyn, "TIMEINTEGR");
124124

125125
// build poro fluid time integrator
126-
std::shared_ptr<Adapter::PoroFluidMultiphase> algo = POROFLUIDMULTIPHASE::Utils::create_algorithm(
126+
std::shared_ptr<Adapter::PoroFluidMultiphase> algo = POROFLUIDMULTIPHASE::create_algorithm(
127127
timintscheme, actdis, linsolvernumber, porodyn, porodyn, output);
128128

129129
// initialize
@@ -140,7 +140,7 @@ void porofluidmultiphase_dyn(int restart)
140140
// assign poro material for evaluation of porosity
141141
// note: to be done after potential restart, as in read_restart()
142142
// the secondary material is destroyed
143-
POROFLUIDMULTIPHASE::Utils::setup_material(comm, struct_disname, fluid_disname);
143+
POROFLUIDMULTIPHASE::setup_material(comm, struct_disname, fluid_disname);
144144

145145
// 4.- Run of the actual problem.
146146
algo->time_loop();

src/porofluid_pressure_based/4C_porofluid_pressure_based_meshtying_strategy_artery.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ POROFLUIDMULTIPHASE::MeshtyingStrategyArtery::MeshtyingStrategyArtery(
8686
});
8787

8888
// initialize mesh tying object
89-
arttoporofluidcoupling_ = PoroMultiPhaseScaTra::Utils::create_and_init_artery_coupling_strategy(
89+
arttoporofluidcoupling_ = PoroMultiPhaseScaTra::create_and_init_artery_coupling_strategy(
9090
arterydis_, porofluidmultitimint->discretization(), poroparams.sublist("ARTERY COUPLING"),
9191
couplingcondname, "COUPLEDDOFS_ART", "COUPLEDDOFS_PORO", evaluate_on_lateral_surface);
9292

@@ -219,25 +219,25 @@ void POROFLUIDMULTIPHASE::MeshtyingStrategyArtery::calculate_norms(std::vector<d
219219
incprenorm.resize(2);
220220
prenorm.resize(2);
221221

222-
prenorm[0] = Utils::calculate_vector_norm(vectornorminc_, *porofluidmultitimint_->phinp());
223-
prenorm[1] = Utils::calculate_vector_norm(vectornorminc_, *artnettimint_->pressurenp());
222+
prenorm[0] = calculate_vector_norm(vectornorminc_, *porofluidmultitimint_->phinp());
223+
prenorm[1] = calculate_vector_norm(vectornorminc_, *artnettimint_->pressurenp());
224224

225225
std::shared_ptr<const Core::LinAlg::Vector<double>> arterypressinc;
226226
std::shared_ptr<const Core::LinAlg::Vector<double>> porofluidinc;
227227

228228
arttoporofluidcoupling_->extract_single_field_vectors(
229229
comb_increment_, porofluidinc, arterypressinc);
230230

231-
incprenorm[0] = Utils::calculate_vector_norm(vectornorminc_, *porofluidinc);
232-
incprenorm[1] = Utils::calculate_vector_norm(vectornorminc_, *arterypressinc);
231+
incprenorm[0] = calculate_vector_norm(vectornorminc_, *porofluidinc);
232+
incprenorm[1] = calculate_vector_norm(vectornorminc_, *arterypressinc);
233233

234234
std::shared_ptr<const Core::LinAlg::Vector<double>> arterypressrhs;
235235
std::shared_ptr<const Core::LinAlg::Vector<double>> porofluidrhs;
236236

237237
arttoporofluidcoupling_->extract_single_field_vectors(rhs_, porofluidrhs, arterypressrhs);
238238

239-
preresnorm[0] = Utils::calculate_vector_norm(vectornormfres_, *porofluidrhs);
240-
preresnorm[1] = Utils::calculate_vector_norm(vectornormfres_, *arterypressrhs);
239+
preresnorm[0] = calculate_vector_norm(vectornormfres_, *porofluidrhs);
240+
preresnorm[1] = calculate_vector_norm(vectornormfres_, *arterypressrhs);
241241

242242
return;
243243
}

src/porofluid_pressure_based/4C_porofluid_pressure_based_meshtying_strategy_std.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ void POROFLUIDMULTIPHASE::MeshtyingStrategyStd::calculate_norms(std::vector<doub
7878
incprenorm.resize(1);
7979
prenorm.resize(1);
8080

81-
preresnorm[0] = Utils::calculate_vector_norm(vectornormfres_, *porofluidmultitimint_->rhs());
82-
incprenorm[0] = Utils::calculate_vector_norm(vectornorminc_, *increment);
83-
prenorm[0] = Utils::calculate_vector_norm(vectornorminc_, *porofluidmultitimint_->phinp());
81+
preresnorm[0] = calculate_vector_norm(vectornormfres_, *porofluidmultitimint_->rhs());
82+
incprenorm[0] = calculate_vector_norm(vectornorminc_, *increment);
83+
prenorm[0] = calculate_vector_norm(vectornorminc_, *porofluidmultitimint_->phinp());
8484

8585
return;
8686
}

src/porofluid_pressure_based/4C_porofluid_pressure_based_timint_implicit.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ void POROFLUIDMULTIPHASE::TimIntImpl::collect_runtime_output_data()
634634
{
635635
// convert dof-based Epetra vector into node-based Epetra multi-vector for postprocessing
636636
std::shared_ptr<Core::LinAlg::MultiVector<double>> solidpressure_multi =
637-
POROFLUIDMULTIPHASE::Utils::convert_dof_vector_to_node_based_multi_vector(
637+
POROFLUIDMULTIPHASE::convert_dof_vector_to_node_based_multi_vector(
638638
*discret_, *solidpressure_, nds_solidpressure_, 1);
639639

640640
visualization_writer_->append_result_data_vector_with_context(
@@ -650,7 +650,7 @@ void POROFLUIDMULTIPHASE::TimIntImpl::collect_runtime_output_data()
650650

651651
// convert dof-based Epetra vector into node-based Epetra multi-vector for postprocessing
652652
std::shared_ptr<Core::LinAlg::MultiVector<double>> dispnp_multi =
653-
POROFLUIDMULTIPHASE::Utils::convert_dof_vector_to_node_based_multi_vector(
653+
POROFLUIDMULTIPHASE::convert_dof_vector_to_node_based_multi_vector(
654654
*discret_, *dispnp, nds_disp_, nsd_);
655655

656656
std::vector<std::optional<std::string>> context(nsd_, "ale-displacement");
@@ -721,7 +721,7 @@ void POROFLUIDMULTIPHASE::TimIntImpl::collect_runtime_output_data()
721721
{
722722
// convert dof-based Epetra vector into node-based Epetra multi-vector for postprocessing
723723
std::shared_ptr<Core::LinAlg::MultiVector<double>> porosity_multi =
724-
POROFLUIDMULTIPHASE::Utils::convert_dof_vector_to_node_based_multi_vector(
724+
POROFLUIDMULTIPHASE::convert_dof_vector_to_node_based_multi_vector(
725725
*discret_, *porosity_, nds_solidpressure_, 1);
726726

727727
visualization_writer_->append_result_data_vector_with_context(

src/porofluid_pressure_based/4C_porofluid_pressure_based_utils.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ namespace
6565

6666
/*----------------------------------------------------------------------*/
6767
/*----------------------------------------------------------------------*/
68-
void POROFLUIDMULTIPHASE::Utils::setup_material(
68+
void POROFLUIDMULTIPHASE::setup_material(
6969
MPI_Comm comm, const std::string& struct_disname, const std::string& fluid_disname)
7070
{
7171
// get the fluid discretization
@@ -131,7 +131,7 @@ void POROFLUIDMULTIPHASE::Utils::setup_material(
131131
/*----------------------------------------------------------------------*/
132132
/*----------------------------------------------------------------------*/
133133
std::shared_ptr<Core::LinAlg::MultiVector<double>>
134-
POROFLUIDMULTIPHASE::Utils::convert_dof_vector_to_node_based_multi_vector(
134+
POROFLUIDMULTIPHASE::convert_dof_vector_to_node_based_multi_vector(
135135
const Core::FE::Discretization& dis, const Core::LinAlg::Vector<double>& vector, const int nds,
136136
const int numdofpernode)
137137
{
@@ -158,7 +158,7 @@ POROFLUIDMULTIPHASE::Utils::convert_dof_vector_to_node_based_multi_vector(
158158
/*----------------------------------------------------------------------*
159159
| create algorithm |
160160
*----------------------------------------------------------------------*/
161-
std::shared_ptr<Adapter::PoroFluidMultiphase> POROFLUIDMULTIPHASE::Utils::create_algorithm(
161+
std::shared_ptr<Adapter::PoroFluidMultiphase> POROFLUIDMULTIPHASE::create_algorithm(
162162
POROFLUIDMULTIPHASE::TimeIntegrationScheme timintscheme,
163163
std::shared_ptr<Core::FE::Discretization> dis, const int linsolvernumber,
164164
const Teuchos::ParameterList& probparams, const Teuchos::ParameterList& poroparams,
@@ -192,7 +192,7 @@ std::shared_ptr<Adapter::PoroFluidMultiphase> POROFLUIDMULTIPHASE::Utils::create
192192
/*--------------------------------------------------------------------------*
193193
| perform extended ghosting for artery dis kremheller 03/19 |
194194
*--------------------------------------------------------------------------*/
195-
std::map<int, std::set<int>> POROFLUIDMULTIPHASE::Utils::extended_ghosting_artery_discretization(
195+
std::map<int, std::set<int>> POROFLUIDMULTIPHASE::extended_ghosting_artery_discretization(
196196
Core::FE::Discretization& contdis, std::shared_ptr<Core::FE::Discretization> artdis,
197197
const bool evaluate_on_lateral_surface,
198198
const Inpar::ArteryNetwork::ArteryPoroMultiphaseScatraCouplingMethod couplingmethod)
@@ -287,7 +287,7 @@ std::map<int, std::set<int>> POROFLUIDMULTIPHASE::Utils::extended_ghosting_arter
287287
| create the fully overlapping artery discretization kremheller 03/19 |
288288
*--------------------------------------------------------------------------*/
289289
std::shared_ptr<Core::FE::Discretization>
290-
POROFLUIDMULTIPHASE::Utils::create_fully_overlapping_artery_discretization(
290+
POROFLUIDMULTIPHASE::create_fully_overlapping_artery_discretization(
291291
Core::FE::Discretization& artdis, std::string disname, bool doboundaryconditions)
292292
{
293293
// we clone a search discretization of the artery discretization on which the search will be
@@ -305,10 +305,10 @@ POROFLUIDMULTIPHASE::Utils::create_fully_overlapping_artery_discretization(
305305

306306
/*----------------------------------------------------------------------*
307307
*----------------------------------------------------------------------*/
308-
std::map<int, std::set<int>> POROFLUIDMULTIPHASE::Utils::oct_tree_search(
309-
Core::FE::Discretization& contdis, Core::FE::Discretization& artdis,
310-
Core::FE::Discretization& artsearchdis, const bool evaluate_on_lateral_surface,
311-
const std::vector<int> artEleGIDs, std::set<int>& elecolset, std::set<int>& nodecolset)
308+
std::map<int, std::set<int>> POROFLUIDMULTIPHASE::oct_tree_search(Core::FE::Discretization& contdis,
309+
Core::FE::Discretization& artdis, Core::FE::Discretization& artsearchdis,
310+
const bool evaluate_on_lateral_surface, const std::vector<int> artEleGIDs,
311+
std::set<int>& elecolset, std::set<int>& nodecolset)
312312
{
313313
// this map will be filled
314314
std::map<int, std::set<int>> nearbyelepairs;
@@ -401,7 +401,7 @@ std::map<int, std::set<int>> POROFLUIDMULTIPHASE::Utils::oct_tree_search(
401401
/*----------------------------------------------------------------------*
402402
| get axis-aligned bounding box of element kremheller 03/19 |
403403
*----------------------------------------------------------------------*/
404-
Core::LinAlg::Matrix<3, 2> POROFLUIDMULTIPHASE::Utils::get_aabb(Core::Elements::Element* ele,
404+
Core::LinAlg::Matrix<3, 2> POROFLUIDMULTIPHASE::get_aabb(Core::Elements::Element* ele,
405405
std::map<int, Core::LinAlg::Matrix<3, 1>>& positions, const bool evaluate_on_lateral_surface)
406406
{
407407
const Core::LinAlg::SerialDenseMatrix xyze_element(
@@ -432,7 +432,7 @@ Core::LinAlg::Matrix<3, 2> POROFLUIDMULTIPHASE::Utils::get_aabb(Core::Elements::
432432
/*----------------------------------------------------------------------*
433433
| get nodal positions kremheller 10/19 |
434434
*----------------------------------------------------------------------*/
435-
std::map<int, Core::LinAlg::Matrix<3, 1>> POROFLUIDMULTIPHASE::Utils::get_nodal_positions(
435+
std::map<int, Core::LinAlg::Matrix<3, 1>> POROFLUIDMULTIPHASE::get_nodal_positions(
436436
Core::FE::Discretization& dis, const Core::LinAlg::Map* nodemap)
437437
{
438438
std::map<int, Core::LinAlg::Matrix<3, 1>> positions;
@@ -453,7 +453,7 @@ std::map<int, Core::LinAlg::Matrix<3, 1>> POROFLUIDMULTIPHASE::Utils::get_nodal_
453453
/*----------------------------------------------------------------------*
454454
| get maximum nodal distance kremheller 05/18 |
455455
*----------------------------------------------------------------------*/
456-
double POROFLUIDMULTIPHASE::Utils::get_max_nodal_distance(
456+
double POROFLUIDMULTIPHASE::get_max_nodal_distance(
457457
Core::Elements::Element* ele, Core::FE::Discretization& dis)
458458
{
459459
double maxdist = 0.0;
@@ -493,7 +493,7 @@ double POROFLUIDMULTIPHASE::Utils::get_max_nodal_distance(
493493
/*----------------------------------------------------------------------*
494494
| calculate vector norm kremheller 12/17 |
495495
*----------------------------------------------------------------------*/
496-
double POROFLUIDMULTIPHASE::Utils::calculate_vector_norm(
496+
double POROFLUIDMULTIPHASE::calculate_vector_norm(
497497
const enum POROFLUIDMULTIPHASE::VectorNorm norm, const Core::LinAlg::Vector<double>& vect)
498498
{
499499
// L1 norm

0 commit comments

Comments
 (0)