Commit 949d38d0 authored by igor's avatar igor

minor changes to make MS compiler happy for non MPI version

parent c5a1d492
...@@ -170,7 +170,7 @@ namespace INMOST ...@@ -170,7 +170,7 @@ namespace INMOST
{ {
std::stringstream type(v->GetChild("Cells")->GetChildWithAttrib("Name", "types")->GetContents()); std::stringstream type(v->GetChild("Cells")->GetChildWithAttrib("Name", "types")->GetContents());
int ctype; int ctype;
bool have_2d = false; //bool have_2d = false;
for (int q = 0; q < ncells && grid_is_2d == 2; ++q) for (int q = 0; q < ncells && grid_is_2d == 2; ++q)
{ {
type >> ctype; type >> ctype;
......
...@@ -604,7 +604,7 @@ namespace INMOST ...@@ -604,7 +604,7 @@ namespace INMOST
for(dynarray<HandleType,64>::size_type it = 0; it < nodes.size(); it++) //delete nodes inside the face for(dynarray<HandleType,64>::size_type it = 0; it < nodes.size(); it++) //delete nodes inside the face
{ {
adj_type const & hc = m->HighConn(nodes[it]); //adj_type const & hc = m->HighConn(nodes[it]);
if( m->GetMarker(nodes[it],rem) ) if( m->GetMarker(nodes[it],rem) )
{ {
assert( m->HighConn(nodes[it]).empty() || m->Count(m->HighConn(nodes[it]).data(),static_cast<integer>(m->HighConn(nodes[it]).size()),hm) == 0 ); assert( m->HighConn(nodes[it]).empty() || m->Count(m->HighConn(nodes[it]).data(),static_cast<integer>(m->HighConn(nodes[it]).size()),hm) == 0 );
......
...@@ -4361,7 +4361,7 @@ namespace INMOST ...@@ -4361,7 +4361,7 @@ namespace INMOST
time = Timer() - time; time = Timer() - time;
REPORT_VAL("time",time); REPORT_VAL("time",time);
#else //USE_MPI and USE_PARALLEL_STORAGE #else //USE_MPI and USE_PARALLEL_STORAGE
(void) mask; (void) ghost; (void) shared; (void) mask;
#endif //USE_MPI and USE_PARALLEL_STORAGE #endif //USE_MPI and USE_PARALLEL_STORAGE
EXIT_FUNC(); EXIT_FUNC();
} }
......
...@@ -61,6 +61,7 @@ namespace INMOST { ...@@ -61,6 +61,7 @@ namespace INMOST {
virtual INMOST_DATA_REAL_TYPE Condest(INMOST_DATA_REAL_TYPE tol, INMOST_DATA_ENUM_TYPE maxiter) { virtual INMOST_DATA_REAL_TYPE Condest(INMOST_DATA_REAL_TYPE tol, INMOST_DATA_ENUM_TYPE maxiter) {
throw INMOST::SolverUnsupportedOperation; throw INMOST::SolverUnsupportedOperation;
(void) tol; (void) maxiter;
}; };
virtual ~SolverInterface() {}; virtual ~SolverInterface() {};
......
...@@ -8,15 +8,18 @@ namespace INMOST { ...@@ -8,15 +8,18 @@ namespace INMOST {
SolverInterface *SolverANI::Copy(const SolverInterface *other) { SolverInterface *SolverANI::Copy(const SolverInterface *other) {
throw INMOST::SolverUnsupportedOperation; //later throw INMOST::SolverUnsupportedOperation; //later
(void) other;
}; };
void SolverANI::Assign(const SolverInterface *other) { void SolverANI::Assign(const SolverInterface *other) {
throw INMOST::SolverUnsupportedOperation; //later throw INMOST::SolverUnsupportedOperation; //later
(void) other;
} }
void SolverANI::Setup(int *argc, char ***argv, SolverParameters &p) { void SolverANI::Setup(int *argc, char ***argv, SolverParameters &p) {
solver.n = 0; solver.n = 0;
m.n = 0; m.n = 0;
(void) argc; (void) argv; (void) p;
} }
void SolverANI::SetMatrix(Sparse::Matrix &A, bool ModifiedPattern, bool OldPreconditioner) { void SolverANI::SetMatrix(Sparse::Matrix &A, bool ModifiedPattern, bool OldPreconditioner) {
......
...@@ -13,11 +13,13 @@ namespace INMOST { ...@@ -13,11 +13,13 @@ namespace INMOST {
SolverInterface *SolverInner::Copy(const SolverInterface *other) { SolverInterface *SolverInner::Copy(const SolverInterface *other) {
//You should not really want to copy solver's information //You should not really want to copy solver's information
throw INMOST::SolverUnsupportedOperation; throw INMOST::SolverUnsupportedOperation;
(void) other;
} }
void SolverInner::Assign(const SolverInterface *other) { void SolverInner::Assign(const SolverInterface *other) {
//You should not really want to copy solver's information //You should not really want to copy solver's information
throw INMOST::SolverUnsupportedOperation; throw INMOST::SolverUnsupportedOperation;
(void) other;
} }
void SolverInner::Setup(int *argc, char ***argv, SolverParameters &p) void SolverInner::Setup(int *argc, char ***argv, SolverParameters &p)
...@@ -42,7 +44,7 @@ namespace INMOST { ...@@ -42,7 +44,7 @@ namespace INMOST {
for (parameters_iterator_t parameter = p.parameters.begin(); parameter < p.parameters.end(); parameter++) for (parameters_iterator_t parameter = p.parameters.begin(); parameter < p.parameters.end(); parameter++)
this->SetParameter((*parameter).first, (*parameter).second); this->SetParameter((*parameter).first, (*parameter).second);
} }
(void) argc; (void) argv;
} }
bool SolverInner::Solve(Sparse::Vector &RHS, Sparse::Vector &SOL) { bool SolverInner::Solve(Sparse::Vector &RHS, Sparse::Vector &SOL) {
...@@ -300,4 +302,4 @@ namespace INMOST { ...@@ -300,4 +302,4 @@ namespace INMOST {
this->Clear(); this->Clear();
} }
} }
\ No newline at end of file
...@@ -20,6 +20,7 @@ namespace INMOST { ...@@ -20,6 +20,7 @@ namespace INMOST {
SolverDDPQILUC2::SolverDDPQILUC2(const SolverInterface *other) { SolverDDPQILUC2::SolverDDPQILUC2(const SolverInterface *other) {
//You should not really want to copy solver's information //You should not really want to copy solver's information
throw INMOST::SolverUnsupportedOperation; throw INMOST::SolverUnsupportedOperation;
(void) other;
} }
void SolverDDPQILUC2::SetMatrix(Sparse::Matrix &A, bool ModifiedPattern, bool OldPreconditioner) { void SolverDDPQILUC2::SetMatrix(Sparse::Matrix &A, bool ModifiedPattern, bool OldPreconditioner) {
......
...@@ -18,6 +18,7 @@ namespace INMOST { ...@@ -18,6 +18,7 @@ namespace INMOST {
SolverILU2::SolverILU2(const SolverInterface *other) { SolverILU2::SolverILU2(const SolverInterface *other) {
//You should not really want to copy solver's information //You should not really want to copy solver's information
throw INMOST::SolverUnsupportedOperation; throw INMOST::SolverUnsupportedOperation;
(void) other;
} }
void SolverILU2::SetMatrix(Sparse::Matrix &A, bool ModifiedPattern, bool OldPreconditioner) { void SolverILU2::SetMatrix(Sparse::Matrix &A, bool ModifiedPattern, bool OldPreconditioner) {
...@@ -62,4 +63,4 @@ namespace INMOST { ...@@ -62,4 +63,4 @@ namespace INMOST {
} }
} }
\ No newline at end of file
...@@ -19,6 +19,7 @@ namespace INMOST { ...@@ -19,6 +19,7 @@ namespace INMOST {
SolverMPTILU2::SolverMPTILU2(const SolverInterface *other) { SolverMPTILU2::SolverMPTILU2(const SolverInterface *other) {
//You should not really want to copy solver's information //You should not really want to copy solver's information
throw INMOST::SolverUnsupportedOperation; throw INMOST::SolverUnsupportedOperation;
(void) other;
} }
void SolverMPTILU2::SetMatrix(Sparse::Matrix &A, bool ModifiedPattern, bool OldPreconditioner) { void SolverMPTILU2::SetMatrix(Sparse::Matrix &A, bool ModifiedPattern, bool OldPreconditioner) {
......
...@@ -20,6 +20,7 @@ namespace INMOST { ...@@ -20,6 +20,7 @@ namespace INMOST {
SolverMPTILUC::SolverMPTILUC(const SolverInterface *other) { SolverMPTILUC::SolverMPTILUC(const SolverInterface *other) {
//You should not really want to copy solver's information //You should not really want to copy solver's information
throw INMOST::SolverUnsupportedOperation; throw INMOST::SolverUnsupportedOperation;
(void) other;
} }
void SolverMPTILUC::SetMatrix(Sparse::Matrix &A, bool ModifiedPattern, bool OldPreconditioner) { void SolverMPTILUC::SetMatrix(Sparse::Matrix &A, bool ModifiedPattern, bool OldPreconditioner) {
......
...@@ -597,6 +597,7 @@ public: ...@@ -597,6 +597,7 @@ public:
interval<INMOST_DATA_ENUM_TYPE, INMOST_DATA_REAL_TYPE> LineValuesU(mobeg, moend,0.0), LineValuesL(mobeg,moend,0.0); interval<INMOST_DATA_ENUM_TYPE, INMOST_DATA_REAL_TYPE> LineValuesU(mobeg, moend,0.0), LineValuesL(mobeg,moend,0.0);
interval<INMOST_DATA_ENUM_TYPE, INMOST_DATA_ENUM_TYPE> LineIndecesU(mobeg, moend+1,UNDEF), LineIndecesL(mobeg,moend+1,UNDEF); interval<INMOST_DATA_ENUM_TYPE, INMOST_DATA_ENUM_TYPE> LineIndecesU(mobeg, moend+1,UNDEF), LineIndecesL(mobeg,moend+1,UNDEF);
double tfactor = 0.0, tswap = 0.0, trescale = 0.0, treorder = 0.0, ttransversal = 0.0, treassamble = 0.0, ttotal, tt, testimator = 0.0, tlocal; double tfactor = 0.0, tswap = 0.0, trescale = 0.0, treorder = 0.0, ttransversal = 0.0, treassamble = 0.0, ttotal, tt, testimator = 0.0, tlocal;
(void) tswap; //can be unused for some defines
#if defined(REORDER_METIS_ND) #if defined(REORDER_METIS_ND)
double tmetisgraph = 0, tmetisnd = 0; double tmetisgraph = 0, tmetisnd = 0;
#endif #endif
...@@ -1371,7 +1372,7 @@ public: ...@@ -1371,7 +1372,7 @@ public:
trcmorder = Timer(); trcmorder = Timer();
std::fill(Ulist.begin() + wbeg - mobeg, Ulist.begin() + wend - mobeg, ENUMUNDEF); std::fill(Ulist.begin() + wbeg - mobeg, Ulist.begin() + wend - mobeg, ENUMUNDEF);
//find node with the lowest order //find node with the lowest order
INMOST_DATA_ENUM_TYPE start = wbeg; //INMOST_DATA_ENUM_TYPE start = wbeg;
INMOST_DATA_ENUM_TYPE index = wbeg; INMOST_DATA_ENUM_TYPE index = wbeg;
INMOST_DATA_ENUM_TYPE cur = ENUMUNDEF; INMOST_DATA_ENUM_TYPE cur = ENUMUNDEF;
std::deque<INMOST_DATA_ENUM_TYPE> q; std::deque<INMOST_DATA_ENUM_TYPE> q;
......
...@@ -63,6 +63,7 @@ void MatrixInitDataPetsc(Mat **matrix, INMOST_MPI_Comm comm, const char *name) ...@@ -63,6 +63,7 @@ void MatrixInitDataPetsc(Mat **matrix, INMOST_MPI_Comm comm, const char *name)
*matrix = new Mat(); *matrix = new Mat();
#if !defined(USE_MPI) #if !defined(USE_MPI)
ierr = MatCreate(PETSC_COMM_WORLD, *matrix); ierr = MatCreate(PETSC_COMM_WORLD, *matrix);
(void) comm;
#else #else
ierr = MatCreate(comm, *matrix); ierr = MatCreate(comm, *matrix);
#endif #endif
...@@ -137,6 +138,7 @@ void VectorInitDataPetsc(Vec **vector, INMOST_MPI_Comm comm, const char *name) ...@@ -137,6 +138,7 @@ void VectorInitDataPetsc(Vec **vector, INMOST_MPI_Comm comm, const char *name)
*vector = new Vec(); *vector = new Vec();
#if !defined(USE_MPI) #if !defined(USE_MPI)
ierr = VecCreate(PETSC_COMM_WORLD, *vector); ierr = VecCreate(PETSC_COMM_WORLD, *vector);
(void) comm;
#else #else
ierr = VecCreate(comm, *vector); ierr = VecCreate(comm, *vector);
#endif #endif
...@@ -214,6 +216,7 @@ void SolverInitDataPetsc(KSP **ksp, INMOST_MPI_Comm comm, const char *name) ...@@ -214,6 +216,7 @@ void SolverInitDataPetsc(KSP **ksp, INMOST_MPI_Comm comm, const char *name)
*ksp = new KSP(); *ksp = new KSP();
#if !defined(USE_MPI) #if !defined(USE_MPI)
ierr = KSPCreate(PETSC_COMM_WORLD, *ksp); ierr = KSPCreate(PETSC_COMM_WORLD, *ksp);
(void) comm;
#else #else
ierr = KSPCreate(comm, *ksp); ierr = KSPCreate(comm, *ksp);
#endif #endif
...@@ -233,6 +236,7 @@ void SolverCopyDataPetsc(KSP **ksp, KSP *other_ksp, INMOST_MPI_Comm comm) ...@@ -233,6 +236,7 @@ void SolverCopyDataPetsc(KSP **ksp, KSP *other_ksp, INMOST_MPI_Comm comm)
*ksp = new KSP(); *ksp = new KSP();
#if !defined(USE_MPI) #if !defined(USE_MPI)
ierr = KSPCreate(PETSC_COMM_WORLD, *ksp); ierr = KSPCreate(PETSC_COMM_WORLD, *ksp);
(void) comm;
#else #else
ierr = KSPCreate(comm, *ksp); ierr = KSPCreate(comm, *ksp);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment