diff --git a/FEM/rf_mfp_new.cpp b/FEM/rf_mfp_new.cpp index 1248e0c37..9fc0bdc52 100644 --- a/FEM/rf_mfp_new.cpp +++ b/FEM/rf_mfp_new.cpp @@ -2055,7 +2055,7 @@ double MFPCalcFluidsHeatCapacity(CFiniteElementStd* assem) CFluidProperties* m_mfp = NULL; CRFProcess* m_pcs = assem->cpl_pcs; //if (m_pcs->pcs_type_name.find("MULTI_PHASE_FLOW")!=string::npos) - if (m_pcs->type == 1212) // non-isothermal multi-phase flow + if (m_pcs && m_pcs->type == 1212) // non-isothermal multi-phase flow { // Capillary pressure PG = assem->interpolate(assem->NodalValC1); @@ -2084,7 +2084,7 @@ double MFPCalcFluidsHeatCapacity(CFiniteElementStd* assem) heat_capacity_fluids = assem->FluidProp->Density() * assem->FluidProp->SpecificHeatCapacity(); - if(m_pcs->type != 1) // neither liquid nor ground water flow + if(m_pcs && m_pcs->type != 1) // neither liquid nor ground water flow { // pressure PG = assem->interpolate(assem->NodalValC1); diff --git a/FEM/rf_mmp_new.cpp b/FEM/rf_mmp_new.cpp index bbefb76bb..bfb4a45a7 100644 --- a/FEM/rf_mmp_new.cpp +++ b/FEM/rf_mmp_new.cpp @@ -2639,7 +2639,8 @@ double* CMediumProperties::HeatConductivityTensor(int number) FLOW = true; if (FLOW) //WW { - if (Fem_Ele_Std->cpl_pcs->type == 1212) // Multi-phase WW + CRFProcess const* cpl_pcs = Fem_Ele_Std->cpl_pcs; + if (cpl_pcs && cpl_pcs->type == 1212) // Multi-phase WW { double PG = Fem_Ele_Std->interpolate( Fem_Ele_Std->NodalValC1); // Capillary pressure @@ -2673,7 +2674,7 @@ double* CMediumProperties::HeatConductivityTensor(int number) = Fem_Ele_Std->FluidProp->HeatConductivity(); Sw = 1; - if (Fem_Ele_Std->cpl_pcs->type != 1) + if (cpl_pcs && cpl_pcs->type != 1) { double PG = Fem_Ele_Std->interpolate( Fem_Ele_Std->NodalValC1); // Capillary pressure diff --git a/FEM/rf_pcs.cpp b/FEM/rf_pcs.cpp index 653f09a55..4aa5a24c5 100644 --- a/FEM/rf_pcs.cpp +++ b/FEM/rf_pcs.cpp @@ -556,53 +556,6 @@ void CRFProcess::AllocateMemGPoint() ele_gp_value.push_back(new ElementValue(this, m_msh->ele_vector[i])); } - -/************************************************************************** - FEMLib-Method: - Task: This function is a part of the monolithic scheme - and it is used to assign pcs name to IC, ST, BC, TIM and OUT. object - Programing: - 07/2005 WW Implementation - 10/2010 TF cody style improvements -**************************************************************************/ -void CRFProcess::SetOBJNames() -{ - // IC - const size_t ic_vector_size(ic_vector.size()); - for (size_t i = 0; i < ic_vector_size; i++) - ic_vector[i]->setProcessType(this->getProcessType()); - - // BC - std::list::const_iterator p_bc = bc_list.begin(); - while (p_bc != bc_list.end()) - { - (*p_bc)->setProcessType(this->getProcessType()); - ++p_bc; - } - - // ST - const size_t st_vector_size (st_vector.size()); - for (size_t i = 0; i < st_vector_size; i++) - st_vector[i]->setProcessType(this->getProcessType()); - - // TIM - const size_t time_vector_size (time_vector.size()); - for (size_t i = 0; i < time_vector_size; i++) - // Tim = time_vector[i]; - // Tim->pcs_type_name = _pcs_type_name; - time_vector[i]->pcs_type_name = convertProcessTypeToString (this->getProcessType()); - - // OUT - // OK4216 - const size_t out_vector_size (out_vector.size()); - for (size_t i = 0; i < out_vector_size; i++) - // m_out = out_vector[i]; - // m_out->_pcs_type_name = _pcs_type_name; - out_vector[i]->setProcessType(this->getProcessType()); - //m_out->pcs_pv_name = pcs_primary_function_name[0];//CMCD - //string temp = pcs_primary_function_name[0]; -} - /************************************************************************** PCSLib-Method: 10/2002 OK Implementation @@ -3164,12 +3117,8 @@ void CRFProcess::ConfigDeformation() norm_u_JFNK = new double[2]; #endif } - - if(type / 10 == 4) - SetOBJNames(); //if(type==41) SetOBJNames(); //OK->WW please put to Config() } - /************************************************************************** FEMLib-Method: Static problems Task: diff --git a/FEM/rf_pcs.h b/FEM/rf_pcs.h index ca1a706c5..24a224e8d 100644 --- a/FEM/rf_pcs.h +++ b/FEM/rf_pcs.h @@ -729,10 +729,6 @@ class CRFProcess : public ProcessInfo void DDCAssembleGlobalMatrix(); #endif virtual void AssembleSystemMatrixNew(void); - // This function is a part of the monolithic scheme - // and it is related to ST, BC, IC, TIM and OUT. WW - void SetOBJNames(); - //MW int getFirstNodeBelowGWL(size_t i);