@@ -1461,28 +1461,38 @@ void ScaTra::ScaTraTimIntImpl::set_mean_concentration(
14611461 mean_conc_ = MeanConc;
14621462}
14631463
1464+ /* ----------------------------------------------------------------------*
1465+ *----------------------------------------------------------------------*/
1466+ void ScaTra::ScaTraTimIntImpl::set_convective_velocity (
1467+ const Core::LinAlg::Vector<double >& convective_velocity) const
1468+ {
1469+ // time measurement
1470+ TEUCHOS_FUNC_TIME_MONITOR (" SCATRA: set convective velocity field" );
1471+
1472+ // checks
1473+ FOUR_C_ASSERT (velocity_field_type_ == Inpar::ScaTra::velocity_Navier_Stokes,
1474+ " Wrong set_velocity_field() called for velocity field type {}!" , velocity_field_type_);
1475+ FOUR_C_ASSERT (nds_vel () < discret_->num_dof_sets (), " Too few dof sets on scatra discretization!" );
1476+
1477+ // provide scatra discretization with convective velocity
1478+ discret_->set_state (nds_vel (), " convective velocity field" , convective_velocity);
1479+ }
1480+
1481+
14641482/* ----------------------------------------------------------------------*
14651483 *----------------------------------------------------------------------*/
14661484void ScaTra::ScaTraTimIntImpl::set_velocity_field (
1467- std::shared_ptr<const Core::LinAlg::Vector<double >> convvel,
14681485 std::shared_ptr<const Core::LinAlg::Vector<double >> acc,
14691486 std::shared_ptr<const Core::LinAlg::Vector<double >> vel,
14701487 std::shared_ptr<const Core::LinAlg::Vector<double >> fsvel)
14711488{
14721489 // time measurement
1473- TEUCHOS_FUNC_TIME_MONITOR (" SCATRA: set convective velocity field " );
1490+ TEUCHOS_FUNC_TIME_MONITOR (" SCATRA: set velocity fields " );
14741491
1475- // ---------------------------------------------------------------------------
1476- // preliminaries
1477- // ---------------------------------------------------------------------------
1478- if (convvel == nullptr ) FOUR_C_THROW (" Velocity state is nullptr" );
1479-
1480- if (velocity_field_type_ != Inpar::ScaTra::velocity_Navier_Stokes)
1481- FOUR_C_THROW (
1482- " Wrong set_velocity_field() called for velocity field type {}!" , velocity_field_type_);
1483-
1484- if (nds_vel () >= discret_->num_dof_sets ())
1485- FOUR_C_THROW (" Too few dofsets on scatra discretization!" );
1492+ // checks
1493+ FOUR_C_ASSERT (velocity_field_type_ == Inpar::ScaTra::velocity_Navier_Stokes,
1494+ " Wrong set_velocity_field() called for velocity field type {}!" , velocity_field_type_);
1495+ FOUR_C_ASSERT (nds_vel () < discret_->num_dof_sets (), " Too few dof sets on scatra discretization!" );
14861496
14871497 // boolean indicating whether fine-scale velocity vector exists
14881498 // -> if yes, multifractal subgrid-scale modeling is applied
@@ -1503,18 +1513,8 @@ void ScaTra::ScaTraTimIntImpl::set_velocity_field(
15031513 if (turbmodel_ == Inpar::FLUID::no_model and fssgd_ == Inpar::ScaTra::fssugrdiff_no)
15041514 fsvelswitch = false ;
15051515
1506- // provide scatra discretization with convective velocity
1507- discret_->set_state (nds_vel (), " convective velocity field" , *convvel);
1508-
15091516 // provide scatra discretization with velocity
1510- if (vel != nullptr )
1511- discret_->set_state (nds_vel (), " velocity field" , *vel);
1512- else
1513- {
1514- // if velocity vector is not provided by the respective algorithm, we
1515- // assume that it equals the given convective velocity:
1516- discret_->set_state (nds_vel (), " velocity field" , *convvel);
1517- }
1517+ if (vel != nullptr ) discret_->set_state (nds_vel (), " velocity field" , *vel);
15181518
15191519 // provide scatra discretization with acceleration field if required
15201520 if (acc != nullptr ) discret_->set_state (nds_vel (), " acceleration field" , *acc);
0 commit comments