From: michael Date: Fri, 10 Dec 2021 13:37:00 +0000 (+0100) Subject: Tested mesh fast equivalence when giving an input field + MPI parallelisation of... X-Git-Tag: V9_8_0~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e088fd0d7b94a0502a72b054b387116b69c07e3f;p=tools%2Fsolverlab.git Tested mesh fast equivalence when giving an input field + MPI parallelisation of the class --- diff --git a/CoreFlows/Models/inc/StationaryDiffusionEquation.hxx b/CoreFlows/Models/inc/StationaryDiffusionEquation.hxx index 008afe4..f0c1568 100755 --- a/CoreFlows/Models/inc/StationaryDiffusionEquation.hxx +++ b/CoreFlows/Models/inc/StationaryDiffusionEquation.hxx @@ -114,27 +114,17 @@ public : vector getInputFieldsNames(); void setInputField(const string& nameField, Field& inputField );//supply of a required input field - void setFluidTemperatureField(Field coupledTemperatureField){ - _fluidTemperatureField=coupledTemperatureField; - _fluidTemperatureFieldSet=true; - }; - void setFluidTemperature(double fluidTemperature){ - _fluidTemperature=fluidTemperature; - } - Field& getFluidTemperatureField(){ - return _fluidTemperatureField; - } + void setFluidTemperatureField(Field coupledTemperatureField); + void setFluidTemperature(double fluidTemperature){ _fluidTemperature=fluidTemperature; } + Field& getFluidTemperatureField(){ return _fluidTemperatureField; } + /** \fn setHeatPowerField * \brief set the heat power field (variable in space) * \details * \param [in] Field * \param [out] void * */ - void setHeatPowerField(Field heatPower){ - heatPower.getMesh().checkFastEquivalWith(_mesh); - _heatPowerField=heatPower; - _heatPowerFieldSet=true; - } + void setHeatPowerField(Field heatPower); /** \fn setHeatPowerField * \brief set the heat power field (variable in space) @@ -143,11 +133,7 @@ public : * \param [in] string fieldName * \param [out] void * */ - void setHeatPowerField(string fileName, string fieldName, int iteration = 0, int order = 0, int meshLevel=0){ - _heatPowerField=Field(fileName, CELLS,fieldName, iteration, order, meshLevel); - _heatPowerField.getMesh().checkFastEquivalWith(_mesh); - _heatPowerFieldSet=true; - } + void setHeatPowerField(string fileName, string fieldName, int iteration = 0, int order = 0, int meshLevel=0); /** \fn getHeatPowerField * \brief returns the heat power field diff --git a/CoreFlows/Models/src/StationaryDiffusionEquation.cxx b/CoreFlows/Models/src/StationaryDiffusionEquation.cxx index f813ad5..727d75d 100755 --- a/CoreFlows/Models/src/StationaryDiffusionEquation.cxx +++ b/CoreFlows/Models/src/StationaryDiffusionEquation.cxx @@ -24,19 +24,19 @@ StationaryDiffusionEquation::StationaryDiffusionEquation(int dim, bool FECalcula } MPI_Comm_rank(PETSC_COMM_WORLD,&_mpi_rank); MPI_Comm_size(PETSC_COMM_WORLD,&_mpi_size); - PetscPrintf(PETSC_COMM_WORLD,"Simulation on %d processors\n",_mpi_size);//Prints to standard out, only from the first processor in the communicator. Calls from other processes are ignored. + PetscPrintf(PETSC_COMM_WORLD,"\n Simulation on %d processors\n",_mpi_size);//Prints to standard out, only from the first processor in the communicator. Calls from other processes are ignored. PetscSynchronizedPrintf(PETSC_COMM_WORLD,"Processor [%d] ready for action\n",_mpi_rank);//Prints synchronized output from several processors. Output of the first processor is followed by that of the second, etc. PetscSynchronizedFlush(PETSC_COMM_WORLD,PETSC_STDOUT); if(lambda < 0.) { std::cout<<"Conductivity="<open((_fileName+".log").c_str(), ios::out | ios::trunc);;//for creation of a log file to save the history of the simulation if(!_meshSet) - throw CdmathException("StationaryDiffusionEquation::initialize() set mesh first"); + throw CdmathException("!!!!!!!!StationaryDiffusionEquation::initialize() set mesh first"); else { - cout<<"!!!! Initialisation of the computation of the temperature diffusion in a solid using "; - *_runLogFile<<"!!!!! Initialisation of the computation of the temperature diffusion in a solid using "; + cout<<"\n Initialisation of the computation of the temperature diffusion in a solid using "; + *_runLogFile<<"\n Initialisation of the computation of the temperature diffusion in a solid using "; if(!_FECalculation) { cout<< "Finite volumes method"<