Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
INMOST
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Terekhov
INMOST
Commits
02186958
Commit
02186958
authored
Dec 13, 2017
by
Kirill Terekhov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/INMOST-DEV/INMOST
parents
d51a665d
846dd063
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
CMakeLists.txt
CMakeLists.txt
+1
-1
Source/Headers/container.hpp
Source/Headers/container.hpp
+8
-0
Source/Solver/solver_petsc/solver_petsc.cpp
Source/Solver/solver_petsc/solver_petsc.cpp
+2
-2
No files found.
CMakeLists.txt
View file @
02186958
...
...
@@ -39,7 +39,7 @@ option(USE_SOLVER_SUPERLU "Use SuperLU solver" OFF)
if
(
MSVC
)
option
(
USE_MT
"Use /MT switch instead of /MD switch for libraries generated with Visual Studio"
OFF
)
set
(
CMAKE_CXX_FLAGS
${
CMAKE_CXX_FLAGS
}
"
/EHsc"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/EHsc"
)
endif
(
MSVC
)
add_subdirectory
(
Source
)
...
...
Source/Headers/container.hpp
View file @
02186958
...
...
@@ -88,6 +88,7 @@ namespace INMOST
_iterator
operator
--
(
int
){
return
_iterator
(
e
--
);
}
ptrdiff_t
operator
-
(
const
_iterator
&
other
)
const
{
return
e
-
other
.
e
;}
etype
&
operator
*
()
{
return
*
e
;
}
const
etype
&
operator
*
()
const
{
return
*
e
;
}
etype
*
operator
->
()
{
return
e
;
}
_iterator
&
operator
=
(
_iterator
const
&
other
)
{
e
=
other
.
e
;
return
*
this
;
}
bool
operator
==
(
const
_iterator
&
other
)
const
{
return
e
==
other
.
e
;}
...
...
@@ -126,6 +127,7 @@ namespace INMOST
_reverse_iterator
operator
--
(
int
){
return
_reverse_iterator
(
e
++
);
}
ptrdiff_t
operator
-
(
const
_reverse_iterator
&
other
)
const
{
return
other
.
e
-
e
;}
etype
&
operator
*
()
{
return
*
e
;
}
const
etype
&
operator
*
()
const
{
return
*
e
;
}
etype
*
operator
->
()
{
return
e
;
}
_reverse_iterator
&
operator
=
(
_reverse_iterator
const
&
other
)
{
e
=
other
.
e
;
return
*
this
;}
bool
operator
==
(
const
_reverse_iterator
&
other
)
const
{
return
e
==
other
.
e
;}
...
...
@@ -593,6 +595,7 @@ namespace INMOST
_reverse_iterator
operator
--
(
int
){
return
_reverse_iterator
(
e
++
);
}
ptrdiff_t
operator
-
(
const
_reverse_iterator
&
other
)
const
{
return
other
.
e
-
e
;}
dtype
&
operator
*
()
{
return
*
e
;
}
const
dtype
&
operator
*
()
const
{
return
*
e
;
}
dtype
*
operator
->
()
{
return
e
;
}
_reverse_iterator
&
operator
=
(
_reverse_iterator
const
&
other
)
{
e
=
other
.
e
;
return
*
this
;}
bool
operator
==
(
const
_reverse_iterator
&
other
)
{
return
e
==
other
.
e
;}
...
...
@@ -1574,6 +1577,7 @@ namespace INMOST
_iterator
operator
--
(
int
){
return
_iterator
(
e
--
);
}
size_type
operator
-
(
const
_iterator
&
other
)
const
{
return
static_cast
<
size_type
>
(
e
-
other
.
e
);}
dtype
&
operator
*
()
{
return
*
e
;
}
const
dtype
&
operator
*
()
const
{
return
*
e
;
}
dtype
*
operator
->
()
{
return
e
;
}
_iterator
&
operator
=
(
_iterator
const
&
other
)
{
e
=
other
.
e
;
return
*
this
;
}
bool
operator
==
(
const
_iterator
&
other
)
const
{
return
e
==
other
.
e
;}
...
...
@@ -1612,6 +1616,7 @@ namespace INMOST
_reverse_iterator
operator
--
(
int
){
return
_reverse_iterator
(
e
++
);
}
size_type
operator
-
(
const
_reverse_iterator
&
other
)
const
{
return
static_cast
<
size_type
>
(
other
.
e
-
e
);}
dtype
&
operator
*
()
{
return
*
e
;
}
const
dtype
&
operator
*
()
const
{
return
*
e
;
}
dtype
*
operator
->
()
{
return
e
;
}
_reverse_iterator
&
operator
=
(
_reverse_iterator
const
&
other
)
{
e
=
other
.
e
;
return
*
this
;}
bool
operator
==
(
const
_reverse_iterator
&
other
)
const
{
return
e
==
other
.
e
;}
...
...
@@ -2054,6 +2059,7 @@ namespace INMOST
}
_iterator
operator
--
(
int
){
_iterator
ret
=
*
this
;
--
(
*
this
);
return
ret
;
}
dtype
&
operator
*
()
{
return
*
it
;
}
const
dtype
&
operator
*
()
const
{
return
*
it
;
}
dtype
*
operator
->
()
{
return
&*
it
;
}
_iterator
&
operator
=
(
_iterator
const
&
other
)
{
it
=
other
.
it
;
cur_list
=
other
.
cur_list
;
lists
=
other
.
lists
;
return
*
this
;
}
bool
operator
==
(
const
_iterator
&
other
)
const
{
return
it
==
other
.
it
;}
...
...
@@ -2095,6 +2101,7 @@ namespace INMOST
_reverse_iterator & operator --(){ --it; if(it == (*lists)[cur_list]->rbegin()-1 ) {++cur_list; if( cur_list < HSize ) it = (*lists)[cur_list]->rend()-1; else it = NULL;} return *this; }
_reverse_iterator operator --(int){ _iterator ret = *this; --(*this); return ret; }
dtype & operator *() { return *it; }
const dtype & operator *() const { return *it; }
dtype * operator ->() { return &*it; }
_reverse_iterator & operator =(_reverse_iterator const & other) {it = other.it; return *this;}
bool operator ==(const _reverse_iterator & other) { return it == other.it;}
...
...
@@ -2329,6 +2336,7 @@ namespace INMOST
iterator
operator
--
(
int
){
return
iterator
(
link
,
pos
--
);
}
ptrdiff_t
operator
-
(
const
iterator
&
other
)
const
{
return
pos
-
other
.
pos
;}
element
&
operator
*
()
{
return
link
->
at
(
pos
);
}
const
element
&
operator
*
()
const
{
return
link
->
at
(
pos
);
}
element
*
operator
->
()
{
return
&
link
->
at
(
pos
);
}
iterator
&
operator
=
(
iterator
const
&
other
)
{
link
=
other
.
link
;
pos
=
other
.
pos
;
return
*
this
;
}
bool
operator
==
(
const
iterator
&
other
)
const
{
assert
(
link
==
other
.
link
);
return
pos
==
other
.
pos
;}
...
...
Source/Solver/solver_petsc/solver_petsc.cpp
View file @
02186958
...
...
@@ -282,10 +282,10 @@ bool SolverSolvePetsc(KSP *ksp, Vec *rhs, Vec *sol)
ierr
=
KSPGetOptionsPrefix
(
*
ksp
,
const_cast
<
const
char
**>
(
&
prefix
));
if
(
ierr
!=
PETSC_SUCCESS
)
throw
INMOST
::
ErrorInSolver
;
//due to https://www.mcs.anl.gov/petsc/documentation/changes/37.html
#if PETSC_VERSION_MAJOR >
=
3 || (PETSC_VERSION_MAJOR == 3 && PETSC_VERSION_MINOR >= 7)
#if PETSC_VERSION_MAJOR > 3 || (PETSC_VERSION_MAJOR == 3 && PETSC_VERSION_MINOR >= 7)
ierr
=
PetscOptionsGetString
(
NULL
,
prefix
,
"-ksp_type"
,
typeksp
,
2048
,
&
haveksp
);
#else //PETSC_VERSION
ierr
=
PetscOptionsGetString
(
prefix
,
"-ksp_type"
,
typeksp
,
2048
,
&
haveksp
);
ierr
=
PetscOptionsGetString
(
prefix
,
"-ksp_type"
,
typeksp
,
2048
,
&
haveksp
);
#endif //PETSC_VERSION
if
(
ierr
!=
PETSC_SUCCESS
)
throw
INMOST
::
ErrorInSolver
;
if
(
haveksp
&&
!
strcmp
(
typeksp
,
"preonly"
))
guess
=
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment