Commit c702e997 authored by Kirill Terekhov's avatar Kirill Terekhov
Browse files

Native mesh file format fix

Fixed incorrect writing of sets data.
Returned ||Ax-b|| norm to solver.
parent 099bb160
...@@ -903,7 +903,12 @@ namespace INMOST ...@@ -903,7 +903,12 @@ namespace INMOST
class ElementSet : public Element //implemented in eset.cpp class ElementSet : public Element //implemented in eset.cpp
{ {
public: public:
static const enumerator high_conn_reserved = 4; //number of reserved positions in HighConn array static const enumerator high_conn_reserved = 4; ///< number of reserved positions in HighConn array
///< first position is handle to parent set
///< second position is handle to sibling set
///< third position is handle to child set
///< fourth position is number of sorted elements in the set
///< all the rest are positions of deleted elements
typedef INMOST_DATA_BULK_TYPE ComparatorType; typedef INMOST_DATA_BULK_TYPE ComparatorType;
static const ComparatorType UNSORTED_COMPARATOR = 0; static const ComparatorType UNSORTED_COMPARATOR = 0;
static const ComparatorType GLOBALID_COMPARATOR = 1; static const ComparatorType GLOBALID_COMPARATOR = 1;
......
...@@ -4439,7 +4439,8 @@ safe_output: ...@@ -4439,7 +4439,8 @@ safe_output:
{ {
wetype = GetHandleElementType(*kt); wetype = GetHandleElementType(*kt);
out.put(wetype); out.put(wetype);
lid = IntegerDF(*kt,set_id); assert(wetype != NONE);
lid = IntegerDF(*kt,set_id);
uconv.write_iValue(out,lid); uconv.write_iValue(out,lid);
} }
else out.put(NONE); else out.put(NONE);
...@@ -4453,6 +4454,7 @@ safe_output: ...@@ -4453,6 +4454,7 @@ safe_output:
{ {
wetype = GetHandleElementType(*kt); wetype = GetHandleElementType(*kt);
out.put(wetype); out.put(wetype);
assert(wetype != NONE);
lid = IntegerDF(*kt,set_id); lid = IntegerDF(*kt,set_id);
uconv.write_iValue(out,lid); uconv.write_iValue(out,lid);
} }
...@@ -4461,14 +4463,7 @@ safe_output: ...@@ -4461,14 +4463,7 @@ safe_output:
//write additional information //write additional information
for(Element::adj_type::iterator kt = hc.begin()+ElementSet::high_conn_reserved-1; kt != hc.end(); ++kt) for(Element::adj_type::iterator kt = hc.begin()+ElementSet::high_conn_reserved-1; kt != hc.end(); ++kt)
{ {
if( *kt != InvalidHandle() ) uconv.write_iValue(out,*kt);
{
wetype = GetHandleElementType(*kt);
out.put(wetype);
lid = IntegerDF(*kt,set_id);
uconv.write_iValue(out,lid);
}
else out.put(NONE);
} }
} }
......
...@@ -166,8 +166,8 @@ namespace INMOST ...@@ -166,8 +166,8 @@ namespace INMOST
info->GetLocalRegion(info->GetRank(),vlocbeg,vlocend); info->GetLocalRegion(info->GetRank(),vlocbeg,vlocend);
info->GetVectorRegion(vbeg,vend); info->GetVectorRegion(vbeg,vend);
rhs_norm = info->ScalarProd(RHS,RHS,vlocbeg,vlocend); //rhs_norm = info->ScalarProd(RHS,RHS,vlocbeg,vlocend);
//rhs_norm = 1; rhs_norm = 1;
//r[0] = b //r[0] = b
std::copy(RHS.Begin(),RHS.End(),r[0].Begin()); std::copy(RHS.Begin(),RHS.End(),r[0].Begin());
{ {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include "inmost_solver.h" #include "inmost_solver.h"
#include "solver_prototypes.hpp" #include "solver_prototypes.hpp"
#define REPORT_ILU //#define REPORT_ILU
//#undef REPORT_ILU //#undef REPORT_ILU
//#define REPORT_ILU_PROGRESS //#define REPORT_ILU_PROGRESS
//#undef REPORT_ILU_PROGRESS //#undef REPORT_ILU_PROGRESS
......
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