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
3df5bfb4
Commit
3df5bfb4
authored
Apr 16, 2018
by
Kirill Terekhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updates
parent
ac5f9eb4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
13 deletions
+25
-13
Source/Autodiff/model.cpp
Source/Autodiff/model.cpp
+7
-0
Source/Headers/inmost_model.h
Source/Headers/inmost_model.h
+5
-0
Source/Solver/solver_inner/solver_mlmptiluc/solver_mlmtiluc2.cpp
...Solver/solver_inner/solver_mlmptiluc/solver_mlmtiluc2.cpp
+8
-8
Source/Solver/solver_inner/solver_mptiluc/solver_mtiluc2.cpp
Source/Solver/solver_inner/solver_mptiluc/solver_mtiluc2.cpp
+5
-5
No files found.
Source/Autodiff/model.cpp
View file @
3df5bfb4
...
...
@@ -11,6 +11,13 @@ namespace INMOST
Entries
.
push_back
(
std
::
make_pair
(
name
,
&
entry
));
}
void
Model
::
AddFirstEntry
(
std
::
string
name
,
AbstractEntry
&
entry
)
{
assert
(
!
isInitialized
()
);
// do not add new data after initialization
assert
(
GetEntry
(
name
)
==
NULL
);
// do not overwrite entry with the same name
Entries
.
insert
(
Entries
.
begin
(),
std
::
make_pair
(
name
,
&
entry
));
}
void
Model
::
AddMesh
(
std
::
string
name
,
Mesh
&
m
)
{
assert
(
!
isInitialized
()
);
// do not add new data after initialization
...
...
Source/Headers/inmost_model.h
View file @
3df5bfb4
...
...
@@ -65,6 +65,11 @@ namespace INMOST
/// The intries should be added from Model::Initialize function,
/// either by model or by any of the submodels.
void
AddEntry
(
std
::
string
name
,
AbstractEntry
&
entry
);
/// Add an entry of block unknowns to a model as a first entry.
/// The model stores a link to the entry and may modify it contents.
/// The intries should be added from Model::Initialize function,
/// either by model or by any of the submodels.
void
AddFirstEntry
(
std
::
string
name
,
AbstractEntry
&
entry
);
/// Add a mesh to a model.
/// The model stores a link to the provided mesh, so it should not
/// be deallocated. The meshes are provided by the user from outside
...
...
Source/Solver/solver_inner/solver_mlmptiluc/solver_mlmtiluc2.cpp
View file @
3df5bfb4
...
...
@@ -5,11 +5,11 @@
#include <sstream>
#include <deque>
#include <iomanip>
#define REPORT_ILU
//
#define REPORT_ILU
//#undef REPORT_ILU
//#define REPORT_ILU_PROGRESS
#define REPORT_ILU_END
#define REPORT_ILU_SUMMARY
//
#define REPORT_ILU_END
//
#define REPORT_ILU_SUMMARY
//#undef REPORT_ILU_PROGRESS
#include "../../../Misc/utils.h"
//#define USE_OMP
...
...
@@ -42,8 +42,8 @@ static bool allow_pivot = true;
//#define PREMATURE_DROPPING
//#define EQUALIZE_1NORM
//
#define EQUALIZE_2NORM
#define EQUALIZE_IDOMINANCE
#define EQUALIZE_2NORM
//
#define EQUALIZE_IDOMINANCE
#define PIVOT_THRESHOLD
#define PIVOT_THRESHOLD_VALUE 1.0e-12
...
...
@@ -722,7 +722,7 @@ static bool allow_pivot = true;
for
(
INMOST_DATA_ENUM_TYPE
it
=
A_Address
[
k
].
first
;
it
<
A_Address
[
k
].
last
;
++
it
)
{
u
=
fabs
(
C_Entries
[
it
]
-
V
[
k
]
-
U
[
A_Entries
[
it
].
first
]);
if
(
u
<
1.0e-
8
&&
Perm
[
A_Entries
[
it
].
first
]
==
ENUMUNDEF
&&
IPerm
[
k
]
==
ENUMUNDEF
)
if
(
u
<
1.0e-
30
&&
Perm
[
A_Entries
[
it
].
first
]
==
ENUMUNDEF
&&
IPerm
[
k
]
==
ENUMUNDEF
)
{
Perm
[
A_Entries
[
it
].
first
]
=
k
;
IPerm
[
k
]
=
A_Entries
[
it
].
first
;
...
...
@@ -742,7 +742,7 @@ static bool allow_pivot = true;
for
(
INMOST_DATA_ENUM_TYPE
it
=
A_Address
[
k
].
first
;
it
<
A_Address
[
k
].
last
&&
IPerm
[
k
]
==
ENUMUNDEF
;
++
it
)
{
u
=
fabs
(
C_Entries
[
it
]
-
V
[
k
]
-
U
[
A_Entries
[
it
].
first
]);
if
(
u
<=
1.0e-
8
)
if
(
u
<=
1.0e-
30
)
{
Li
=
Perm
[
A_Entries
[
it
].
first
];
assert
(
Li
!=
ENUMUNDEF
);
...
...
@@ -750,7 +750,7 @@ static bool allow_pivot = true;
for
(
INMOST_DATA_ENUM_TYPE
Lit
=
A_Address
[
Li
].
first
;
Lit
<
A_Address
[
Li
].
last
;
++
Lit
)
{
u
=
fabs
(
C_Entries
[
Lit
]
-
V
[
Li
]
-
U
[
A_Entries
[
Lit
].
first
]);
if
(
u
<=
1.0e-
8
&&
Perm
[
A_Entries
[
Lit
].
first
]
==
ENUMUNDEF
)
if
(
u
<=
1.0e-
30
&&
Perm
[
A_Entries
[
Lit
].
first
]
==
ENUMUNDEF
)
{
Perm
[
A_Entries
[
it
].
first
]
=
k
;
IPerm
[
k
]
=
A_Entries
[
it
].
first
;
...
...
Source/Solver/solver_inner/solver_mptiluc/solver_mtiluc2.cpp
View file @
3df5bfb4
...
...
@@ -7,11 +7,11 @@
#include <deque>
#include <iomanip>
#include "../../../Misc/utils.h"
#define REPORT_ILU
//
#define REPORT_ILU
//#undef REPORT_ILU
//#define REPORT_ILU_PROGRESS
#define REPORT_ILU_END
#define REPORT_ILU_SUMMARY
//
#define REPORT_ILU_END
//
#define REPORT_ILU_SUMMARY
//#undef REPORT_ILU_PROGRESS
//#define USE_OMP
...
...
@@ -2772,7 +2772,7 @@ swap_algorithm:
if
(
u
*
NuU
/*NuL_old*/
>
tau
)
// apply dropping rule
LU_Entries
.
push_back
(
Sparse
::
Row
::
make_entry
(
Ui
,
LineValuesU
[
Ui
]));
#if defined(ILUC2)
else
if
(
u
*
NuU
*
NuD
/*NuL_old*/
>
tau2
)
else
if
(
u
*
NuU
/*NuL_old*/
>
tau2
)
LU2_Entries
.
push_back
(
Sparse
::
Row
::
make_entry
(
Ui
,
LineValuesU
[
Ui
]));
#endif
Ui
=
LineIndecesU
[
Ui
];
...
...
@@ -2797,7 +2797,7 @@ swap_algorithm:
if
(
u
*
NuL
/*NuU_old*/
>
tau
)
//apply dropping
LU_Entries
.
push_back
(
Sparse
::
Row
::
make_entry
(
Li
,
LineValuesL
[
Li
]));
#if defined(ILUC2)
else
if
(
u
*
NuL
*
NuD
/*NuU_old*/
>
tau2
)
else
if
(
u
*
NuL
/*NuU_old*/
>
tau2
)
LU2_Entries
.
push_back
(
Sparse
::
Row
::
make_entry
(
Li
,
LineValuesL
[
Li
]));
#endif
Li
=
LineIndecesL
[
Li
];
...
...
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