MemoryUsageReporter::MemoryUsageReporter(const MooseObject * moose_object) : _mur_communicator(moose_object->comm()), _my_rank(_mur_communicator.rank()), _nrank(_mur_communicator.size()), _hardware_id(_nrank) { // get total available ram _memory_total = MemoryUtils::getTotalRAM(); if (!_memory_total) mooseWarning("Unable to query hardware memory size in ", moose_object->name()); // gather all per node memory to processor zero std::vector<unsigned long long> memory_totals(_nrank); _mur_communicator.gather(0, _memory_total, memory_totals); sharedMemoryRanksBySplitCommunicator(); // validate and store per node memory if (_my_rank == 0) for (std::size_t i = 0; i < _nrank; ++i) { auto id = _hardware_id[i]; if (id == _hardware_memory_total.size()) { _hardware_memory_total.resize(id + 1); _hardware_memory_total[id] = memory_totals[i]; } else if (_hardware_memory_total[id] != memory_totals[i]) mooseWarning("Inconsistent total memory reported by ranks on the same hardware node in ", moose_object->name()); } }
void Output::initAvailableLists() { /* This flag is set to true if any postprocessor has the 'outputs' parameter set, it is then used to produce an warning if postprocessor output is disabled*/ bool has_limited_pps = false; /* This flag is set to true if any vector postprocessor has the 'outputs' parameter set, it is then used to produce an warning if postprocessor output is disabled*/ bool has_limited_vector_pps = false; { // Get a reference to the storage of the postprocessors ExecStore<PostprocessorWarehouse> & warehouse = _problem_ptr->getPostprocessorWarehouse(); initPostprocessorOrVectorPostprocessorLists<ExecStore<PostprocessorWarehouse>, Postprocessor>(_postprocessor, warehouse, has_limited_pps, _app, _name, _pars); } { // Get a reference to the storage of the vector postprocessors ExecStore<VectorPostprocessorWarehouse> & warehouse = _problem_ptr->getVectorPostprocessorWarehouse(); initPostprocessorOrVectorPostprocessorLists<ExecStore<VectorPostprocessorWarehouse>, VectorPostprocessor>(_vector_postprocessor, warehouse, has_limited_vector_pps, _app, _name, _pars); } // Produce the warning when 'outputs' is used, but postprocessor output is disable if (has_limited_pps && isParamValid("output_postprocessors") && getParam<bool>("output_postprocessors") == false) mooseWarning("A Postprocessor utilizes the 'outputs' parameter; however, postprocessor output is disabled for the '" << _name << "' output object."); // Produce the warning when 'outputs' is used, but postprocessor output is disable if (has_limited_vector_pps && isParamValid("output_vector_postprocessors") && getParam<bool>("output_vector_postprocessors") == false) mooseWarning("A VectorPostprocessor utilizes the 'outputs' parameter; however, vector postprocessor output is disabled for the '" << _name << "' output object."); // Get a list of the available variables std::vector<VariableName> variables = _problem_ptr->getVariableNames(); // Loop through the variables and store the names in the correct available lists for (std::vector<VariableName>::const_iterator it = variables.begin(); it != variables.end(); ++it) { if (_problem_ptr->hasVariable(*it)) { MooseVariable & var = _problem_ptr->getVariable(0, *it); const FEType type = var.feType(); if (type.order == CONSTANT) _nonlinear_elemental.available.push_back(*it); else _nonlinear_nodal.available.push_back(*it); } else if (_problem_ptr->hasScalarVariable(*it)) _scalar.available.push_back(*it); } }
void MooseEnumBase::checkDeprecated(const MooseEnumItem & item) const { std::map<MooseEnumItem, MooseEnumItem>::const_iterator it = _deprecated_items.find(item); if (it != _deprecated_items.end()) { if (it->second.name().empty()) mooseWarning(item.name() + " is deprecated"); else mooseWarning(item.name() + " is deprecated, consider using " + it->second.name()); } }
void MooseEnumBase::checkDeprecatedBase(const std::string & name_upper) const { std::map<std::string, std::string>::const_iterator it = _deprecated_names.find(name_upper); if (it != _deprecated_names.end()) { if (it->second != "") mooseWarning(name_upper + " is deprecated, consider using " + it->second); else mooseWarning(name_upper + " is deprecated"); } }
void InputParameters::set_attributes(const std::string & name, bool inserted_only) { if (!inserted_only) { /** * "_set_by_add_param" and "_deprecated_params" are not populated until after * the default value has already been set in libMesh (first callback to this * method). Therefore if a variable is in/not in one of these sets, you can * be assured it was put there outside of the "addParam*()" calls. */ _set_by_add_param.erase(name); // valid_params don't make sense for MooseEnums if (!have_parameter<MooseEnum>(name) && !have_parameter<MultiMooseEnum>(name)) _valid_params.insert(name); if (_show_deprecated_message) { std::map<std::string, std::string>::const_iterator pos = _deprecated_params.find(name); if (pos != _deprecated_params.end()) mooseWarning("The parameter " << name << " is deprecated.\n" << pos->second); } } }
void OutputWarehouse::addOutput(OutputBase * output) { // Add the object to the warehouse storage _object_ptrs.push_back(output); // Store the name _output_names.insert(output->name()); // If the output object is a FileOutputBase then store the output filename FileOutputter * ptr = dynamic_cast<FileOutputter *>(output); if (ptr != NULL) addOutputFilename(ptr->filename()); // Insert object sync times to the global set if (output->parameters().isParamValid("sync_times")) { std::vector<Real> sync_times = output->parameters().get<std::vector<Real> >("sync_times"); _sync_times.insert(sync_times.begin(), sync_times.end()); } // Warning if multiple Console objects are added with 'output_screen=true' in the input file Console * c_ptr = dynamic_cast<Console *>(output); if (c_ptr != NULL) { bool screen = c_ptr->getParam<bool>("output_screen"); if (screen && _has_screen_console) mooseWarning("Multiple Console output objects are writing to the screen, this will likely cause duplicate messages printed."); else _has_screen_console = true; } }
ConservedAction::ConservedAction(const InputParameters & params) : Action(params), _solve_type(getParam<MooseEnum>("solve_type").getEnum<SolveType>()), _var_name(name()), _scaling(getParam<Real>("scaling")) { switch (_solve_type) { case SolveType::DIRECT: _fe_type = FEType(Utility::string_to_enum<Order>("THIRD"), Utility::string_to_enum<FEFamily>("HERMITE")); if (!parameters().isParamSetByAddParam("order") && !parameters().isParamSetByAddParam("family")) mooseWarning("Order and family autoset to third and hermite in ConservedAction"); break; case SolveType::REVERSE_SPLIT: case SolveType::FORWARD_SPLIT: _fe_type = FEType(Utility::string_to_enum<Order>(getParam<MooseEnum>("order")), Utility::string_to_enum<FEFamily>(getParam<MooseEnum>("family"))); // Set name of chemical potential variable _chempot_name = "chem_pot_" + _var_name; break; default: mooseError("Incorrect solve_type in ConservedAction"); } }
Real FeatureFloodCount::getNodalValue(dof_id_type node_id, unsigned int var_idx, bool show_var_coloring) const { mooseDoOnce(mooseWarning("Please call getEntityValue instead")); return getEntityValue(node_id, var_idx, show_var_coloring); }
bool stzRHEVPFlowRatePowerLawJ2::computeValue(unsigned int qp, Real & val) const { RankTwoTensor pk2_dev = computePK2Deviatoric(_pk2[qp], _ce[qp]); Real eqv_stress = computeEqvStress(pk2_dev, _ce[qp]); Real qfunc; if (eqv_stress>1.0) { qfunc = 1.0/eqv_stress*(eqv_stress-1.0)*(eqv_stress-1.0); } else { qfunc=0.0; } val = _v*std::exp(-1.0/_chiv[qp])*qfunc; if (val > _flow_rate_tol) { #ifdef DEBUG mooseWarning("Flow rate greater than " , _flow_rate_tol ," " , val , " " ,eqv_stress ," " , _strength[qp]); #endif return false; } return true; }
EBSDMesh::EBSDMesh(const InputParameters & parameters) : GeneratedMesh(parameters), _filename(getParam<FileName>("filename")) { if (_nx != 1 || _ny != 1 || _nz !=1) mooseWarning("Do not specify mesh geometry information, it is read from the EBSD file."); }
void OversampleOutput::cloneMesh() { // Create the new mesh from a file if (isParamValid("file")) { InputParameters mesh_params = emptyInputParameters(); mesh_params += _problem_ptr->mesh().parameters(); mesh_params.set<MeshFileName>("file") = getParam<MeshFileName>("file"); mesh_params.set<bool>("nemesis") = false; mesh_params.set<bool>("skip_partitioning") = false; mesh_params.set<std::string>("_object_name") = "output_problem_mesh"; _mesh_ptr = new FileMesh(mesh_params); _mesh_ptr->allowRecovery(false); // We actually want to reread the initial mesh _mesh_ptr->init(); _mesh_ptr->prepare(); _mesh_ptr->meshChanged(); } // Clone the existing mesh else { if (_app.isRecovering()) mooseWarning("Recovering or Restarting with Oversampling may not work (especially with adapted meshes)!! Refs #2295"); _mesh_ptr= &(_problem_ptr->mesh().clone()); } }
bool FauxGrainTracker::doesFeatureIntersectBoundary(unsigned int /*feature_id*/) const { mooseDoOnce(mooseWarning("FauxGrainTracker::doesFeatureIntersectboundary() is unimplemented")); return false; }
void MooseApp::dynamicRegistration(const Parameters & params) { // first convert the app name to a library name std::string library_name = appNameToLibName(params.get<std::string>("app_name")); // Create a vector of paths that we can search inside for libraries std::vector<std::string> paths; std::string library_path = params.get<std::string>("library_path"); if (library_path != "") MooseUtils::tokenize(library_path, paths, 1, ":"); char * moose_lib_path_env = std::getenv("MOOSE_LIBRARY_PATH"); if (moose_lib_path_env) { std::string moose_lib_path(moose_lib_path_env); std::vector<std::string> tmp_paths; MooseUtils::tokenize(moose_lib_path, tmp_paths, 1, ":"); // merge the two vectors together (all possible search paths) paths.insert(paths.end(), tmp_paths.begin(), tmp_paths.end()); } // Attempt to dynamically load the library for (std::vector<std::string>::const_iterator path_it = paths.begin(); path_it != paths.end(); ++path_it) if (MooseUtils::checkFileReadable(*path_it + '/' + library_name, false, false)) loadLibraryAndDependencies(*path_it + '/' + library_name, params); else mooseWarning("Unable to open library file \"" << *path_it + '/' + library_name << "\". Double check for spelling errors."); }
ContactModel contactModel(const std::string & the_name) { ContactModel model(CM_INVALID); std::string name(the_name); std::transform(name.begin(), name.end(), name.begin(), ::tolower); if ("frictionless" == name) { model = CM_FRICTIONLESS; } else if ("glued" == name) { model = CM_GLUED; } else if ("coulomb" == name) { model = CM_COULOMB; } else if ("experimental" == name) { model = CM_FRICTIONLESS; mooseWarning("Use of contact model \"experimental\" is deprecated. Use \"frictionless\" instead."); } else { std::string err("Invalid contact model found: "); err += name; mooseError( err ); } return model; }
void OutputBase::outputInitial() { // Do Nothing if output is not force or if output is disallowed if (!_force_output && !_allow_output) return; // Output the initial condition, if desired if (_force_output || _output_initial) { outputSetup(); _mesh_changed = false; _output_setup_called = true; output(); _num++; } // Output the input, if desired and it has not been output previously if (_output_input) { // Produce warning if an input file does not exist // (parser/action system are not mandatory subsystems) if (_app.actionWarehouse().empty()) mooseWarning("There is no input file to be output"); // Call the input file output function outputInput(); // Do not allow the input file to be written again _output_input = false; } // Set the force output flag to false _force_output = false; }
std::vector<std::vector<std::pair<unsigned int, unsigned int> > > NodalFloodCount::getElementalValues(unsigned int /*elem_id*/) const { std::vector<std::vector<std::pair<unsigned int, unsigned int> > > empty; mooseDoOnce(mooseWarning("Method not implemented")); return empty; }
void ParsedMaterialHelper::functionsOptimize() { // base function if (!_disable_fpoptimizer) _func_F->Optimize(); if (_enable_jit && !_func_F->JITCompile()) mooseWarning("Failed to JIT compile expression, falling back to byte code interpretation."); }
void Material::resetQpProperties() { if (!_compute) mooseDoOnce(mooseWarning("You disabled the computation of this (", name(), ") material by MOOSE, but have not overridden the 'resetQpProperties' " "method, this can lead to unintended values being set for material " "property values.")); }
void GapHeatTransfer::computeGapValues() { if (!_quadrature) { _has_info = true; _gap_temp = _gap_temp_value[_qp]; _gap_distance = _gap_distance_value[_qp]; } else { Node * qnode = _mesh.getQuadratureNode(_current_elem, _current_side, _qp); PenetrationInfo * pinfo = _penetration_locator->_penetration_info[qnode->id()]; _gap_temp = 0.0; _gap_distance = 88888; _has_info = false; _edge_multiplier = 1.0; if (pinfo) { _gap_distance = pinfo->_distance; _has_info = true; Elem * slave_side = pinfo->_side; std::vector<std::vector<Real> > & slave_side_phi = pinfo->_side_phi; _gap_temp = _variable->getValue(slave_side, slave_side_phi); Real tangential_tolerance = _penetration_locator->getTangentialTolerance(); if (tangential_tolerance != 0.0) { _edge_multiplier = 1.0 - pinfo->_tangential_distance / tangential_tolerance; if (_edge_multiplier < 0.0) { _edge_multiplier = 0.0; } } } else { if (_warnings) { std::stringstream msg; msg << "No gap value information found for node "; msg << qnode->id(); msg << " on processor "; msg << processor_id(); mooseWarning( msg.str() ); } } } Point current_point(_q_point[_qp]); GapConductance::computeGapRadii(_gap_geometry_type, current_point, _p1, _p2, _gap_distance, _normals[_qp], _r1, _r2, _radius); }
MultiAppTransfer::MultiAppTransfer(const InputParameters & parameters) : Transfer(parameters), _multi_app(_fe_problem.getMultiApp(getParam<MultiAppName>("multi_app"))), _direction(getParam<MooseEnum>("direction")), _displaced_source_mesh(false), _displaced_target_mesh(false) { bool check = getParam<bool>("check_multiapp_execute_on"); if (check && (getExecuteOnEnum() != _multi_app->getExecuteOnEnum())) mooseDoOnce(mooseWarning("MultiAppTransfer execute_on flags do not match associated Multiapp " "execute_on flags")); }
Real FauxGrainTracker::getEntityValue(dof_id_type entity_id, FeatureFloodCount::FieldType field_type, std::size_t var_idx) const { if (var_idx == FeatureFloodCount::invalid_size_t) var_idx = 0; mooseAssert(var_idx < _n_vars, "Index out of range"); switch (field_type) { case FieldType::UNIQUE_REGION: case FieldType::VARIABLE_COLORING: { auto entity_it = _entity_id_to_var_num.find(entity_id); if (entity_it != _entity_id_to_var_num.end()) return entity_it->second; else return -1; break; } case FieldType::CENTROID: { if (_periodic_node_map.size()) mooseDoOnce(mooseWarning( "Centroids are not correct when using periodic boundaries, contact the MOOSE team")); // If this element contains the centroid of one of features, return it's index const auto * elem_ptr = _mesh.elemPtr(entity_id); for (MooseIndex(_vars) var_num = 0; var_num < _n_vars; ++var_num) { const auto centroid = _centroid.find(var_num); if (centroid != _centroid.end()) if (elem_ptr->contains_point(centroid->second)) return 1; } return 0; } // We don't want to error here because this should be a drop in replacement for the real grain // tracker. // Instead we'll just return zero and continue default: return 0; } return 0; }
void AddKernelAction::act() { if (_current_task == "add_kernel") _problem->addKernel(_type, _name, _moose_object_pars); else { if (getAllTasks().find("add_aux_bc") != getAllTasks().end()) mooseWarning("The [AuxBCs] block is deprecated, all AuxKernels including both block and boundary restricted should be added within the [AuxKernels] block"); _problem->addAuxKernel(_type, _name, _moose_object_pars); } }
void CheckOutputAction::checkConsoleOutput() { // Warning if multiple Console objects are added with 'output_screen=true' in the input file std::vector<Console *> console_ptrs = _app.getOutputWarehouse().getOutputs<Console>(); unsigned int num_screen_outputs = 0; for (const auto & console : console_ptrs) if (console->getParam<bool>("output_screen")) num_screen_outputs++; if (num_screen_outputs > 1) mooseWarning("Multiple (" << num_screen_outputs << ") Console output objects are writing to the screen, this will likely cause duplicate messages printed."); }
StressDivergenceTensors::StressDivergenceTensors(const InputParameters & parameters) : ALEKernel(parameters), _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""), _use_finite_deform_jacobian(getParam<bool>("use_finite_deform_jacobian")), _stress(getMaterialPropertyByName<RankTwoTensor>(_base_name + "stress")), _Jacobian_mult(getMaterialPropertyByName<RankFourTensor>(_base_name + "Jacobian_mult")), _component(getParam<unsigned int>("component")), _ndisp(coupledComponents("displacements")), _disp_var(_ndisp), _temp_coupled(isCoupled("temperature")), _temp_var(_temp_coupled ? coupled("temperature") : 0), _deigenstrain_dT(_temp_coupled ? &getMaterialPropertyDerivative<RankTwoTensor>( getParam<std::string>("thermal_eigenstrain_name"), getVar("temperature", 0)->name()) : nullptr), _out_of_plane_strain_coupled(isCoupled("out_of_plane_strain")), _out_of_plane_strain_var(_out_of_plane_strain_coupled ? coupled("out_of_plane_strain") : 0), _out_of_plane_direction(getParam<MooseEnum>("out_of_plane_direction")), _avg_grad_test(_test.size(), std::vector<Real>(3, 0.0)), _avg_grad_phi(_phi.size(), std::vector<Real>(3, 0.0)), _volumetric_locking_correction(getParam<bool>("volumetric_locking_correction")) { for (unsigned int i = 0; i < _ndisp; ++i) _disp_var[i] = coupled("displacements", i); // Checking for consistency between mesh size and length of the provided displacements vector if (_out_of_plane_direction != 2 && _ndisp != 3) mooseError("For 2D simulations where the out-of-plane direction is x or y coordinate " "directions the number of supplied displacements must be three."); else if (_out_of_plane_direction == 2 && _ndisp != _mesh.dimension()) mooseError("The number of displacement variables supplied must match the mesh dimension"); if (_use_finite_deform_jacobian) { _deformation_gradient = &getMaterialProperty<RankTwoTensor>(_base_name + "deformation_gradient"); _deformation_gradient_old = &getMaterialPropertyOld<RankTwoTensor>(_base_name + "deformation_gradient"); _rotation_increment = &getMaterialProperty<RankTwoTensor>(_base_name + "rotation_increment"); } // Error if volumetric locking correction is turned on for 1D problems if (_ndisp == 1 && _volumetric_locking_correction) mooseError("Volumetric locking correction should be set to false for 1-D problems."); // Generate warning when volumetric locking correction is used with second order elements if (_mesh.hasSecondOrderElements() && _volumetric_locking_correction) mooseWarning("Volumteric locking correction is not required for second order elements. Using " "volumetric locking with second order elements could cause zigzag patterns in " "stresses and strains."); }
void Factory::deprecatedMessage(const std::string obj_name) { std::map<std::string, 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 time_t now; time(&now); // Get the stop time 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 << "Upadate your application using the '" << name_it->second << "' object"; // Produce the error message mooseError(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 << "Replaced " << obj_name << " with " << name_it->second; // Produce the error message mooseDoOnce(mooseWarning(msg.str())); } }
void GapConductance::computeGapValues() { if (!_quadrature) { _has_info = true; _gap_temp = _gap_temp_value[_qp]; _gap_distance = _gap_distance_value[_qp]; } else { Node * qnode = _mesh.getQuadratureNode(_current_elem, _current_side, _qp); PenetrationInfo * pinfo = _penetration_locator->_penetration_info[qnode->id()]; _gap_temp = 0.0; _gap_distance = 88888; _has_info = false; if (pinfo) { _gap_distance = pinfo->_distance; _has_info = true; const Elem * slave_side = pinfo->_side; std::vector<std::vector<Real>> & slave_side_phi = pinfo->_side_phi; std::vector<dof_id_type> slave_side_dof_indices; _dof_map->dof_indices(slave_side, slave_side_dof_indices, _temp_var->number()); for (unsigned int i = 0; i < slave_side_dof_indices.size(); ++i) { // The zero index is because we only have one point that the phis are evaluated at _gap_temp += slave_side_phi[i][0] * (*(*_serialized_solution))(slave_side_dof_indices[i]); } } else { if (_warnings) mooseWarning("No gap value information found for node ", qnode->id(), " on processor ", processor_id(), " at coordinate ", Point(*qnode)); } } Point current_point(_q_point[_qp]); computeGapRadii( _gap_geometry_type, current_point, _p1, _p2, _gap_distance, _normals[_qp], _r1, _r2, _radius); }
void GapConductance::computeGapValues() { if(!_quadrature) { _has_info = true; _gap_temp = _gap_temp_value[_qp]; _gap_distance = _gap_distance_value[_qp]; return; } else { Node * qnode = _mesh.getQuadratureNode(_current_elem, _current_side, _qp); PenetrationInfo * pinfo = _penetration_locator->_penetration_info[qnode->id()]; _gap_temp = 0.0; _gap_distance = 88888; _has_info = false; if (pinfo) { _gap_distance = pinfo->_distance; _has_info = true; Elem * slave_side = pinfo->_side; std::vector<std::vector<Real> > & slave_side_phi = pinfo->_side_phi; std::vector<unsigned int> slave_side_dof_indices; _dof_map->dof_indices(slave_side, slave_side_dof_indices, _temp_var->number()); for(unsigned int i=0; i<slave_side_dof_indices.size(); ++i) { //The zero index is because we only have one point that the phis are evaluated at _gap_temp += slave_side_phi[i][0] * (*(*_serialized_solution))(slave_side_dof_indices[i]); } } else { if (_warnings) { std::stringstream msg; msg << "No gap value information found for node "; msg << qnode->id(); msg << " on processor "; msg << processor_id(); mooseWarning( msg.str() ); } } } }
Tecplot::Tecplot(const InputParameters & parameters) : BasicOutput<OversampleOutput>(parameters), _binary(getParam<bool>("binary")), _ascii_append(getParam<bool>("ascii_append")), _first_time(declareRestartableData<bool>("first_time", true)) { #ifndef LIBMESH_HAVE_TECPLOT_API if (_binary) { mooseWarning("Teclplot binary output requested but not available, outputting ASCII format instead."); _binary = false; } #endif }
MultiAppTransfer::MultiAppTransfer(const InputParameters & parameters) : /** * Here we need to remove the special option that indicates to the user that this object will follow it's associated * Multiapp execute_on. This non-standard option is not understood by SetupInterface. In the absence of any execute_on * parameters, will populate the execute_on MultiMooseEnum with the values from the associated MultiApp (see execFlags). */ Transfer(removeSpecialOption(parameters)), _multi_app(_fe_problem.getMultiApp(getParam<MultiAppName>("multi_app"))), _direction(getParam<MooseEnum>("direction")), _displaced_source_mesh(false), _displaced_target_mesh(false) { if (execFlags() != _multi_app->execFlags()) mooseDoOnce(mooseWarning("MultiAppTransfer execute_on flags do not match associated Multiapp execute_on flags")); }
Real IdealRealGasMixtureFluidProperties::c_from_T_v(Real T, Real v, const std::vector<Real> & x) const { Real p, dp_dT, dp_dv; Real s, ds_dT, ds_dv; p_from_T_v(T, v, x, p, dp_dT, dp_dv); s_from_T_v(T, v, x, s, ds_dT, ds_dv); Real dp_dv_s = dp_dv - dp_dT * ds_dv / ds_dT; if (dp_dv_s >= 0) mooseWarning(name(), ":c_from_T_v(), dp_dv_s = ", dp_dv_s, ". Should be negative."); return v * std::sqrt(-dp_dv_s); }