Skip to content

Commit 56dca6c

Browse files
committed
Remove untested code related to the problem type
Fluid_XFEM_LevelSet. - LevelSetTimIntStationary was also unused, as it would only be initialized by Fluid_XFEM_LevelSet and is removed as well.
1 parent d476353 commit 56dca6c

13 files changed

+19
-282
lines changed

apps/post_monitor/4C_post_monitor.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1739,7 +1739,6 @@ int main(int argc, char** argv)
17391739
}
17401740
case Core::ProblemType::structure:
17411741
case Core::ProblemType::loma:
1742-
case Core::ProblemType::fluid_xfem_ls:
17431742
case Core::ProblemType::fluid:
17441743
case Core::ProblemType::fluid_redmodels:
17451744
case Core::ProblemType::fps3i:

apps/post_processor/4C_post_processor.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ namespace
277277
}
278278
case Core::ProblemType::fsi_xfem:
279279
case Core::ProblemType::fpsi_xfem:
280-
case Core::ProblemType::fluid_xfem_ls:
281280
{
282281
std::cout
283282
<< "|=============================================================================|"

src/adapter/4C_adapter_fld_base_algorithm.cpp

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ void Adapter::FluidBaseAlgorithm::setup_fluid(const Teuchos::ParameterList& prbd
101101
if (!actdis->have_dofs())
102102
{
103103
if (probtype == Core::ProblemType::fsi_xfem or probtype == Core::ProblemType::fluid_xfem or
104-
(probtype == Core::ProblemType::fpsi_xfem and disname == "fluid") or
105-
probtype == Core::ProblemType::fluid_xfem_ls)
104+
(probtype == Core::ProblemType::fpsi_xfem and disname == "fluid"))
106105
{
107106
actdis->fill_complete(false, false, false);
108107
}
@@ -209,7 +208,7 @@ void Adapter::FluidBaseAlgorithm::setup_fluid(const Teuchos::ParameterList& prbd
209208

210209
// compute null space information
211210
if (probtype != Core::ProblemType::fsi_xfem and probtype != Core::ProblemType::fpsi_xfem and
212-
probtype != Core::ProblemType::fluid_xfem and probtype != Core::ProblemType::fluid_xfem_ls and
211+
probtype != Core::ProblemType::fluid_xfem and
213212
!(probtype == Core::ProblemType::fsi and
214213
Global::Problem::instance()->x_fluid_dynamic_params().sublist("GENERAL").get<bool>(
215214
"XFLUIDFLUID")))
@@ -295,8 +294,7 @@ void Adapter::FluidBaseAlgorithm::setup_fluid(const Teuchos::ParameterList& prbd
295294
"XFLUIDFLUID")) or
296295
(probtype == Core::ProblemType::fsi and
297296
Global::Problem::instance()->x_fluid_dynamic_params().sublist("GENERAL").get<bool>(
298-
"XFLUIDFLUID")) or
299-
probtype == Core::ProblemType::fluid_xfem_ls)
297+
"XFLUIDFLUID")))
300298
{
301299
// get also scatra stabilization sublist
302300
const Teuchos::ParameterList& xdyn = Global::Problem::instance()->xfem_general_params();
@@ -737,19 +735,6 @@ void Adapter::FluidBaseAlgorithm::setup_fluid(const Teuchos::ParameterList& prbd
737735
tmpfluid, condition_name, solver, fluidtimeparams, output);
738736
}
739737
break;
740-
case Core::ProblemType::fluid_xfem_ls:
741-
{
742-
std::shared_ptr<Core::FE::Discretization> soliddis =
743-
Global::Problem::instance()->get_dis("structure");
744-
std::shared_ptr<Core::FE::Discretization> scatradis = nullptr;
745-
746-
if (Global::Problem::instance()->does_exist_dis("scatra"))
747-
scatradis = Global::Problem::instance()->get_dis("scatra");
748-
749-
fluid_ = std::make_shared<FLD::XFluid>(
750-
actdis, soliddis, scatradis, solver, fluidtimeparams, output);
751-
}
752-
break;
753738
case Core::ProblemType::fsi:
754739
case Core::ProblemType::gas_fsi:
755740
case Core::ProblemType::biofilm_fsi:

src/adapter/4C_adapter_scatra_base_algorithm.cpp

Lines changed: 5 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "4C_io.hpp"
1515
#include "4C_io_control.hpp"
1616
#include "4C_levelset_timint_ost.hpp"
17-
#include "4C_levelset_timint_stat.hpp"
1817
#include "4C_linear_solver_method.hpp"
1918
#include "4C_linear_solver_method_linalg.hpp"
2019
#include "4C_scatra_resulttest_hdg.hpp"
@@ -257,86 +256,26 @@ Adapter::ScaTraBaseAlgorithm::ScaTraBaseAlgorithm(const Teuchos::ParameterList&
257256
}
258257
default:
259258
FOUR_C_THROW("Unknown time integration scheme for electrochemistry!");
260-
break;
261259
}
262260
}
263261

264-
// levelset
265-
else if (probtype == Core::ProblemType::level_set or probtype == Core::ProblemType::fluid_xfem_ls)
262+
// level-set
263+
else if (probtype == Core::ProblemType::level_set)
266264
{
267-
std::shared_ptr<Teuchos::ParameterList> lsparams = nullptr;
268-
switch (probtype)
269-
{
270-
case Core::ProblemType::level_set:
271-
lsparams = std::make_shared<Teuchos::ParameterList>(prbdyn);
272-
break;
273-
default:
274-
{
275-
if (!lsparams)
276-
lsparams = std::make_shared<Teuchos::ParameterList>(
277-
Global::Problem::instance()->level_set_control());
278-
// overrule certain parameters for coupled problems
279-
// this has already been ensured for scatratimeparams, but has also been ensured for the
280-
// level-set parameter in a hybrid approach time step size
281-
lsparams->set<double>("TIMESTEP", prbdyn.get<double>("TIMESTEP"));
282-
// maximum simulation time
283-
lsparams->set<double>("MAXTIME", prbdyn.get<double>("MAXTIME"));
284-
// maximum number of timesteps
285-
lsparams->set<int>("NUMSTEP", prbdyn.get<int>("NUMSTEP"));
286-
// restart
287-
lsparams->set<int>("RESTARTEVERY", prbdyn.get<int>("RESTARTEVERY"));
288-
// solution output
289-
lsparams->set<int>("RESULTSEVERY", prbdyn.get<int>("RESULTSEVERY"));
290-
291-
break;
292-
}
293-
}
265+
auto lsparams = std::make_shared<Teuchos::ParameterList>(prbdyn);
294266

295267
switch (timintscheme)
296268
{
297269
case Inpar::ScaTra::timeint_one_step_theta:
298270
{
299-
// create instance of time integration class (call the constructor)
271+
// create an instance of time integration class
300272
scatra_ = std::make_shared<ScaTra::LevelSetTimIntOneStepTheta>(
301273
discret, solver, lsparams, scatratimeparams, extraparams, output);
302274
break;
303275
}
304-
case Inpar::ScaTra::timeint_stationary:
305-
{
306-
// create instance of time integration class (call the constructor)
307-
switch (probtype)
308-
{
309-
case Core::ProblemType::level_set:
310-
{
311-
FOUR_C_THROW(
312-
"Stationary time integration scheme only supported for a selection of coupled "
313-
"level-set problems!");
314-
exit(EXIT_FAILURE);
315-
}
316-
default:
317-
{
318-
scatra_ = std::make_shared<ScaTra::LevelSetTimIntStationary>(
319-
discret, solver, lsparams, scatratimeparams, extraparams, output);
320-
break;
321-
}
322-
}
323-
break;
324-
}
325-
case Inpar::ScaTra::timeint_gen_alpha:
326-
{
327-
switch (probtype)
328-
{
329-
default:
330-
FOUR_C_THROW("Unknown time-integration scheme for level-set problem");
331-
exit(EXIT_FAILURE);
332-
}
333-
334-
break;
335-
}
336276
default:
337277
FOUR_C_THROW("Unknown time-integration scheme for level-set problem");
338-
break;
339-
} // switch(timintscheme)
278+
}
340279
}
341280

342281
// cardiac monodomain

src/adapter/4C_adapter_scatra_fluid_coupling_algorithm.cpp

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,14 @@ void Adapter::ScaTraFluidCouplingAlgorithm::setup()
8181
// set also initial field
8282
set_initial_flow_field(Global::Problem::instance()->fluid_dynamic_params());
8383

84-
if (Global::Problem::instance()->get_problem_type() != Core::ProblemType::fluid_xfem_ls)
85-
{
86-
// transfer the initial convective velocity from initial fluid field to scalar transport field
87-
// subgrid scales not transferred since they are zero at time t=0.0
88-
if (!volcoupl_fluidscatra_)
89-
scatra_field()->set_velocity_field(
90-
fluid_field()->convective_vel(), nullptr, nullptr, nullptr);
91-
else
92-
scatra_field()->set_velocity_field(
93-
volcoupl_fluidscatra_->apply_vector_mapping21(*fluid_field()->convective_vel()), nullptr,
94-
nullptr, nullptr);
95-
}
84+
// transfer the initial convective velocity from initial fluid field to scalar transport field
85+
// subgrid scales not transferred since they are zero at time t=0.0
86+
if (!volcoupl_fluidscatra_)
87+
scatra_field()->set_velocity_field(fluid_field()->convective_vel(), nullptr, nullptr, nullptr);
88+
else
89+
scatra_field()->set_velocity_field(
90+
volcoupl_fluidscatra_->apply_vector_mapping21(*fluid_field()->convective_vel()), nullptr,
91+
nullptr, nullptr);
9692

9793
// ensure that both single field solvers use the same
9894
// time integration scheme

src/core/legacy_enum_definitions/4C_legacy_enum_definitions_problem_type.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ namespace Core
3131
fbi, // 3D fluid interacting with a 1D beam
3232
fluid_redmodels, // fluid_redairways problem
3333
fluid_xfem, // fluid problem including XFEM interfaces
34-
fluid_xfem_ls, // xfluid calculations using levelset for cut.
3534
fps3i, // fluid porous structure scatra scatra interaction
3635
fpsi, // fluid porous structure interaction problem
3736
fpsi_xfem, // fluid poro structure interaction problem including XFEM interfaces (atm just

src/global_data/4C_global_data_read.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -523,18 +523,6 @@ std::unique_ptr<Core::IO::MeshReader> Global::read_discretization(
523523
break;
524524
}
525525

526-
case Core::ProblemType::fluid_xfem_ls:
527-
{
528-
// create empty discretizations
529-
discretization_types["structure"] = {DiscretizationType::plain, "STRUCTURE"};
530-
if (problem.get_problem_type() == Core::ProblemType::fluid_xfem_ls)
531-
discretization_types["fluid"] = {DiscretizationType::xfem, "FLUID"};
532-
else
533-
discretization_types["fluid"] = {DiscretizationType::faces, "FLUID"};
534-
discretization_types["scatra"] = {DiscretizationType::plain, "TRANSPORT"};
535-
break;
536-
}
537-
538526
case Core::ProblemType::elch:
539527
{
540528
// create empty discretizations

src/inpar/4C_inpar_problemtype.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ std::map<std::string, Core::ProblemType> Inpar::PROBLEMTYPE::string_to_problem_t
6363
string2prbtype["Fluid_Structure_Interaction_RedModels"] = Core::ProblemType::fsi_redmodels;
6464
string2prbtype["Fluid_Structure_Interaction_XFEM"] = Core::ProblemType::fsi_xfem;
6565
string2prbtype["Fluid_XFEM"] = Core::ProblemType::fluid_xfem;
66-
string2prbtype["Fluid_XFEM_LevelSet"] = Core::ProblemType::fluid_xfem_ls;
6766
string2prbtype["Gas_Fluid_Structure_Interaction"] = Core::ProblemType::gas_fsi;
6867
string2prbtype["Level_Set"] = Core::ProblemType::level_set;
6968
string2prbtype["Low_Mach_Number_Flow"] = Core::ProblemType::loma;

src/levelset/4C_levelset_algorithm.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ namespace ScaTra
7979
void mass_center_using_smoothing();
8080

8181
/// redistribute the scatra discretization and vectors according to nodegraph
82-
void redistribute(Core::LinAlg::Graph& nodegraph);
82+
virtual void redistribute(Core::LinAlg::Graph& nodegraph);
8383

8484
void test_results() override;
8585

src/levelset/4C_levelset_timint_ost.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,6 @@ void ScaTra::LevelSetTimIntOneStepTheta::redistribute(Core::LinAlg::Graph& nodeg
242242
fsphinp_ = Core::LinAlg::create_vector(*newdofrowmap, true);
243243
Core::LinAlg::export_to(*old, *fsphinp_);
244244
}
245-
246-
return;
247245
}
248246

249247

0 commit comments

Comments
 (0)