本文整理汇总了C++中SiconosVector::resize方法的典型用法代码示例。如果您正苦于以下问题:C++ SiconosVector::resize方法的具体用法?C++ SiconosVector::resize怎么用?C++ SiconosVector::resize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SiconosVector
的用法示例。
在下文中一共展示了SiconosVector::resize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: contactPointProcess
void contactPointProcess(SiconosVector& answer,
const Interaction& inter,
const T& rel)
{
answer.resize(14);
const SiconosVector& posa = *rel.pc1();
const SiconosVector& posb = *rel.pc2();
const SiconosVector& nc = *rel.nc();
const SimpleMatrix& jachqT = *rel.jachqT();
double id = inter.number();
double mu = ask<ForMu>(*inter.nslaw());
SiconosVector cf(jachqT.size(1));
prod(*inter.lambda(1), jachqT, cf, true);
answer.setValue(0, mu);
DEBUG_PRINTF("posa(0)=%g\n", posa(0));
DEBUG_PRINTF("posa(1)=%g\n", posa(1));
DEBUG_PRINTF("posa(2)=%g\n", posa(2));
answer.setValue(1, posa(0));
answer.setValue(2, posa(1));
answer.setValue(3, posa(2));
answer.setValue(4, posb(0));
answer.setValue(5, posb(1));
answer.setValue(6, posb(2));
answer.setValue(7, nc(0));
answer.setValue(8, nc(1));
answer.setValue(9, nc(2));
answer.setValue(10, cf(0));
answer.setValue(11, cf(1));
answer.setValue(12, cf(2));
answer.setValue(13, id);
};