Skip to content

Commit 95ac2f5

Browse files
committed
Remove PoroFluidMultiphase meshtying std
1 parent e527607 commit 95ac2f5

9 files changed

+187
-521
lines changed

src/porofluid_pressure_based/4C_porofluid_pressure_based_meshtying_strategy_artery.cpp

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,27 @@
1818
#include "4C_linear_solver_method_parameters.hpp"
1919
#include "4C_porofluid_pressure_based_elast_scatra_artery_coupling_base.hpp"
2020
#include "4C_porofluid_pressure_based_elast_scatra_utils.hpp"
21+
#include "4C_porofluid_pressure_based_timint_implicit.hpp"
2122
#include "4C_porofluid_pressure_based_utils.hpp"
2223

23-
#include <Teuchos_TimeMonitor.hpp>
24+
#include <Teuchos_StandardParameterEntryValidators.hpp>
2425

2526
FOUR_C_NAMESPACE_OPEN
2627

2728

2829
/*----------------------------------------------------------------------*
2930
| constructor (public) kremheller 04/18 |
3031
*----------------------------------------------------------------------*/
31-
PoroPressureBased::MeshtyingStrategyArtery::MeshtyingStrategyArtery(
32+
PoroPressureBased::MeshtyingArtery::MeshtyingArtery(
3233
PoroPressureBased::TimIntImpl* porofluidmultitimint, const Teuchos::ParameterList& probparams,
3334
const Teuchos::ParameterList& poroparams)
34-
: MeshtyingStrategyBase(porofluidmultitimint, probparams, poroparams)
35+
: porofluidmultitimint_(porofluidmultitimint),
36+
params_(probparams),
37+
poroparams_(poroparams),
38+
vectornormfres_(
39+
Teuchos::getIntegralValue<PoroPressureBased::VectorNorm>(poroparams_, "VECTORNORM_RESF")),
40+
vectornorminc_(
41+
Teuchos::getIntegralValue<PoroPressureBased::VectorNorm>(poroparams_, "VECTORNORM_INC"))
3542
{
3643
const Teuchos::ParameterList& artdyn = Global::Problem::instance()->arterial_dynamic_params();
3744

@@ -114,7 +121,7 @@ PoroPressureBased::MeshtyingStrategyArtery::MeshtyingStrategyArtery(
114121
/*----------------------------------------------------------------------*
115122
| prepare time loop kremheller 04/18 |
116123
*----------------------------------------------------------------------*/
117-
void PoroPressureBased::MeshtyingStrategyArtery::prepare_time_loop()
124+
void PoroPressureBased::MeshtyingArtery::prepare_time_loop()
118125
{
119126
artnettimint_->prepare_time_loop();
120127
return;
@@ -123,7 +130,7 @@ void PoroPressureBased::MeshtyingStrategyArtery::prepare_time_loop()
123130
/*----------------------------------------------------------------------*
124131
| setup the variables to do a new time step (public) kremheller 04/18 |
125132
*----------------------------------------------------------------------*/
126-
void PoroPressureBased::MeshtyingStrategyArtery::prepare_time_step()
133+
void PoroPressureBased::MeshtyingArtery::prepare_time_step()
127134
{
128135
artnettimint_->prepare_time_step();
129136
return;
@@ -133,7 +140,7 @@ void PoroPressureBased::MeshtyingStrategyArtery::prepare_time_step()
133140
| current solution becomes most recent solution of next timestep |
134141
| kremheller 04/18 |
135142
*----------------------------------------------------------------------*/
136-
void PoroPressureBased::MeshtyingStrategyArtery::update()
143+
void PoroPressureBased::MeshtyingArtery::update()
137144
{
138145
artnettimint_->time_update();
139146
return;
@@ -142,7 +149,7 @@ void PoroPressureBased::MeshtyingStrategyArtery::update()
142149
/*--------------------------------------------------------------------------*
143150
| initialize the linear solver kremheller 07/20 |
144151
*--------------------------------------------------------------------------*/
145-
void PoroPressureBased::MeshtyingStrategyArtery::initialize_linear_solver(
152+
void PoroPressureBased::MeshtyingArtery::initialize_linear_solver(
146153
std::shared_ptr<Core::LinAlg::Solver> solver)
147154
{
148155
const Teuchos::ParameterList& porofluidparams =
@@ -188,8 +195,7 @@ void PoroPressureBased::MeshtyingStrategyArtery::initialize_linear_solver(
188195
/*--------------------------------------------------------------------------*
189196
| solve linear system of equations kremheller 04/18 |
190197
*--------------------------------------------------------------------------*/
191-
void PoroPressureBased::MeshtyingStrategyArtery::linear_solve(
192-
std::shared_ptr<Core::LinAlg::Solver> solver,
198+
void PoroPressureBased::MeshtyingArtery::linear_solve(std::shared_ptr<Core::LinAlg::Solver> solver,
193199
std::shared_ptr<Core::LinAlg::SparseOperator> sysmat,
194200
std::shared_ptr<Core::LinAlg::Vector<double>> increment,
195201
std::shared_ptr<Core::LinAlg::Vector<double>> residual,
@@ -211,7 +217,7 @@ void PoroPressureBased::MeshtyingStrategyArtery::linear_solve(
211217
/*----------------------------------------------------------------------*
212218
| Calculate problem specific norm kremheller 03/18 |
213219
*----------------------------------------------------------------------*/
214-
void PoroPressureBased::MeshtyingStrategyArtery::calculate_norms(std::vector<double>& preresnorm,
220+
void PoroPressureBased::MeshtyingArtery::calculate_norms(std::vector<double>& preresnorm,
215221
std::vector<double>& incprenorm, std::vector<double>& prenorm,
216222
const std::shared_ptr<const Core::LinAlg::Vector<double>> increment)
217223
{
@@ -245,7 +251,7 @@ void PoroPressureBased::MeshtyingStrategyArtery::calculate_norms(std::vector<dou
245251
/*----------------------------------------------------------------------*
246252
| create result test for this field kremheller 04/18 |
247253
*----------------------------------------------------------------------*/
248-
void PoroPressureBased::MeshtyingStrategyArtery::create_field_test()
254+
void PoroPressureBased::MeshtyingArtery::create_field_test()
249255
{
250256
std::shared_ptr<Core::Utils::ResultTest> arteryresulttest = artnettimint_->create_field_test();
251257
Global::Problem::instance()->add_field_test(arteryresulttest);
@@ -255,7 +261,7 @@ void PoroPressureBased::MeshtyingStrategyArtery::create_field_test()
255261
/*----------------------------------------------------------------------*
256262
| read restart data kremheller 04/18 |
257263
-----------------------------------------------------------------------*/
258-
void PoroPressureBased::MeshtyingStrategyArtery::read_restart(const int step)
264+
void PoroPressureBased::MeshtyingArtery::read_restart(const int step)
259265
{
260266
artnettimint_->read_restart(step);
261267

@@ -265,7 +271,7 @@ void PoroPressureBased::MeshtyingStrategyArtery::read_restart(const int step)
265271
/*----------------------------------------------------------------------*
266272
| output of solution vector to BINIO kremheller 04/18 |
267273
*----------------------------------------------------------------------*/
268-
void PoroPressureBased::MeshtyingStrategyArtery::output()
274+
void PoroPressureBased::MeshtyingArtery::output()
269275
{
270276
if (porofluidmultitimint_->step() != 0) artnettimint_->output(false, nullptr);
271277

@@ -275,7 +281,7 @@ void PoroPressureBased::MeshtyingStrategyArtery::output()
275281
/*----------------------------------------------------------------------*
276282
| evaluate matrix and rhs kremheller 04/18 |
277283
*----------------------------------------------------------------------*/
278-
void PoroPressureBased::MeshtyingStrategyArtery::evaluate()
284+
void PoroPressureBased::MeshtyingArtery::evaluate()
279285
{
280286
arttoporofluidcoupling_->set_solution_vectors(
281287
porofluidmultitimint_->phinp(), porofluidmultitimint_->phin(), artnettimint_->pressurenp());
@@ -301,7 +307,7 @@ void PoroPressureBased::MeshtyingStrategyArtery::evaluate()
301307
| extract and update kremheller 04/18 |
302308
*----------------------------------------------------------------------*/
303309
std::shared_ptr<const Core::LinAlg::Vector<double>>
304-
PoroPressureBased::MeshtyingStrategyArtery::extract_and_update_iter(
310+
PoroPressureBased::MeshtyingArtery::extract_and_update_iter(
305311
const std::shared_ptr<const Core::LinAlg::Vector<double>> inc)
306312
{
307313
std::shared_ptr<const Core::LinAlg::Vector<double>> arterypressinc;
@@ -317,8 +323,8 @@ PoroPressureBased::MeshtyingStrategyArtery::extract_and_update_iter(
317323
/*----------------------------------------------------------------------*
318324
| artery dof row map kremheller 04/18 |
319325
*----------------------------------------------------------------------*/
320-
std::shared_ptr<const Core::LinAlg::Map>
321-
PoroPressureBased::MeshtyingStrategyArtery::artery_dof_row_map() const
326+
std::shared_ptr<const Core::LinAlg::Map> PoroPressureBased::MeshtyingArtery::artery_dof_row_map()
327+
const
322328
{
323329
return arttoporofluidcoupling_->artery_dof_row_map();
324330
}
@@ -327,7 +333,7 @@ PoroPressureBased::MeshtyingStrategyArtery::artery_dof_row_map() const
327333
| access to block system matrix of artery poro problem kremheller 04/18 |
328334
*-----------------------------------------------------------------------*/
329335
std::shared_ptr<Core::LinAlg::BlockSparseMatrixBase>
330-
PoroPressureBased::MeshtyingStrategyArtery::artery_porofluid_sysmat() const
336+
PoroPressureBased::MeshtyingArtery::artery_porofluid_sysmat() const
331337
{
332338
return comb_systemmatrix_;
333339
}
@@ -336,7 +342,7 @@ PoroPressureBased::MeshtyingStrategyArtery::artery_porofluid_sysmat() const
336342
| return coupled residual kremheller 05/18 |
337343
*----------------------------------------------------------------------*/
338344
std::shared_ptr<const Core::LinAlg::Vector<double>>
339-
PoroPressureBased::MeshtyingStrategyArtery::artery_porofluid_rhs() const
345+
PoroPressureBased::MeshtyingArtery::artery_porofluid_rhs() const
340346
{
341347
return rhs_;
342348
}
@@ -345,7 +351,7 @@ PoroPressureBased::MeshtyingStrategyArtery::artery_porofluid_rhs() const
345351
| extract and update kremheller 04/18 |
346352
*----------------------------------------------------------------------*/
347353
std::shared_ptr<const Core::LinAlg::Vector<double>>
348-
PoroPressureBased::MeshtyingStrategyArtery::combined_increment(
354+
PoroPressureBased::MeshtyingArtery::combined_increment(
349355
const std::shared_ptr<const Core::LinAlg::Vector<double>> inc) const
350356
{
351357
return comb_increment_;
@@ -354,7 +360,7 @@ PoroPressureBased::MeshtyingStrategyArtery::combined_increment(
354360
/*----------------------------------------------------------------------*
355361
| check initial fields kremheller 06/18 |
356362
*----------------------------------------------------------------------*/
357-
void PoroPressureBased::MeshtyingStrategyArtery::check_initial_fields(
363+
void PoroPressureBased::MeshtyingArtery::check_initial_fields(
358364
std::shared_ptr<const Core::LinAlg::Vector<double>> vec_cont) const
359365
{
360366
arttoporofluidcoupling_->check_initial_fields(vec_cont, artnettimint_->pressurenp());
@@ -364,7 +370,7 @@ void PoroPressureBased::MeshtyingStrategyArtery::check_initial_fields(
364370
/*-------------------------------------------------------------------------*
365371
| set element pairs that are close kremheller 03/19 |
366372
*------------------------------------------------------------------------ */
367-
void PoroPressureBased::MeshtyingStrategyArtery::set_nearby_ele_pairs(
373+
void PoroPressureBased::MeshtyingArtery::set_nearby_ele_pairs(
368374
const std::map<int, std::set<int>>* nearbyelepairs)
369375
{
370376
arttoporofluidcoupling_->set_nearby_ele_pairs(nearbyelepairs);
@@ -374,7 +380,7 @@ void PoroPressureBased::MeshtyingStrategyArtery::set_nearby_ele_pairs(
374380
/*-------------------------------------------------------------------------*
375381
| setup the strategy kremheller 03/19 |
376382
*------------------------------------------------------------------------ */
377-
void PoroPressureBased::MeshtyingStrategyArtery::setup()
383+
void PoroPressureBased::MeshtyingArtery::setup()
378384
{
379385
arttoporofluidcoupling_->setup();
380386
return;
@@ -383,7 +389,7 @@ void PoroPressureBased::MeshtyingStrategyArtery::setup()
383389
/*----------------------------------------------------------------------*
384390
| apply mesh movement kremheller 06/18 |
385391
*----------------------------------------------------------------------*/
386-
void PoroPressureBased::MeshtyingStrategyArtery::apply_mesh_movement() const
392+
void PoroPressureBased::MeshtyingArtery::apply_mesh_movement() const
387393
{
388394
arttoporofluidcoupling_->apply_mesh_movement();
389395
return;
@@ -393,7 +399,7 @@ void PoroPressureBased::MeshtyingStrategyArtery::apply_mesh_movement() const
393399
| access to blood vessel volume fraction kremheller 10/19 |
394400
*----------------------------------------------------------------------*/
395401
std::shared_ptr<const Core::LinAlg::Vector<double>>
396-
PoroPressureBased::MeshtyingStrategyArtery::blood_vessel_volume_fraction()
402+
PoroPressureBased::MeshtyingArtery::blood_vessel_volume_fraction()
397403
{
398404
return arttoporofluidcoupling_->blood_vessel_volume_fraction();
399405
}

src/porofluid_pressure_based/4C_porofluid_pressure_based_meshtying_strategy_artery.hpp

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
#include "4C_config.hpp"
1212

13-
#include "4C_porofluid_pressure_based_meshtying_strategy_base.hpp"
13+
#include "4C_linear_solver_method_linalg.hpp"
14+
#include "4C_porofluid_pressure_based_timint_implicit.hpp"
1415

1516
FOUR_C_NAMESPACE_OPEN
1617

@@ -22,87 +23,101 @@ namespace PoroPressureBased
2223

2324
namespace PoroPressureBased
2425
{
25-
class MeshtyingStrategyArtery : public MeshtyingStrategyBase
26+
class MeshtyingArtery
2627
{
2728
public:
2829
//! constructor
29-
explicit MeshtyingStrategyArtery(PoroPressureBased::TimIntImpl* porofluidmultitimint,
30+
explicit MeshtyingArtery(TimIntImpl* porofluidmultitimint,
3031
const Teuchos::ParameterList& probparams, const Teuchos::ParameterList& poroparams);
3132

3233

3334
//! prepare time loop
34-
void prepare_time_loop() override;
35+
void prepare_time_loop();
3536

3637
//! prepare time step
37-
void prepare_time_step() override;
38+
void prepare_time_step();
3839

3940
//! update
40-
void update() override;
41+
void update();
4142

4243
//! output
43-
void output() override;
44+
void output();
4445

4546
//! Initialize the linear solver
46-
void initialize_linear_solver(std::shared_ptr<Core::LinAlg::Solver> solver) override;
47+
void initialize_linear_solver(std::shared_ptr<Core::LinAlg::Solver> solver);
4748

4849
//! solve linear system of equations
4950
void linear_solve(std::shared_ptr<Core::LinAlg::Solver> solver,
5051
std::shared_ptr<Core::LinAlg::SparseOperator> sysmat,
5152
std::shared_ptr<Core::LinAlg::Vector<double>> increment,
5253
std::shared_ptr<Core::LinAlg::Vector<double>> residual,
53-
Core::LinAlg::SolverParams& solver_params) override;
54+
Core::LinAlg::SolverParams& solver_params);
5455

5556
//! calculate norms for convergence checks
5657
void calculate_norms(std::vector<double>& preresnorm, std::vector<double>& incprenorm,
5758
std::vector<double>& prenorm,
58-
const std::shared_ptr<const Core::LinAlg::Vector<double>> increment) override;
59+
const std::shared_ptr<const Core::LinAlg::Vector<double>> increment);
5960

6061
//! create the field test
61-
void create_field_test() override;
62+
void create_field_test();
6263

6364
//! restart
64-
void read_restart(const int step) override;
65+
void read_restart(const int step);
6566

6667
//! evaluate mesh tying
67-
void evaluate() override;
68+
void evaluate();
6869

6970
//! extract increments and update mesh tying
7071
std::shared_ptr<const Core::LinAlg::Vector<double>> extract_and_update_iter(
71-
const std::shared_ptr<const Core::LinAlg::Vector<double>> inc) override;
72+
const std::shared_ptr<const Core::LinAlg::Vector<double>> inc);
7273

7374
// return arterial network time integrator
74-
std::shared_ptr<Adapter::ArtNet> art_net_tim_int() override { return artnettimint_; }
75+
std::shared_ptr<Adapter::ArtNet> art_net_tim_int() { return artnettimint_; }
7576

7677
//! access dof row map
77-
std::shared_ptr<const Core::LinAlg::Map> artery_dof_row_map() const override;
78+
std::shared_ptr<const Core::LinAlg::Map> artery_dof_row_map() const;
7879

7980
//! right-hand side alias the dynamic force residual for coupled system
80-
std::shared_ptr<const Core::LinAlg::Vector<double>> artery_porofluid_rhs() const override;
81+
std::shared_ptr<const Core::LinAlg::Vector<double>> artery_porofluid_rhs() const;
8182

8283
//! access to block system matrix of artery poro problem
83-
std::shared_ptr<Core::LinAlg::BlockSparseMatrixBase> artery_porofluid_sysmat() const override;
84+
std::shared_ptr<Core::LinAlg::BlockSparseMatrixBase> artery_porofluid_sysmat() const;
8485

8586
//! get global (combined) increment of coupled problem
8687
std::shared_ptr<const Core::LinAlg::Vector<double>> combined_increment(
87-
const std::shared_ptr<const Core::LinAlg::Vector<double>> inc) const override;
88+
const std::shared_ptr<const Core::LinAlg::Vector<double>> inc) const;
8889

8990
//! check if initial fields on coupled DOFs are equal
90-
void check_initial_fields(
91-
std::shared_ptr<const Core::LinAlg::Vector<double>> vec_cont) const override;
91+
void check_initial_fields(std::shared_ptr<const Core::LinAlg::Vector<double>> vec_cont) const;
9292

9393
//! set the element pairs that are close as found by search algorithm
94-
void set_nearby_ele_pairs(const std::map<int, std::set<int>>* nearbyelepairs) override;
94+
void set_nearby_ele_pairs(const std::map<int, std::set<int>>* nearbyelepairs);
9595

9696
//! setup the strategy
97-
void setup() override;
97+
void setup();
9898

9999
//! apply the mesh movement
100-
void apply_mesh_movement() const override;
100+
void apply_mesh_movement() const;
101101

102102
//! return blood vessel volume fraction
103-
std::shared_ptr<const Core::LinAlg::Vector<double>> blood_vessel_volume_fraction() override;
103+
std::shared_ptr<const Core::LinAlg::Vector<double>> blood_vessel_volume_fraction();
104+
105+
private:
106+
//! porofluid multi time integrator
107+
TimIntImpl* porofluidmultitimint_;
108+
109+
//! parameter list of global control problem
110+
const Teuchos::ParameterList& params_;
111+
112+
//! parameter list of poro fluid multiphase problem
113+
const Teuchos::ParameterList& poroparams_;
114+
115+
//! vector norm for residuals
116+
VectorNorm vectornormfres_;
117+
118+
//! vector norm for increments
119+
VectorNorm vectornorminc_;
104120

105-
protected:
106121
//! artery time integration
107122
std::shared_ptr<Adapter::ArtNet> artnettimint_;
108123

0 commit comments

Comments
 (0)