Commit 9325de74 authored by Kirill Terekhov's avatar Kirill Terekhov

replace dynarray with std::vector

parent 870446ec
...@@ -78,11 +78,11 @@ bool find_stencils(Cell cK, ...@@ -78,11 +78,11 @@ bool find_stencils(Cell cK,
//store all the precomputed interpolation directions //store all the precomputed interpolation directions
dynarray<real,128> dirs; //all directions std::vector<real> dirs; //all directions
dynarray<real,128> bndrhs; //right hand sides coming out of boundary conditions std::vector<real> bndrhs; //right hand sides coming out of boundary conditions
dynarray<real,128> bndmlt; //multiplier for original cell std::vector<real> bndmlt; //multiplier for original cell
dynarray<integer,128> weights; //layer number std::vector<integer> weights; //layer number
dynarray<HandleType,128> handles; //elements corresponding to each direction std::vector<HandleType> handles; //elements corresponding to each direction
//variables used for interpolation calculation //variables used for interpolation calculation
rMatrix xK(1,3), //current cell position rMatrix xK(1,3), //current cell position
......
...@@ -474,7 +474,7 @@ namespace INMOST ...@@ -474,7 +474,7 @@ namespace INMOST
cells[k]->RemMarker(marker); cells[k]->RemMarker(marker);
} }
tree->intersect_plane_edge(clip_point, clip_state, cells, marker, p, n); tree->intersect_plane_edge(clip_point, clip_state, cells, marker, p, n);
dynarray<edge_point, 128> clipcoords, loopcoords; std::vector<edge_point> clipcoords, loopcoords;
std::vector<bool> closed; std::vector<bool> closed;
for (INMOST_DATA_ENUM_TYPE k = 0; k < cells.size(); ++k) for (INMOST_DATA_ENUM_TYPE k = 0; k < cells.size(); ++k)
{ {
...@@ -970,8 +970,8 @@ namespace INMOST ...@@ -970,8 +970,8 @@ namespace INMOST
face2gl f; face2gl f;
f.set_color(0.6, 0.6, 0.6, 1); f.set_color(0.6, 0.6, 0.6, 1);
ElementArray<Node> nodes = Element(mm, faces[k])->getNodes(); ElementArray<Node> nodes = Element(mm, faces[k])->getNodes();
dynarray<bool, 64> nodepos(nodes.size()); std::vector<bool> nodepos(nodes.size());
dynarray<Storage::real, 64> faceverts; std::vector<Storage::real> faceverts;
Storage::real_array coords = nodes[0].Coords(); Storage::real_array coords = nodes[0].Coords();
for (INMOST_DATA_ENUM_TYPE q = 0; q < nodes.size(); q++) for (INMOST_DATA_ENUM_TYPE q = 0; q < nodes.size(); q++)
{ {
......
This diff is collapsed.
...@@ -42,7 +42,7 @@ typedef std::vector<HandleType> cell_vector; ...@@ -42,7 +42,7 @@ typedef std::vector<HandleType> cell_vector;
typedef std::map<Tag, Storage::real > data_by_mat; typedef std::map<Tag, Storage::real > data_by_mat;
typedef std::pair< Storage::real, std::map<Tag, Storage::real> > vol_and_data_by_mat; typedef std::pair< Storage::real, std::map<Tag, Storage::real> > vol_and_data_by_mat;
typedef std::map<Storage::integer, vol_and_data_by_mat > data_storage; typedef std::map<Storage::integer, vol_and_data_by_mat > data_storage;
typedef dynarray<Storage::integer, 32> mat_ret_type; typedef std::vector<Storage::integer> mat_ret_type;
struct cell struct cell
{ {
......
This diff is collapsed.
...@@ -274,7 +274,7 @@ namespace INMOST ...@@ -274,7 +274,7 @@ namespace INMOST
} }
else return false; else return false;
} //m <= n } //m <= n
dynarray<Var,128> rv1(m); std::vector<Var> rv1(m);
//array<Var> _rv1(m); //array<Var> _rv1(m);
//shell<Var> rv1(_rv1); //shell<Var> rv1(_rv1);
std::swap(n,m); //this how original algorithm takes it std::swap(n,m); //this how original algorithm takes it
...@@ -3218,7 +3218,7 @@ namespace INMOST ...@@ -3218,7 +3218,7 @@ namespace INMOST
//enumerator l = AtB.Cols(); //enumerator l = AtB.Cols();
//enumerator n = Rows(); //enumerator n = Rows();
dynarray<enumerator,128> order(m); std::vector<enumerator> order(m);
Var temp; Var temp;
INMOST_DATA_REAL_TYPE max,v; INMOST_DATA_REAL_TYPE max,v;
...@@ -3848,9 +3848,9 @@ namespace INMOST ...@@ -3848,9 +3848,9 @@ namespace INMOST
/// shortcut for matrix of real values. /// shortcut for matrix of real values.
typedef Matrix<INMOST_DATA_REAL_TYPE> rMatrix; typedef Matrix<INMOST_DATA_REAL_TYPE> rMatrix;
/// shortcut for matrix of integer values in stack-preallocated and dynamically reallocated array. /// shortcut for matrix of integer values in stack-preallocated and dynamically reallocated array.
typedef Matrix<INMOST_DATA_INTEGER_TYPE,dynarray<INMOST_DATA_INTEGER_TYPE,128> > idMatrix; //typedef Matrix<INMOST_DATA_INTEGER_TYPE,dynarray<INMOST_DATA_INTEGER_TYPE,128> > idMatrix;
/// shortcut for matrix of real values in stack-preallocated and dynamically reallocated array. /// shortcut for matrix of real values in stack-preallocated and dynamically reallocated array.
typedef Matrix<INMOST_DATA_REAL_TYPE, dynarray<INMOST_DATA_REAL_TYPE,128> > rdMatrix; //typedef Matrix<INMOST_DATA_REAL_TYPE, dynarray<INMOST_DATA_REAL_TYPE,128> > rdMatrix;
/// shortcut for matrix of integer values in pool-allocated array (beaware of deallocation order issue). /// shortcut for matrix of integer values in pool-allocated array (beaware of deallocation order issue).
typedef Matrix<INMOST_DATA_INTEGER_TYPE,pool_array_t<INMOST_DATA_INTEGER_TYPE> > ipMatrix; typedef Matrix<INMOST_DATA_INTEGER_TYPE,pool_array_t<INMOST_DATA_INTEGER_TYPE> > ipMatrix;
/// shortcut for matrix of real values in pool-allocated array (beaware of deallocation order issue). /// shortcut for matrix of real values in pool-allocated array (beaware of deallocation order issue).
...@@ -3864,9 +3864,9 @@ namespace INMOST ...@@ -3864,9 +3864,9 @@ namespace INMOST
/// shortcut for symmetric matrix of real values. /// shortcut for symmetric matrix of real values.
typedef SymmetricMatrix<INMOST_DATA_REAL_TYPE> rSymmetricMatrix; typedef SymmetricMatrix<INMOST_DATA_REAL_TYPE> rSymmetricMatrix;
/// shortcut for symmetric matrix of integer values in stack-preallocated and dynamically reallocated array. /// shortcut for symmetric matrix of integer values in stack-preallocated and dynamically reallocated array.
typedef SymmetricMatrix<INMOST_DATA_INTEGER_TYPE,dynarray<INMOST_DATA_INTEGER_TYPE,128> > idSymmetricMatrix; //typedef SymmetricMatrix<INMOST_DATA_INTEGER_TYPE,dynarray<INMOST_DATA_INTEGER_TYPE,128> > idSymmetricMatrix;
/// shortcut for symmetric matrix of real values in stack-preallocated and dynamically reallocated array. /// shortcut for symmetric matrix of real values in stack-preallocated and dynamically reallocated array.
typedef SymmetricMatrix<INMOST_DATA_REAL_TYPE,dynarray<INMOST_DATA_REAL_TYPE,128> > rdSymmetricMatrix; //typedef SymmetricMatrix<INMOST_DATA_REAL_TYPE,dynarray<INMOST_DATA_REAL_TYPE,128> > rdSymmetricMatrix;
/// shortcut for symmetric matrix of integer values in pool-allocated array (beaware of deallocation order issue). /// shortcut for symmetric matrix of integer values in pool-allocated array (beaware of deallocation order issue).
typedef SymmetricMatrix<INMOST_DATA_INTEGER_TYPE,pool_array_t<INMOST_DATA_INTEGER_TYPE> > ipSymmetricMatrix; typedef SymmetricMatrix<INMOST_DATA_INTEGER_TYPE,pool_array_t<INMOST_DATA_INTEGER_TYPE> > ipSymmetricMatrix;
/// shortcut for symmetric matrix of real values in pool-allocated array (beaware of deallocation order issue). /// shortcut for symmetric matrix of real values in pool-allocated array (beaware of deallocation order issue).
...@@ -3888,11 +3888,11 @@ namespace INMOST ...@@ -3888,11 +3888,11 @@ namespace INMOST
//< shortcut for matrix of variables with first and second order derivatives. //< shortcut for matrix of variables with first and second order derivatives.
typedef Matrix<hessian_variable> hMatrix; typedef Matrix<hessian_variable> hMatrix;
/// shortcut for matrix of variables with single unit entry of first order derivative in stack-preallocated and dynamically reallocated array. /// shortcut for matrix of variables with single unit entry of first order derivative in stack-preallocated and dynamically reallocated array.
typedef Matrix<unknown, dynarray<unknown,128> > udMatrix; //typedef Matrix<unknown, dynarray<unknown,128> > udMatrix;
/// shortcut for matrix of variables with first order derivatives in stack-preallocated and dynamically reallocated array. /// shortcut for matrix of variables with first order derivatives in stack-preallocated and dynamically reallocated array.
typedef Matrix<variable, dynarray<variable,128> > vdMatrix; //typedef Matrix<variable, dynarray<variable,128> > vdMatrix;
//< shortcut for matrix of variables with first and second order derivatives in stack-preallocated and dynamically reallocated array. //< shortcut for matrix of variables with first and second order derivatives in stack-preallocated and dynamically reallocated array.
typedef Matrix<hessian_variable, dynarray<hessian_variable,128> > hdMatrix; //typedef Matrix<hessian_variable, dynarray<hessian_variable,128> > hdMatrix;
/// shortcut for matrix of variables with single unit entry of first order derivative in pool-allocated array (beaware of deallocation order issue). /// shortcut for matrix of variables with single unit entry of first order derivative in pool-allocated array (beaware of deallocation order issue).
typedef Matrix<unknown, pool_array_t<unknown> > upMatrix; typedef Matrix<unknown, pool_array_t<unknown> > upMatrix;
/// shortcut for matrix of variables with first order derivatives in pool-allocated array (beaware of deallocation order issue). /// shortcut for matrix of variables with first order derivatives in pool-allocated array (beaware of deallocation order issue).
...@@ -3912,11 +3912,11 @@ namespace INMOST ...@@ -3912,11 +3912,11 @@ namespace INMOST
/// shortcut for matrix of variables in existing array. /// shortcut for matrix of variables in existing array.
typedef SymmetricMatrix<hessian_variable,shell<hessian_variable> > haSymmetricMatrix; typedef SymmetricMatrix<hessian_variable,shell<hessian_variable> > haSymmetricMatrix;
/// shortcut for symmetric matrix of variables with single unit entry of first order derivative in stack-preallocated and dynamically reallocated array. /// shortcut for symmetric matrix of variables with single unit entry of first order derivative in stack-preallocated and dynamically reallocated array.
typedef SymmetricMatrix<unknown, dynarray<unknown,128> > udSymmetricMatrix; //typedef SymmetricMatrix<unknown, dynarray<unknown,128> > udSymmetricMatrix;
/// shortcut for symmetric matrix of variables with first order derivatives in stack-preallocated and dynamically reallocated array. /// shortcut for symmetric matrix of variables with first order derivatives in stack-preallocated and dynamically reallocated array.
typedef SymmetricMatrix<variable, dynarray<variable,128> > vdSymmetricMatrix; //typedef SymmetricMatrix<variable, dynarray<variable,128> > vdSymmetricMatrix;
//< shortcut for symmetric matrix of variables with first and second order derivatives in stack-preallocated and dynamically reallocated array. //< shortcut for symmetric matrix of variables with first and second order derivatives in stack-preallocated and dynamically reallocated array.
typedef SymmetricMatrix<hessian_variable, dynarray<hessian_variable,128> > hdSymmetricMatrix; //typedef SymmetricMatrix<hessian_variable, dynarray<hessian_variable,128> > hdSymmetricMatrix;
/// shortcut for symmetric matrix of variables with single unit entry of first order derivative in pool-allocated array (beaware of deallocation order issue). /// shortcut for symmetric matrix of variables with single unit entry of first order derivative in pool-allocated array (beaware of deallocation order issue).
typedef SymmetricMatrix<unknown, pool_array_t<unknown> > upSymmetricMatrix; typedef SymmetricMatrix<unknown, pool_array_t<unknown> > upSymmetricMatrix;
/// shortcut for symmetric matrix of variables with first order derivatives in pool-allocated array (beaware of deallocation order issue). /// shortcut for symmetric matrix of variables with first order derivatives in pool-allocated array (beaware of deallocation order issue).
......
...@@ -138,7 +138,7 @@ namespace INMOST ...@@ -138,7 +138,7 @@ namespace INMOST
class ElementArray class ElementArray
{ {
public: public:
typedef dynarray<HandleType,64> cont_t; typedef std::vector<HandleType> cont_t;
typedef cont_t::size_type size_type; typedef cont_t::size_type size_type;
private: private:
Mesh * m_link; Mesh * m_link;
......
...@@ -391,7 +391,7 @@ namespace INMOST ...@@ -391,7 +391,7 @@ namespace INMOST
public: public:
typedef const_multiplication_expression<A> argument; typedef const_multiplication_expression<A> argument;
typedef unary_pool_expression< argument, A> pool; typedef unary_pool_expression< argument, A> pool;
typedef dynarray< argument, 64 > container; typedef std::vector< argument > container;
private: private:
container arg; container arg;
INMOST_DATA_REAL_TYPE value; INMOST_DATA_REAL_TYPE value;
...@@ -724,7 +724,7 @@ template<class A> __INLINE ...@@ -724,7 +724,7 @@ template<class A> __INLINE
template<class A> __INLINE INMOST::table_variable<A> get_table(INMOST::shell_dynamic_variable<typename A::Var,A> const & Arg, const INMOST::keyval_table & Table) {return INMOST::table_variable<A>(Arg,Table);} template<class A> __INLINE INMOST::table_variable<A> get_table(INMOST::shell_dynamic_variable<typename A::Var,A> const & Arg, const INMOST::keyval_table & Table) {return INMOST::table_variable<A>(Arg,Table);}
template<class A> __INLINE INMOST::stencil_expression<A> stencil(INMOST::HandleType * elems, INMOST_DATA_REAL_TYPE * coefs, INMOST_DATA_ENUM_TYPE num, INMOST::shell_dynamic_variable<typename A::Var,A> const & Arg) template<class A> __INLINE INMOST::stencil_expression<A> stencil(INMOST::HandleType * elems, INMOST_DATA_REAL_TYPE * coefs, INMOST_DATA_ENUM_TYPE num, INMOST::shell_dynamic_variable<typename A::Var,A> const & Arg)
{ {
INMOST::dynarray< INMOST::const_multiplication_expression<typename A::Var>, 64> tmp; std::vector< INMOST::const_multiplication_expression<typename A::Var> > tmp;
for( INMOST_DATA_ENUM_TYPE k = 0; k < num; ++k) if( elems[k] != 0 ) for( INMOST_DATA_ENUM_TYPE k = 0; k < num; ++k) if( elems[k] != 0 )
tmp.push_back(INMOST::const_multiplication_expression<typename A::Var>(Arg[elems[k]],coefs[k])); tmp.push_back(INMOST::const_multiplication_expression<typename A::Var>(Arg[elems[k]],coefs[k]));
return INMOST::stencil_expression<typename A::Var>(tmp); return INMOST::stencil_expression<typename A::Var>(tmp);
......
...@@ -318,7 +318,7 @@ namespace INMOST ...@@ -318,7 +318,7 @@ namespace INMOST
} }
} }
} }
dynarray<int, 64> nums(n_cells.size()); //store all numbers std::vector<int> nums(n_cells.size()); //store all numbers
for (size_t k = 0; k < n_cells.size(); ++k) nums[k] = n_cells[k].IntegerDF(indexes); for (size_t k = 0; k < n_cells.size(); ++k) nums[k] = n_cells[k].IntegerDF(indexes);
std::sort(nums.begin(), nums.end()); std::sort(nums.begin(), nums.end());
nums.resize(std::unique(nums.begin(), nums.end()) - nums.begin()); nums.resize(std::unique(nums.begin(), nums.end()) - nums.begin());
...@@ -1061,8 +1061,7 @@ namespace INMOST ...@@ -1061,8 +1061,7 @@ namespace INMOST
Storage::integer_array bn = n->IntegerArray(write); Storage::integer_array bn = n->IntegerArray(write);
if (!adj.empty()) if (!adj.empty())
{ {
dynarray<int, 64> uni, tmp; std::vector<int> uni, tmp;
//std::vector<int> uni, tmp;
for (ElementArray<Edge>::size_type k = 0; k < adj.size(); ++k) for (ElementArray<Edge>::size_type k = 0; k < adj.size(); ++k)
{ {
Storage::integer_array be = adj[k]->IntegerArray(block); Storage::integer_array be = adj[k]->IntegerArray(block);
...@@ -1080,8 +1079,7 @@ namespace INMOST ...@@ -1080,8 +1079,7 @@ namespace INMOST
Storage::integer_array bn = n->IntegerArray(write); Storage::integer_array bn = n->IntegerArray(write);
if (!adj.empty()) if (!adj.empty())
{ {
dynarray<int, 64> uni(bn.begin(), bn.end()), tmp(uni.size()); std::vector<int> uni(bn.begin(), bn.end()), tmp(uni.size());
//std::vector<int> uni(bn.begin(), bn.end()), tmp(uni.size());
for (ElementArray<Edge>::size_type k = 0; k < adj.size(); ++k) for (ElementArray<Edge>::size_type k = 0; k < adj.size(); ++k)
{ {
Storage::integer_array be = adj[k]->IntegerArray(block); Storage::integer_array be = adj[k]->IntegerArray(block);
...@@ -1099,8 +1097,7 @@ namespace INMOST ...@@ -1099,8 +1097,7 @@ namespace INMOST
if (!adj.empty()) if (!adj.empty())
{ {
Storage::integer_array be = adj[0]->IntegerArray(block); Storage::integer_array be = adj[0]->IntegerArray(block);
dynarray<int, 64> inter(be.begin(), be.end()), tmp(inter.size()); std::vector<int> inter(be.begin(), be.end()), tmp(inter.size());
//std::vector<int> inter(be.begin(), be.end()), tmp(inter.size());
for (ElementArray<Edge>::size_type k = 1; k < adj.size(); ++k) for (ElementArray<Edge>::size_type k = 1; k < adj.size(); ++k)
{ {
be = adj[k]->IntegerArray(block); be = adj[k]->IntegerArray(block);
......
...@@ -56,8 +56,8 @@ namespace INMOST ...@@ -56,8 +56,8 @@ namespace INMOST
int nnodes, ncells, nchars, nodenum, elemnum, elemtype, numtags, elemnodes, temp; int nnodes, ncells, nchars, nodenum, elemnum, elemtype, numtags, elemnodes, temp;
int ascii, float_size, verlow, verhigh; int ascii, float_size, verlow, verhigh;
char skip_keyword[2048]; char skip_keyword[2048];
dynarray<int,128> elemtags; std::vector<int> elemtags;
dynarray<int,128> nodelist; std::vector<int> nodelist;
ElementArray<Node> c_nodes(this); ElementArray<Node> c_nodes(this);
FILE * f = fopen(File.c_str(),"r"); FILE * f = fopen(File.c_str(),"r");
if( f == NULL ) if( f == NULL )
...@@ -467,7 +467,7 @@ read_elem_num_link: ...@@ -467,7 +467,7 @@ read_elem_num_link:
if( --elemnodes == 0 ) if( --elemnodes == 0 )
{ {
for(dynarray<int,128>::size_type k = 0; k < nodelist.size(); ++k) for(size_t k = 0; k < nodelist.size(); ++k)
c_nodes.push_back(newnodes[nodelist[k]]); c_nodes.push_back(newnodes[nodelist[k]]);
//Create new element //Create new element
......
...@@ -600,7 +600,7 @@ namespace INMOST ...@@ -600,7 +600,7 @@ namespace INMOST
io_converter<INMOST_DATA_ENUM_TYPE ,INMOST_DATA_REAL_TYPE> uconv; io_converter<INMOST_DATA_ENUM_TYPE ,INMOST_DATA_REAL_TYPE> uconv;
io_converter<INMOST_DATA_BIG_ENUM_TYPE,INMOST_DATA_REAL_TYPE> buconv; io_converter<INMOST_DATA_BIG_ENUM_TYPE,INMOST_DATA_REAL_TYPE> buconv;
REPORT_STR("start load pmf"); REPORT_STR("start load pmf");
dynarray<INMOST_DATA_ENUM_TYPE,128> myprocs; std::vector<INMOST_DATA_ENUM_TYPE> myprocs;
std::stringstream in(std::ios::in | std::ios::out | std::ios::binary); std::stringstream in(std::ios::in | std::ios::out | std::ios::binary);
HeaderType token; HeaderType token;
std::set< std::string > noload, loadonly, noderivs; std::set< std::string > noload, loadonly, noderivs;
......
...@@ -213,7 +213,7 @@ namespace INMOST ...@@ -213,7 +213,7 @@ namespace INMOST
f << "\n"; f << "\n";
} }
{ {
dynarray<int,64> values; std::vector<int> values;
for(Mesh::iteratorCell it = BeginCell(); it != EndCell(); it++) for(Mesh::iteratorCell it = BeginCell(); it != EndCell(); it++)
{ {
switch(it->GetGeometricType()) switch(it->GetGeometricType())
...@@ -347,7 +347,7 @@ safe_output: ...@@ -347,7 +347,7 @@ safe_output:
else else
f << "CELLS " << NumberOfCells() << " " << values.size() << "\n"; f << "CELLS " << NumberOfCells() << " " << values.size() << "\n";
for(dynarray<Storage::integer,64>::size_type i = 0; i < values.size(); i++) for(size_t i = 0; i < values.size(); i++)
{ {
f << values[i] << " "; f << values[i] << " ";
if( (i+1) % 20 == 0) f << "\n"; if( (i+1) % 20 == 0) f << "\n";
...@@ -2178,8 +2178,8 @@ safe_output: ...@@ -2178,8 +2178,8 @@ safe_output:
{ {
int k = j; int k = j;
k++; //skip number of total number of integers k++; //skip number of total number of integers
dynarray<integer,64> sizes(cp[k++]); std::vector<integer> sizes(cp[k++]);
for(dynarray<integer,64>::size_type m = 0; m < sizes.size(); m++) for(size_t m = 0; m < sizes.size(); m++)
{ {
sizes[m] = cp[k++]; sizes[m] = cp[k++];
for (integer l = 0; l < sizes[m]; l++) for (integer l = 0; l < sizes[m]; l++)
......
...@@ -117,7 +117,7 @@ namespace INMOST ...@@ -117,7 +117,7 @@ namespace INMOST
{ {
std::vector<INMOST_DATA_REAL_TYPE> Vector; std::vector<INMOST_DATA_REAL_TYPE> Vector;
int Repeat; int Repeat;
dynarray<Storage::real,3> xyz; std::vector<Storage::real> xyz;
for(std::string val = reader.GetContentsWord(); !reader.isContentsEnded(); val = reader.GetContentsWord() ) for(std::string val = reader.GetContentsWord(); !reader.isContentsEnded(); val = reader.GetContentsWord() )
{ {
reader.ParseReal(val,Vector,Repeat,nnodes); reader.ParseReal(val,Vector,Repeat,nnodes);
...@@ -1056,7 +1056,7 @@ namespace INMOST ...@@ -1056,7 +1056,7 @@ namespace INMOST
Integer(GetHandle(),idx) = 0; Integer(GetHandle(),idx) = 0;
fout << "\t\t<Nodes Number=\"" << NumberOfNodes() << "\" Dimensions=\"" << GetDimensions() << "\">\n"; fout << "\t\t<Nodes Number=\"" << NumberOfNodes() << "\" Dimensions=\"" << GetDimensions() << "\">\n";
fout << "\t\t\t<![CDATA[\n"; fout << "\t\t\t<![CDATA[\n";
dynarray<Storage::real,3> xyz(GetDimensions()); std::vector<Storage::real> xyz(GetDimensions());
int cnt = 0; int cnt = 0;
for(iteratorNode it = BeginNode(); it != EndNode(); ++it) for(iteratorNode it = BeginNode(); it != EndNode(); ++it)
{ {
......
...@@ -69,7 +69,7 @@ namespace INMOST ...@@ -69,7 +69,7 @@ namespace INMOST
assert( !(_etype & MESH) ); assert( !(_etype & MESH) );
assert( !(_etype & ESET) ); assert( !(_etype & ESET) );
Mesh * mesh = GetMeshLink(); Mesh * mesh = GetMeshLink();
dynarray<HandleType,128> result; std::vector<HandleType> result;
INMOST_DATA_INTEGER_TYPE conn[4] = {0,0,0,0}; INMOST_DATA_INTEGER_TYPE conn[4] = {0,0,0,0};
INMOST_DATA_INTEGER_TYPE myconn = -1, i; INMOST_DATA_INTEGER_TYPE myconn = -1, i;
enumerator ret = 0; enumerator ret = 0;
...@@ -132,7 +132,7 @@ namespace INMOST ...@@ -132,7 +132,7 @@ namespace INMOST
} }
ret += static_cast<enumerator>(result.size()); ret += static_cast<enumerator>(result.size());
} }
for(dynarray<HandleType,128>::size_type it = 0; it < result.size(); it++) for(size_t it = 0; it < result.size(); it++)
mesh->RemPrivateMarker(result[it],mrk); mesh->RemPrivateMarker(result[it],mrk);
result.clear(); result.clear();
mesh->ReleasePrivateMarker(mrk); mesh->ReleasePrivateMarker(mrk);
...@@ -195,7 +195,7 @@ namespace INMOST ...@@ -195,7 +195,7 @@ namespace INMOST
} }
ret += static_cast<enumerator>(result.size()); ret += static_cast<enumerator>(result.size());
} }
for(dynarray<HandleType,128>::size_type it = 0; it < result.size(); it++) for(size_t it = 0; it < result.size(); it++)
mesh->RemPrivateMarker(result[it],mrk); mesh->RemPrivateMarker(result[it],mrk);
result.clear(); result.clear();
mesh->ReleasePrivateMarker(mrk); mesh->ReleasePrivateMarker(mrk);
...@@ -212,7 +212,7 @@ namespace INMOST ...@@ -212,7 +212,7 @@ namespace INMOST
assert( !(_etype & MESH) ); assert( !(_etype & MESH) );
assert( !(_etype & ESET) ); assert( !(_etype & ESET) );
Mesh * mesh = GetMeshLink(); Mesh * mesh = GetMeshLink();
dynarray<HandleType,128> result; std::vector<HandleType> result;
INMOST_DATA_INTEGER_TYPE conn[4] = {0,0,0,0}; INMOST_DATA_INTEGER_TYPE conn[4] = {0,0,0,0};
INMOST_DATA_INTEGER_TYPE myconn = -1, i; INMOST_DATA_INTEGER_TYPE myconn = -1, i;
enumerator ret = 0; enumerator ret = 0;
...@@ -277,7 +277,7 @@ namespace INMOST ...@@ -277,7 +277,7 @@ namespace INMOST
} }
ret += static_cast<enumerator>(result.size()); ret += static_cast<enumerator>(result.size());
} }
for(dynarray<HandleType,128>::size_type it = 0; it < result.size(); it++) for(size_t it = 0; it < result.size(); it++)
mesh->RemPrivateMarker(result[it],mrk); mesh->RemPrivateMarker(result[it],mrk);
result.clear(); result.clear();
mesh->ReleasePrivateMarker(mrk); mesh->ReleasePrivateMarker(mrk);
...@@ -338,7 +338,7 @@ namespace INMOST ...@@ -338,7 +338,7 @@ namespace INMOST
} }
ret += static_cast<enumerator>(result.size()); ret += static_cast<enumerator>(result.size());
} }
for(dynarray<HandleType,128>::size_type it = 0; it < result.size(); it++) for(size_t it = 0; it < result.size(); it++)
mesh->RemPrivateMarker(result[it],mrk); mesh->RemPrivateMarker(result[it],mrk);
result.clear(); result.clear();
mesh->ReleasePrivateMarker(mrk); mesh->ReleasePrivateMarker(mrk);
...@@ -401,7 +401,7 @@ namespace INMOST ...@@ -401,7 +401,7 @@ namespace INMOST
} }
ret += static_cast<enumerator>(result.size()); ret += static_cast<enumerator>(result.size());
} }
for(dynarray<HandleType,128>::size_type it = 0; it < result.size(); it++) for(size_t it = 0; it < result.size(); it++)
mesh->RemPrivateMarker(result[it],mrk); mesh->RemPrivateMarker(result[it],mrk);
result.clear(); result.clear();
mesh->ReleasePrivateMarker(mrk); mesh->ReleasePrivateMarker(mrk);
...@@ -462,7 +462,7 @@ namespace INMOST ...@@ -462,7 +462,7 @@ namespace INMOST
} }
ret += static_cast<enumerator>(result.size()); ret += static_cast<enumerator>(result.size());
} }
for(dynarray<HandleType,128>::size_type it = 0; it < result.size(); it++) for(size_t it = 0; it < result.size(); it++)
mesh->RemPrivateMarker(result[it],mrk); mesh->RemPrivateMarker(result[it],mrk);
result.clear(); result.clear();
mesh->ReleasePrivateMarker(mrk); mesh->ReleasePrivateMarker(mrk);
...@@ -1279,7 +1279,7 @@ namespace INMOST ...@@ -1279,7 +1279,7 @@ namespace INMOST
Storage::integer_array set_procs = e->IntegerArray(e->GetMeshLink()->ProcessorsTag()); Storage::integer_array set_procs = e->IntegerArray(e->GetMeshLink()->ProcessorsTag());
Storage::integer_array sendto = e->IntegerArray(e->GetMeshLink()->SendtoTag()); Storage::integer_array sendto = e->IntegerArray(e->GetMeshLink()->SendtoTag());
std::sort(sendto.begin(),sendto.end()); std::sort(sendto.begin(),sendto.end());
dynarray<Storage::integer,64> tmp1(cont.size()),tmp2; std::vector<Storage::integer> tmp1(cont.size()),tmp2;
tmp1.resize(std::set_difference(cont.begin(),cont.end(),set_procs.begin(),set_procs.end(),tmp1.begin())-tmp1.begin()); tmp1.resize(std::set_difference(cont.begin(),cont.end(),set_procs.begin(),set_procs.end(),tmp1.begin())-tmp1.begin());
tmp2.resize(tmp1.size()+sendto.size()); tmp2.resize(tmp1.size()+sendto.size());
tmp2.resize(std::set_union(tmp1.begin(),tmp1.end(),sendto.begin(),sendto.end(),tmp2.begin())-tmp2.begin()); tmp2.resize(std::set_union(tmp1.begin(),tmp1.end(),sendto.begin(),sendto.end(),tmp2.begin())-tmp2.begin());
......
This diff is collapsed.
...@@ -799,7 +799,7 @@ namespace INMOST ...@@ -799,7 +799,7 @@ namespace INMOST
{ {
{ {
enumerator flag0, flag1, i; enumerator flag0, flag1, i;
dynarray<Element::adj_type const *, 64> hcarr(s); std::vector<Element::adj_type const *> hcarr(s);
hcarr[0] = &HighConn(arr[0]); hcarr[0] = &HighConn(arr[0]);
if( !hcarr[0]->empty() ) if( !hcarr[0]->empty() )
{ {
......
This diff is collapsed.
...@@ -367,7 +367,7 @@ namespace INMOST ...@@ -367,7 +367,7 @@ namespace INMOST
{ {
Storage::integer_array p1 = e->IntegerArray(tag); Storage::integer_array p1 = e->IntegerArray(tag);
const Storage::integer * p2 = static_cast<const Storage::integer *>(static_cast<const void *>(data)); const Storage::integer * p2 = static_cast<const Storage::integer *>(static_cast<const void *>(data));
dynarray<Storage::integer,64> result(static_cast<size_t>(p1.size())+size); std::vector<Storage::integer> result(static_cast<size_t>(p1.size())+size);
result.resize(std::set_union(p1.begin(),p1.end(),p2,p2+size,result.begin())-result.begin()); result.resize(std::set_union(p1.begin(),p1.end(),p2,p2+size,result.begin())-result.begin());
p1.replace(p1.begin(),p1.end(),result.begin(),result.end()); p1.replace(p1.begin(),p1.end(),result.begin(),result.end());
} }
...@@ -902,7 +902,7 @@ namespace INMOST ...@@ -902,7 +902,7 @@ namespace INMOST
{ {
ENTER_FUNC(); ENTER_FUNC();
#if defined(USE_MPI) #if defined(USE_MPI)
static dynarray<Storage::real,64> temp; static std::vector<Storage::real> temp;
temp.resize(size); temp.resize(size);
memcpy(temp.data(),input,sizeof(Storage::real)*size); memcpy(temp.data(),input,sizeof(Storage::real)*size);
REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_REAL_TYPE,MPI_SUM,comm)); REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_REAL_TYPE,MPI_SUM,comm));
...@@ -917,7 +917,7 @@ namespace INMOST ...@@ -917,7 +917,7 @@ namespace INMOST
{ {
ENTER_FUNC(); ENTER_FUNC();
#if defined(USE_MPI) #if defined(USE_MPI)
static dynarray<Storage::integer,64> temp; static std::vector<Storage::integer> temp;
temp.resize(size); temp.resize(size);
memcpy(temp.data(),input,sizeof(Storage::integer)*size); memcpy(temp.data(),input,sizeof(Storage::integer)*size);
REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_INTEGER_TYPE,MPI_SUM,comm)); REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_INTEGER_TYPE,MPI_SUM,comm));
...@@ -932,7 +932,7 @@ namespace INMOST ...@@ -932,7 +932,7 @@ namespace INMOST
{ {
ENTER_FUNC(); ENTER_FUNC();
#if defined(USE_MPI) #if defined(USE_MPI)
static dynarray<Storage::enumerator,64> temp; static std::vector<Storage::enumerator> temp;
temp.resize(size); temp.resize(size);
memcpy(temp.data(),input,sizeof(Storage::enumerator)*size); memcpy(temp.data(),input,sizeof(Storage::enumerator)*size);
REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_ENUM_TYPE,MPI_SUM,comm)); REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_ENUM_TYPE,MPI_SUM,comm));
...@@ -1032,7 +1032,7 @@ namespace INMOST ...@@ -1032,7 +1032,7 @@ namespace INMOST
{ {
ENTER_FUNC(); ENTER_FUNC();
#if defined(USE_MPI) #if defined(USE_MPI)
static dynarray<Storage::real,64> temp; static std::vector<Storage::real> temp;
temp.resize(size); temp.resize(size);
memcpy(temp.data(),input,sizeof(Storage::real)*size); memcpy(temp.data(),input,sizeof(Storage::real)*size);
REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_REAL_TYPE,MPI_MAX,comm)); REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_REAL_TYPE,MPI_MAX,comm));
...@@ -1047,7 +1047,7 @@ namespace INMOST ...@@ -1047,7 +1047,7 @@ namespace INMOST
{ {
ENTER_FUNC(); ENTER_FUNC();
#if defined(USE_MPI) #if defined(USE_MPI)
static dynarray<Storage::integer,64> temp; static std::vector<Storage::integer> temp;
temp.resize(size); temp.resize(size);
memcpy(temp.data(),input,sizeof(Storage::integer)*size); memcpy(temp.data(),input,sizeof(Storage::integer)*size);
REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_INTEGER_TYPE,MPI_MAX,comm)); REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_INTEGER_TYPE,MPI_MAX,comm));
...@@ -1062,7 +1062,7 @@ namespace INMOST ...@@ -1062,7 +1062,7 @@ namespace INMOST
{ {
ENTER_FUNC(); ENTER_FUNC();
#if defined(USE_MPI) #if defined(USE_MPI)
static dynarray<Storage::enumerator,64> temp; static std::vector<Storage::enumerator> temp;
temp.resize(size); temp.resize(size);
memcpy(temp.data(),input,sizeof(Storage::enumerator)*size); memcpy(temp.data(),input,sizeof(Storage::enumerator)*size);
REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_ENUM_TYPE,MPI_MAX,comm)); REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_ENUM_TYPE,MPI_MAX,comm));
...@@ -1116,7 +1116,7 @@ namespace INMOST ...@@ -1116,7 +1116,7 @@ namespace INMOST
{ {
ENTER_FUNC(); ENTER_FUNC();
#if defined(USE_MPI) #if defined(USE_MPI)
static dynarray<Storage::real,64> temp; static std::vector<Storage::real> temp;
temp.resize(size); temp.resize(size);
memcpy(temp.data(),input,sizeof(Storage::real)*size); memcpy(temp.data(),input,sizeof(Storage::real)*size);
REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_REAL_TYPE,MPI_MIN,comm)); REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_REAL_TYPE,MPI_MIN,comm));
...@@ -1131,7 +1131,7 @@ namespace INMOST ...@@ -1131,7 +1131,7 @@ namespace INMOST
{ {
ENTER_FUNC(); ENTER_FUNC();
#if defined(USE_MPI) #if defined(USE_MPI)
static dynarray<Storage::enumerator,64> temp; static std::vector<Storage::enumerator> temp;
temp.resize(size); temp.resize(size);
memcpy(temp.data(),input,sizeof(Storage::enumerator)*size); memcpy(temp.data(),input,sizeof(Storage::enumerator)*size);
REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_ENUM_TYPE,MPI_MIN,comm)); REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_ENUM_TYPE,MPI_MIN,comm));
...@@ -1146,7 +1146,7 @@ namespace INMOST ...@@ -1146,7 +1146,7 @@ namespace INMOST
{ {
ENTER_FUNC(); ENTER_FUNC();
#if defined(USE_MPI) #if defined(USE_MPI)
static dynarray<Storage::integer,64> temp; static std::vector<Storage::integer> temp;
temp.resize(size); temp.resize(size);
memcpy(temp.data(),input,sizeof(Storage::integer)*size); memcpy(temp.data(),input,sizeof(Storage::integer)*size);
REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_INTEGER_TYPE,MPI_MIN,comm)); REPORT_MPI(MPI_Allreduce(temp.data(),input,size,INMOST_MPI_DATA_INTEGER_TYPE,MPI_MIN,comm));
...@@ -1311,7 +1311,7 @@ namespace INMOST ...@@ -1311,7 +1311,7 @@ namespace INMOST