refactoring to std ptr

This commit is contained in:
James E McClure
2018-05-17 09:21:28 -04:00
parent 5060f59323
commit 80d4ec4807
5 changed files with 6 additions and 6 deletions

View File

@@ -282,13 +282,13 @@ runAnalysis::commWrapper runAnalysis::getComm( )
* Constructor/Destructors *
******************************************************************/
runAnalysis::runAnalysis( std::shared_ptr<Database> db,
const RankInfoStruct& rank_info, const ScaLBL_Communicator &ScaLBL_Comm, const Domain* Dm,
const RankInfoStruct& rank_info, std::shared_ptr<ScaLBL_Communicator> ScaLBL_Comm, std::shared_ptr <Domain> Dm,
int Np, bool pBC, double beta, IntArray Map ):
d_Np( Np ),
d_beta( beta ),
d_rank_info( rank_info ),
d_Map( Map ),
d_ScaLBL_Comm( ScaLBL_Comm ),
d_ScaLBL_Comm( ScLBL_Comm ),
d_fillData(Dm->Comm,Dm->rank_info,Dm->Nx-2,Dm->Ny-2,Dm->Nz-2,1,1,1,0,1)
{
NULL_USE( pBC );

View File

@@ -24,7 +24,7 @@ public:
//! Constructor
runAnalysis( std::shared_ptr<Database> db, const RankInfoStruct& rank_info,
const ScaLBL_Communicator &ScaLBL_Comm, const Domain* dm, int Np, bool pBC, double beta, IntArray Map );
std::shared_ptr<ScaLBL_Communicator> ScaLBL_Comm, std::shared_ptr <Domain> dm, int Np, bool pBC, double beta, IntArray Map );
//! Destructor
~runAnalysis();

View File

@@ -1,6 +1,6 @@
#include "common/ScaLBL.h"
ScaLBL_Communicator::ScaLBL_Communicator(Domain *Dm){
ScaLBL_Communicator::ScaLBL_Communicator(std::shared_ptr <Domain> Dm){
//......................................................................................
Lock=false; // unlock the communicator
//......................................................................................

View File

@@ -129,7 +129,7 @@ extern "C" void ScaLBL_SetSlice_z(double *Phi, double value, int Nx, int Ny, int
class ScaLBL_Communicator{
public:
//......................................................................................
ScaLBL_Communicator(Domain *Dm);
ScaLBL_Communicator(std::shared_ptr <Domain> Dm);
//ScaLBL_Communicator(Domain &Dm, IntArray &Map);
~ScaLBL_Communicator();

View File

@@ -64,7 +64,7 @@ void ScaLBL_ColorModel::ReadParams(string filename){
Nx+=2; Ny+=2; Nz += 2;
N = Nx*Ny*Nz;
for (int i=0; i<Nx*Ny*Nz; i++) Dm->id[i] = 1; // initialize this way
Averages = std::shared_ptr<TwoPhase> ( new TwoPhase(Dm.get()) ); // TwoPhase analysis object
Averages = std::shared_ptr<TwoPhase> ( new TwoPhase(Dm) ); // TwoPhase analysis object
MPI_Barrier(comm);
Dm->CommInit(comm);