Real
SinglePhaseFluidProperties::rho(Real p, Real T) const
{
  mooseDeprecated(name(), ": rho() is deprecated. Use rho_from_p_T() instead");

  return rho_from_p_T(p, T);
}
Exemple #2
0
MooseObjectPtr
Factory::create(const std::string & obj_name,
                const std::string & name,
                InputParameters parameters,
                THREAD_ID tid /* =0 */,
                bool print_deprecated /* =true */)
{
  if (print_deprecated)
    mooseDeprecated("Factory::create() is deprecated, please use Factory::create<T>() instead");

  // Pointer to the object constructor
  std::map<std::string, buildPtr>::iterator it = _name_to_build_pointer.find(obj_name);

  // Check if the object is registered
  if (it == _name_to_build_pointer.end())
    reportUnregisteredError(obj_name);

  // Print out deprecated message, if it exists
  deprecatedMessage(obj_name);

  // Create the actual parameters object that the object will reference
  InputParameters & params =
      _app.getInputParameterWarehouse().addInputParameters(name, parameters, tid);

  // Check to make sure that all required parameters are supplied
  params.checkParams(name);

  // register type name as constructed
  _constructed_types.insert(obj_name);

  // Actually call the function pointer.  You can do this in one line,
  // but it's a bit more obvious what's happening if you do it in two...
  buildPtr & func = it->second;
  return (*func)(params);
}
IdealGasFluidPropertiesPT::IdealGasFluidPropertiesPT(const InputParameters & parameters)
  : IdealGasFluidProperties(parameters)
{
  mooseDeprecated(
      name(),
      ": IdealGasFluidPropertiesPT is deprecated. Just use IdealGasFluidProperties instead");
}
void
SinglePhaseFluidProperties::henryConstant_dT(Real T, Real & Kh, Real & dKh_dT) const
{
  mooseDeprecated(name(), ": henryConstant_dT() is deprecated. Use henryConstant() instead");

  henryConstant(T, Kh, dKh_dT);
}
PorousFlowFluidStateBrineCO2IC::PorousFlowFluidStateBrineCO2IC(const InputParameters & parameters)
  : PorousFlowFluidStateIC(parameters)
{
  mooseDeprecated(name(),
                  ": the PorousFlowFluidStateBrineCO2IC IC is deprecated. Just use "
                  "PorousFlowFluidStateIC instead");
}
void
SinglePhaseFluidProperties::mu_dpT(Real p, Real T, Real & mu, Real & dmu_dp, Real & dmu_dT) const
{
  mooseDeprecated(name(), ": mu_dpT() is deprecated. Use mu_from_p_T() instead");

  mu_from_p_T(p, T, mu, dmu_dp, dmu_dT);
}
bool
PorousFlowAddMaterialJoiner::hasJoiner(std::string property)
{
  // Get the list of materials in the input file
  auto actions = _awh.getActions<AddMaterialAction>();

  for (auto & action : actions)
  {
    AddMaterialAction * material = const_cast<AddMaterialAction *>(action);

    if (material->getMooseObjectType() == "PorousFlowJoiner")
    {
      // If a PorousFlowJoiner material has been included in the input file,
      // let the user know that it should be removed
      mooseDeprecated("PorousFlowJoiner materials are no longer required in the input "
                      "file.\nPlease remove all PorousFlowJoiner materials from this input file to "
                      "get rid of this warning");

      const std::string joiner_property =
          material->getObjectParams().get<std::string>("material_property");

      // Check if the given material property is joined by this material
      if (joiner_property == property)
        return true;
    }
  }

  // If no PorousFlowJoiner materials matched property, return false
  return false;
}
void
SinglePhaseFluidProperties::e_dpT(Real p, Real T, Real & e, Real & de_dp, Real & de_dT) const
{
  mooseDeprecated(name(), ": e_dpT() is deprecated. Use e_from_p_T() instead");

  e_from_p_T(p, T, e, de_dp, de_dT);
}
void
SinglePhaseFluidProperties::rho_mu(Real p, Real T, Real & rho, Real & mu) const
{
  mooseDeprecated(name(), ": rho_mu() is deprecated. Use rho_mu_from_p_T() instead");

  rho_mu_from_p_T(p, T, rho, mu);
}
void
SinglePhaseFluidProperties::h_dpT(Real p, Real T, Real & h, Real & dh_dp, Real & dh_dT) const
{
  mooseDeprecated(name(), ": h_dpT() is deprecated. Use h_from_p_T() instead");

  h_from_p_T(p, T, h, dh_dp, dh_dT);
}
Exemple #11
0
std::shared_ptr<FEProblem>
ActionWarehouse::problem()
{
  mooseDeprecated(
      "ActionWarehouse::problem() is deprecated, please use ActionWarehouse::problemBase() \n");
  return std::dynamic_pointer_cast<FEProblem>(_problem);
}
void
SinglePhaseFluidProperties::vaporPressure_dT(Real T, Real & psat, Real & dpsat_dT) const
{
  mooseDeprecated(name(), ": vaporPressure_dT() is deprecated. Use vaporPressure() instead");

  vaporPressure(T, psat, dpsat_dT);
}
void
SinglePhaseFluidProperties::k_dpT(Real p, Real T, Real & k, Real & dk_dp, Real & dk_dT) const
{
  mooseDeprecated(name(), ": k_dpT() is deprecated. Use k_from_p_T() instead");

  k_from_p_T(p, T, k, dk_dp, dk_dT);
}
void
FunctionalExpansionToolsApp::associateSyntax(Syntax & /*syntax*/, ActionFactory & action_factory)
{
  mooseDeprecated("use registerAll instead of associateSyntax");
  Registry::registerActionsTo(action_factory, {"FunctionalExpansionToolsApp"});
  /* Uncomment Syntax parameters and register your new objects here! */
}
PorousFlowPorosityHM::PorousFlowPorosityHM(const InputParameters & parameters)
  : PorousFlowPorosity(parameters)
{
  mooseDeprecated("PorousFlowPorosityHM is deprecated.  In your input file please replace\n    "
                  "type = PorousFlowPorosityHM\nwith\n    type = PorousFlowPorosity\n    "
                  "mechanical = true\n    fluid = true");
}
void
SinglePhaseFluidProperties::rho_dpT(
    Real p, Real T, Real & rho, Real & drho_dp, Real & drho_dT) const
{
  mooseDeprecated(name(), ": rho_dpT() is deprecated. Use rho_from_p_T() instead");

  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
}
void
SinglePhaseFluidProperties::mu_drhoT_from_rho_T(
    Real rho, Real T, Real drho_dT, Real & mu, Real & dmu_drho, Real & dmu_dT) const
{
  mooseDeprecated(name(), ":mu_drhoT_from_rho_T() is deprecated. Use mu_from_rho_T() instead");

  mu_from_rho_T(rho, T, drho_dT, mu, dmu_drho, dmu_dT);
}
void
SinglePhaseFluidProperties::henryConstantIAPWS_dT(
    Real T, Real & Kh, Real & dKh_dT, Real A, Real B, Real C) const
{
  mooseDeprecated(name(),
                  ":henryConstantIAPWS_dT() is deprecated. Use henryConstantIAPWS() instead");

  henryConstantIAPWS(T, Kh, dKh_dT, A, B, C);
}
const std::vector<ExecFlagType> &
MultiAppTransfer::execFlags() const
{
  mooseDeprecated("The execFlags() methos is being removed because MOOSE has been updated to use a "
                  "ExecFlagEnum for execute flags. The current flags should be retrieved from "
                  "the \"exeucte_on\" parameters of your object or by using the \"_execute_enum\" "
                  "reference to the parameter or the getExecuteOnEnum() method.");
  return _exec_flags;
}
Exemple #20
0
void
RankFourTensor::fillFromInputVector(const std::vector<Real> input, bool all_21)
{
  mooseDeprecated();

  if (all_21)
    fillFromInputVector(input, symmetric21);
  else
    fillFromInputVector(input, symmetric9);
}
Exemple #21
0
MooseEnumBase::MooseEnumBase(std::string names, bool allow_out_of_range) :
    _out_of_range_index(allow_out_of_range ? INVALID_ID + 1 : 0)
{
  if (names.find(',') != std::string::npos)
  {
    mooseDeprecated("Please use a space to separate options in a MooseEnum, commas are deprecated\nMooseEnum initialized with names: \"" << names << '\"');
    fillNames(names, ",");
  }
  else
    fillNames(names);
}
Exemple #22
0
RichardsApp::RichardsApp(const InputParameters & parameters) : MooseApp(parameters)
{
  Moose::registerObjects(_factory);
  RichardsApp::registerObjects(_factory);

  Moose::associateSyntax(_syntax, _action_factory);
  RichardsApp::associateSyntax(_syntax, _action_factory);

  mooseDeprecated("Please use the PorousFlow module instead.  If Richards contains functionality "
                  "not included in PorousFlow, please contact the moose-users google group");
}
TensorMechanicsMaterial::TensorMechanicsMaterial(const InputParameters & parameters)
  : Material(parameters),
    _grad_disp_x(coupledGradient("disp_x")),
    _grad_disp_y(coupledGradient("disp_y")),
    _grad_disp_z(_mesh.dimension() == 3 ? coupledGradient("disp_z") : _grad_zero),
    _grad_disp_x_old(_fe_problem.isTransient() ? coupledGradientOld("disp_x") : _grad_zero),
    _grad_disp_y_old(_fe_problem.isTransient() ? coupledGradientOld("disp_y") : _grad_zero),
    _grad_disp_z_old(_fe_problem.isTransient() && _mesh.dimension() == 3
                         ? coupledGradientOld("disp_z")
                         : _grad_zero),
    _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),

    _stress(declareProperty<RankTwoTensor>(_base_name + "stress")),
    _total_strain(declareProperty<RankTwoTensor>(_base_name + "total_strain")),
    _elastic_strain(declareProperty<RankTwoTensor>(_base_name + "elastic_strain")),

    _elasticity_tensor_name(_base_name + "elasticity_tensor"),
    _elasticity_tensor(declareProperty<RankFourTensor>(_elasticity_tensor_name)),

    _Jacobian_mult(declareProperty<RankFourTensor>(_base_name + "Jacobian_mult")),

    _Euler_angles(getParam<Real>("euler_angle_1"),
                  getParam<Real>("euler_angle_2"),
                  getParam<Real>("euler_angle_3")),

    _Cijkl(getParam<std::vector<Real>>("C_ijkl"),
           (RankFourTensor::FillMethod)(int)getParam<MooseEnum>("fill_method")),
    _prefactor_function(isParamValid("elasticity_tensor_prefactor")
                            ? &getFunction("elasticity_tensor_prefactor")
                            : NULL)
{
  mooseDeprecated("EigenStrainBaseMaterial is deprecated.   Please use the TensorMechanics "
                  "plug-and-play system instead: "
                  "http://mooseframework.org/wiki/PhysicsModules/TensorMechanics/"
                  "PlugAndPlayMechanicsApproach/");

  const std::vector<FunctionName> & fcn_names(
      getParam<std::vector<FunctionName>>("initial_stress"));
  const unsigned num = fcn_names.size();

  if (!(num == 0 || num == 3 * 3))
    mooseError(
        "Either zero or ",
        3 * 3,
        " initial stress functions must be provided to TensorMechanicsMaterial.  You supplied ",
        num,
        "\n");

  _initial_stress.resize(num);
  for (unsigned i = 0; i < num; ++i)
    _initial_stress[i] = &getFunctionByName(fcn_names[i]);
}
Exemple #24
0
void
Factory::deprecatedMessage(const std::string obj_name)
{
  std::map<std::string, std::time_t>::iterator time_it = _deprecated_time.find(obj_name);

  // If the object is not deprecated return
  if (time_it == _deprecated_time.end())
    return;

  // Get the current time
  std::time_t now;
  time(&now);

  // Get the stop time
  std::time_t t_end = time_it->second;

  // Message storage
  std::ostringstream msg;

  std::map<std::string, std::string>::iterator name_it = _deprecated_name.find(obj_name);

  // Expired object
  if (now > t_end)
  {
    msg << "***** Invalid Object: " << obj_name << " *****\n";
    msg << "Expired on " << ctime(&t_end);

    // Append replacement object, if it exsits
    if (name_it != _deprecated_name.end())
      msg << "Update your application using the '" << name_it->second << "' object";

    // Produce the error message
    mooseDeprecationExpired(msg.str());
  }

  // Expiring object
  else
  {
    // Build the basic message
    msg << "Deprecated Object: " << obj_name << "\n";
    msg << "This object will be removed on " << ctime(&t_end);

    // Append replacement object, if it exsits
    if (name_it != _deprecated_name.end())
      msg << "Replace " << obj_name << " with " << name_it->second;

    // Produce the error message
    mooseDeprecated(msg.str());
  }
}
StressDivergenceTensors::StressDivergenceTensors(const InputParameters & parameters) :
    Kernel(parameters),
    _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
    _stress(getMaterialPropertyByName<RankTwoTensor>(_base_name + "stress")),
    _Jacobian_mult(getMaterialPropertyByName<ElasticityTensorR4>(_base_name + "Jacobian_mult")),
    _component(getParam<unsigned int>("component")),
    _ndisp(coupledComponents("displacements")),
    _disp(3),
    _disp_var(3),
    _temp_coupled(isCoupled("temp")),
    _temp_var(_temp_coupled ? coupled("temp") : 0)
{
  if (_ndisp)
  {
    for (unsigned int i = 0; i < _ndisp; ++i)
    {
      _disp[i] = &coupledValue("displacements", i);
      _disp_var[i] = coupled("displacements", i);
    }
  }

  //This code is for the depricated version that allows three unique displacement variables
  else if ((_ndisp == 0) && isParamValid("disp_x"))
  {
    mooseDeprecated("StressDivergenceTensors has been updated to accept a string of displacement variable names, e.g. displacements = 'disp_x disp_y' in the input file.");
    _disp[0] = &coupledValue("disp_x");
    _disp_var[0] = coupled("disp_x");
    ++_ndisp;
    if (isParamValid("disp_y"))
    {
      _disp[1] = &coupledValue("disp_y");
      _disp_var[1] = coupled("disp_y");
      ++_ndisp;
      if (isParamValid("disp_z"))
      {
        _disp[2] = &coupledValue("disp_z");
        _disp_var[2] = coupled("disp_z");
        ++_ndisp;
      }
    }
  }

  else
    mooseError("The input file should specify a string of displacement names; these names should match the Variable block names.");

  // Checking for consistency between mesh size and length of the provided displacements vector
  if (_ndisp != _mesh.dimension())
    mooseError("The number of displacement variables supplied must match the mesh dimension.");
}
Exemple #26
0
SlaveConstraint::SlaveConstraint(const InputParameters & parameters)
  : DiracKernel(parameters),
    _component(getParam<unsigned int>("component")),
    _model(ContactMaster::contactModel(getParam<std::string>("model"))),
    _formulation(ContactMaster::contactFormulation(getParam<std::string>("formulation"))),
    _normalize_penalty(getParam<bool>("normalize_penalty")),
    _penetration_locator(
        getPenetrationLocator(getParam<BoundaryName>("master"),
                              getParam<BoundaryName>("boundary"),
                              Utility::string_to_enum<Order>(getParam<MooseEnum>("order")))),
    _penalty(getParam<Real>("penalty")),
    _friction_coefficient(getParam<Real>("friction_coefficient")),
    _residual_copy(_sys.residualGhosted()),
    _vars(3, libMesh::invalid_uint),
    _mesh_dimension(_mesh.dimension()),
    _nodal_area_var(getVar("nodal_area", 0)),
    _aux_system(_nodal_area_var->sys()),
    _aux_solution(_aux_system.currentSolution())
{
  if (isParamValid("displacements"))
  {
    // modern parameter scheme for displacements
    for (unsigned int i = 0; i < coupledComponents("displacements"); ++i)
      _vars[i] = coupled("displacements", i);
  }
  else
  {
    // Legacy parameter scheme for displacements
    if (isParamValid("disp_x"))
      _vars[0] = coupled("disp_x");
    if (isParamValid("disp_y"))
      _vars[1] = coupled("disp_y");
    if (isParamValid("disp_z"))
      _vars[2] = coupled("disp_z");

    mooseDeprecated("use the `displacements` parameter rather than the `disp_*` parameters (those "
                    "will go away with the deprecation of the Solid Mechanics module).");
  }

  if (parameters.isParamValid("tangential_tolerance"))
    _penetration_locator.setTangentialTolerance(getParam<Real>("tangential_tolerance"));

  if (parameters.isParamValid("normal_smoothing_distance"))
    _penetration_locator.setNormalSmoothingDistance(getParam<Real>("normal_smoothing_distance"));

  if (parameters.isParamValid("normal_smoothing_method"))
    _penetration_locator.setNormalSmoothingMethod(
        parameters.get<std::string>("normal_smoothing_method"));
}
Exemple #27
0
LinearElasticMaterial::LinearElasticMaterial(const InputParameters & parameters) :
    TensorMechanicsMaterial(parameters),
    _T(coupledValue("T")),
    _T0(getParam<Real>("T0")),
    _thermal_expansion_coeff(getParam<Real>("thermal_expansion_coeff")),
    _applied_strain_vector(getParam<std::vector<Real> >("applied_strain_vector"))
{
  mooseDeprecated("LinearElasticMaterial is deprecated. Refer to http://mooseframework.org/wiki/PhysicsModules/TensorMechanics/Deprecations/LinearElasticMaterial to convert this input file.");

  //Initialize applied strain tensor from input vector
  if (_applied_strain_vector.size() == 6)
    _applied_strain_tensor.fillFromInputVector(_applied_strain_vector);
  else
    _applied_strain_tensor.zero();
}
GrainAdvectionVelocity::GrainAdvectionVelocity(const InputParameters & parameters)
  : DerivativeMaterialInterface<Material>(parameters),
    _grain_tracker(getUserObject<GrainTrackerInterface>("grain_data")),
    _grain_force_torque(getUserObject<GrainForceAndTorqueInterface>("grain_force")),
    _grain_volumes(getVectorPostprocessorValue("grain_volumes", "feature_volumes")),
    _grain_forces(_grain_force_torque.getForceValues()),
    _grain_torques(_grain_force_torque.getTorqueValues()),
    _mt(getParam<Real>("translation_constant")),
    _mr(getParam<Real>("rotation_constant")),
    _op_num(coupledComponents("etas")),
    _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
    _velocity_advection(
        declareProperty<std::vector<RealGradient>>(_base_name + "advection_velocity"))
{
  mooseDeprecated("Use GrainAdvectionAux for visualizing advection velocities.");
}
Exemple #29
0
ComputeStrainBase::ComputeStrainBase(const InputParameters & parameters) :
    DerivativeMaterialInterface<Material>(parameters),
    _ndisp(coupledComponents("displacements")),
    _disp(3),
    _grad_disp(3),
    _grad_disp_old(3),
    _T(coupledValue("temperature")),
    _T0(getParam<Real>("temperature_ref")),
    _thermal_expansion_coeff(getParam<Real>("thermal_expansion_coeff")),
    _no_thermal_eigenstrains(false),
    _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : "" ),
    _mechanical_strain(declareProperty<RankTwoTensor>(_base_name + "mechanical_strain")),
    _total_strain(declareProperty<RankTwoTensor>(_base_name + "total_strain")),
    _stateful_displacements(getParam<bool>("stateful_displacements") && _fe_problem.isTransient()),
    _volumetric_locking_correction(getParam<bool>("volumetric_locking_correction"))
{
  // Checking for consistency between mesh size and length of the provided displacements vector
  if (_ndisp != _mesh.dimension())
    mooseError("The number of variables supplied in 'displacements' must match the mesh dimension.");

  if (parameters.isParamSetByUser("thermal_expansion_coeff"))
    _no_thermal_eigenstrains = true;

  if (_no_thermal_eigenstrains)
    mooseDeprecated("The calculation of the thermal strains has been moved to the material ComputeThermalExpansionEigenStrains");

  // fetch coupled variables and gradients (as stateful properties if necessary)
  for (unsigned int i = 0; i < _ndisp; ++i)
  {
    _disp[i] = &coupledValue("displacements", i);
    _grad_disp[i] = &coupledGradient("displacements", i);

    if (_stateful_displacements)
      _grad_disp_old[i] = &coupledGradientOld("displacements" ,i);
    else
      _grad_disp_old[i] = &_grad_zero;
  }

  // set unused dimensions to zero
  for (unsigned i = _ndisp; i < 3; ++i)
  {
    _disp[i] = &_zero;
    _grad_disp[i] = &_grad_zero;
    _grad_disp_old[i] = &_grad_zero;
  }
}
PorousFlow2PhasePS_VG::PorousFlow2PhasePS_VG(const InputParameters & parameters)
  : PorousFlow2PhasePS(parameters),

    _m(getParam<Real>("m")),
    _pc_max(getParam<Real>("pc_max")),
    _p0(getParam<Real>("p0")),
    _alpha(1.0 / _p0)
{
  mooseDeprecated("PorousFlow2PhasePS_VG is deprecated. Please use PorousFlow2PhasePS and a "
                  "PorousFlowCapillaryPressureVG UserObject instead");

  if (_dictator.numPhases() != 2)
    mooseError("The Dictator proclaims that the number of phases is ",
               _dictator.numPhases(),
               " whereas PorousFlow2PhasePS_VG can only be used for 2-phase simulation.  Be aware "
               "that the Dictator has noted your mistake.");
}