@@ -762,47 +762,49 @@ class CDriverBase {
762762
763763 /* !
764764 * \brief Set the array of variables for the source in the point
765- * \param[in] iMarker - Marker index.
766- * \param[in] iVertex - Marker vertex index.
767- * \param[in] value - Value of the variable .
765+ * \param[in] iSolver - Solver index.
766+ * \param[in] iPoint - Point index.
767+ * \param[in] values - Vector values of the source term .
768768 */
769- void SetPointCustomSource (unsigned short iSOLVER, unsigned long iPoint, std::vector<passivedouble> values) {
770- // for (auto iVar = 0ul; iVar < nVar; ++iDim) {
771- // GetSolverAndCheckField(FLOW_SOL, iPoint)->SetCustomPointSource (iPoint, value);
772- auto * solver = solver_container[selected_zone][INST_0][MESH_0][iSOLVER];
769+ void SetPointCustomSource (unsigned short iSolver, unsigned long iPoint, std::vector<passivedouble> values) {
770+ auto * solver = solver_container[selected_zone][INST_0][MESH_0][iSolver];
773771 solver->SetCustomPointSource (iPoint, values);
774772 }
775773
776- // return solution vector
777- inline vector<passivedouble> GetSolutionVector (unsigned short iSOLVER, unsigned long iPoint) {
778- auto * solver = solver_container[iSOLVER][INST_0][MESH_0][iSOLVER];
774+ /* !
775+ * \brief Get the solution vector in a point for a specific solver
776+ * \param[in] iSolver - Solver index.
777+ * \param[in] iPoint - Point index.
778+ * \param[out] solutionvector - Vector values of the solution.
779+ */
780+ inline vector<passivedouble> GetSolutionVector (unsigned short iSolver, unsigned long iPoint) {
781+ auto * solver = solver_container[selected_zone][INST_0][MESH_0][iSolver];
779782 auto * nodes = solver->GetNodes ();
780- auto nVar = GetNumberSolverVars (iSOLVER);
781- // cout << "getting solution: "<<iSOLVER << " " << iPoint << " " << nVar << endl;
782- // auto val = nodes->GetSolution(iPoint,2);
783- // cout << "value : " << val << endl;
783+ auto nVar = GetNumberSolverVars (iSolver);
784784 vector<passivedouble> solutionvector (nVar, 0.0 );
785785 for (auto iVar = 0u ; iVar < nVar; ++iVar) {
786786 solutionvector[iVar] = SU2_TYPE::GetValue (nodes->GetSolution (iPoint,iVar));
787- // cout << "vector = " << solutionvector[iVar] << endl;
788787 }
789788 return solutionvector;
790789}
791790
792- inline vector<passivedouble> GetPrimitiveVector (unsigned short iSOLVER, unsigned long iPoint) {
793- auto * solver = solver_container[iSOLVER][INST_0][MESH_0][iSOLVER];
791+ /* !
792+ * \brief Get the primitive variables vector in a point for a specific solver
793+ * \param[in] iSolver - Solver index.
794+ * \param[in] iPoint - Point index.
795+ * \param[out] solutionvector - Vector values of the primitive variables.
796+ */
797+ inline vector<passivedouble> GetPrimitiveVector (unsigned short iSolver, unsigned long iPoint) {
798+ auto * solver = solver_container[selected_zone][INST_0][MESH_0][iSolver];
794799 auto * nodes = solver->GetNodes ();
795- auto nPrimvar = GetNumberPrimitiveVars (iSOLVER);
796- // cout << "getting solution: "<<iSOLVER << " " << iPoint << " " << nVar << endl;
797- // auto val = nodes->GetSolution(iPoint,2);
798- // cout << "value : " << val << endl;
800+ auto nPrimvar = GetNumberPrimitiveVars (iSolver);
799801 vector<passivedouble> solutionvector (nPrimvar, 0.0 );
800802 for (auto iVar = 0u ; iVar < nPrimvar; ++iVar) {
801803 solutionvector[iVar] = SU2_TYPE::GetValue (nodes->GetPrimitive (iPoint,iVar));
802- // cout << "vector = " << solutionvector[iVar] << endl;
803804 }
804805 return solutionvector;
805806}
807+
806808// / \}
807809
808810 protected:
@@ -826,9 +828,6 @@ inline vector<passivedouble> GetPrimitiveVector(unsigned short iSOLVER, unsigned
826828 unsigned long iPoint = std::numeric_limits<unsigned long >::max()) const {
827829 // 1. check for the solver the number of variables
828830 // 2. check for the mesh the number of points
829- // if (iPoint < std::numeric_limits<unsigned long>::max() && iPoint > GetNumberMarkers()) {
830- // SU2_MPI::Error("Marker index exceeds size.", CURRENT_FUNCTION);
831- // }
832831 auto * solver = solver_container[selected_zone][INST_0][MESH_0][iSolver];
833832 if (solver == nullptr ) SU2_MPI::Error (" The selected solver does not exist." , CURRENT_FUNCTION);
834833 return solver;
0 commit comments