std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->doublyContractedProduct();
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
ret->setArrays(arrays3,0);
return ret;
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->determinant();
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
MEDCouplingTimeDiscretization *ret=MEDCouplingTimeDiscretization::New(getEnum());
ret->setTimeUnit(getTimeUnit());
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->eigenValues();
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
MEDCouplingTimeDiscretization *ret=MEDCouplingTimeDiscretization::New(getEnum());
ret->setTimeUnit(getTimeUnit());
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->eigenVectors();
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
MEDCouplingTimeDiscretization *ret=MEDCouplingTimeDiscretization::New(getEnum());
ret->setTimeUnit(getTimeUnit());
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->inverse();
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
MEDCouplingTimeDiscretization *ret=MEDCouplingTimeDiscretization::New(getEnum());
ret->setTimeUnit(getTimeUnit());
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->trace();
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
MEDCouplingTimeDiscretization *ret=MEDCouplingTimeDiscretization::New(getEnum());
ret->setTimeUnit(getTimeUnit());
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->deviator();
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
MEDCouplingTimeDiscretization *ret=MEDCouplingTimeDiscretization::New(getEnum());
ret->setTimeUnit(getTimeUnit());
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->magnitude();
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
MEDCouplingTimeDiscretization *ret=MEDCouplingTimeDiscretization::New(getEnum());
ret->setTimeUnit(getTimeUnit());
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->negate();
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
MEDCouplingTimeDiscretization *ret=MEDCouplingTimeDiscretization::New(getEnum());
ret->setTimeUnit(getTimeUnit());
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->maxPerTuple();
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
MEDCouplingTimeDiscretization *ret=MEDCouplingTimeDiscretization::New(getEnum());
ret->setTimeUnit(getTimeUnit());
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->keepSelectedComponents(compoIds);
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
MEDCouplingTimeDiscretization *ret=MEDCouplingTimeDiscretization::New(getEnum());
ret->setTimeUnit(getTimeUnit());
other->getArrays(arrays2);
if(arrays1.size()!=arrays2.size())
throw INTERP_KERNEL::Exception("TimeDiscretization::setSelectedComponents : number of arrays mismatch !");
- for(unsigned int i=0;i<arrays1.size();i++)
+ for(std::size_t i=0;i<arrays1.size();i++)
{
if(arrays1[i]!=0 && arrays2[i]!=0)
arrays1[i]->setSelectedComponents(arrays2[i],compoIds);
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->changeNbOfComponents(newNbOfComp,dftValue);
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
setArrays(arrays3,0);
}
{
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays[j]->sortPerTuple(asc);
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
{
- arrays[j]->incrRef();
- arrays[j]->fillWithValue(value);
- arrays2[j]=arrays[j];
+ arrays2[j]=arrays[j]->changeNbOfComponents(nbOfCompo,value);
+ arrays2[j]->fillWithValue(value);
}
else
{
- DataArrayDouble *tmp=DataArrayDouble::New();
- tmp->alloc(nbOfTuple,nbOfCompo);
- tmp->fillWithValue(value);
- arrays2[j]=tmp;
+ arrays2[j]=DataArrayDouble::New();
+ arrays2[j]->alloc(nbOfTuple,nbOfCompo);
+ arrays2[j]->fillWithValue(value);
}
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
setArrays(arrays3,0);
}
+void MEDCouplingTimeDiscretization::setOrCreateUniformValueOnAllComponents(int nbOfTuple, double value)
+{
+ std::vector<DataArrayDouble *> arrays;
+ getArrays(arrays);
+ std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
+ bool newArr=false;
+ for(std::size_t j=0;j<arrays.size();j++)
+ {
+ if(arrays[j])
+ {
+ arrays2[j]=arrays[j]; arrays2[j]->incrRef();
+ arrays2[j]->fillWithValue(value);
+ }
+ else
+ {
+ newArr=true;
+ arrays2[j]=DataArrayDouble::New();
+ arrays2[j]->alloc(nbOfTuple,1);
+ arrays2[j]->fillWithValue(value);
+ }
+ }
+ if(newArr)
+ {
+ std::vector<DataArrayDouble *> arrays3(arrays.size());
+ for(std::size_t j=0;j<arrays.size();j++)
+ arrays3[j]=arrays2[j];
+ setArrays(arrays3,0);
+ }
+}
+
void MEDCouplingTimeDiscretization::applyLin(double a, double b, int compoId)
{
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays[j]->applyLin(a,b,compoId);
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->applyFunc(nbOfComp,func);
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
setArrays(arrays3,0);
}
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->applyFunc(nbOfComp,func);
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
setArrays(arrays3,0);
}
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->applyFunc2(nbOfComp,func);
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
setArrays(arrays3,0);
}
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->applyFunc3(nbOfComp,varsOrder,func);
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
setArrays(arrays3,0);
}
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays2[j]=arrays[j]->applyFunc(func);
arrays2[j]=0;
}
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
setArrays(arrays3,0);
}
{
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays[j]->applyFuncFast32(func);
{
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
{
if(arrays[j])
arrays[j]->applyFuncFast64(func);
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays2[j]=loc->applyFunc(nbOfComp,func);
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
setArrays(arrays3,0);
}
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays2[j]=loc->applyFunc(nbOfComp,func);
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
setArrays(arrays3,0);
}
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays2[j]=loc->applyFunc2(nbOfComp,func);
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
setArrays(arrays3,0);
}
std::vector<DataArrayDouble *> arrays;
getArrays(arrays);
std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > arrays2(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays2[j]=loc->applyFunc3(nbOfComp,varsOrder,func);
std::vector<DataArrayDouble *> arrays3(arrays.size());
- for(int j=0;j<(int)arrays.size();j++)
+ for(std::size_t j=0;j<arrays.size();j++)
arrays3[j]=arrays2[j];
setArrays(arrays3,0);
}