本文整理汇总了C++中InArgs::get_x_dot_mp方法的典型用法代码示例。如果您正苦于以下问题:C++ InArgs::get_x_dot_mp方法的具体用法?C++ InArgs::get_x_dot_mp怎么用?C++ InArgs::get_x_dot_mp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InArgs
的用法示例。
在下文中一共展示了InArgs::get_x_dot_mp方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Timer
//.........这里部分代码省略.........
outArgs.get_DgDp_sg(i,j).getDerivativeMultiVector().getParamIndexes();
Teuchos::RCP<ParamVec> p_vec;
if (p_indexes.size() == 0)
p_vec = Teuchos::rcp(&sacado_param_vec[j],false);
else {
p_vec = Teuchos::rcp(new ParamVec);
for (int k=0; k<p_indexes.size(); k++)
p_vec->addParam(sacado_param_vec[j][p_indexes[k]].family,
sacado_param_vec[j][p_indexes[k]].baseValue);
}
app->evaluateSGResponseTangent(i, alpha, beta, omega, curr_time, false,
x_dot_sg.get(), x_dotdot_sg.get(), *x_sg,
sacado_param_vec, p_sg_index,
p_sg_vals, p_vec.get(),
NULL, NULL, NULL, NULL, g_sg.get(),
NULL, dgdp_sg.get());
g_sg_computed = true;
}
}
if (g_sg != Teuchos::null && !g_sg_computed)
app->evaluateSGResponse(i, curr_time, x_dot_sg.get(), x_dotdot_sg.get(), *x_sg,
sacado_param_vec, p_sg_index, p_sg_vals,
*g_sg);
}
}
//
// Multi-point evaluation
//
mp_const_vector_t x_mp = inArgs.get_x_mp();
if (x_mp != Teuchos::null) {
mp_const_vector_t x_dot_mp = inArgs.get_x_dot_mp();
mp_const_vector_t x_dotdot_mp = inArgs.get_x_dotdot_mp();
if (x_dot_mp != Teuchos::null || x_dotdot_mp != Teuchos::null) {
alpha = inArgs.get_alpha();
omega = inArgs.get_omega();
beta = inArgs.get_beta();
curr_time = inArgs.get_t();
}
Teuchos::Array<int> p_mp_index;
for (int i=0; i<num_param_vecs; i++) {
mp_const_vector_t p_mp = inArgs.get_p_mp(i);
if (p_mp != Teuchos::null) {
p_mp_index.push_back(i);
for (int j=0; j<p_mp_vals[i].size(); j++) {
int num_mp_blocks = p_mp->size();
p_mp_vals[i][j].reset(num_mp_blocks);
p_mp_vals[i][j].copyForWrite();
for (int l=0; l<num_mp_blocks; l++) {
p_mp_vals[i][j].fastAccessCoeff(l) = (*p_mp)[l][j];
}
}
}
}
mp_vector_t f_mp = outArgs.get_f_mp();
mp_operator_t W_mp = outArgs.get_W_mp();
bool f_mp_computed = false;
// W_mp
if (W_mp != Teuchos::null) {
Stokhos::ProductContainer<Epetra_CrsMatrix> W_mp_crs(W_mp->map());
for (int i=0; i<W_mp->size(); i++)
示例2: Timer
//.........这里部分代码省略.........
p_vec = Teuchos::rcp(new ParamVec);
for (int k=0; k<p_indexes.size(); k++)
p_vec->addParam(sacado_param_vec[j][p_indexes[k]].family,
sacado_param_vec[j][p_indexes[k]].baseValue);
}
app->evaluateSGResponseTangent(i, alpha, beta, omega, curr_time, false,
x_dot_sg.get(), x_dotdot_sg.get(), *x_sg,
sacado_param_vec, p_sg_index,
p_sg_vals, p_vec.get(),
NULL, NULL, NULL, NULL, g_sg.get(),
NULL, dgdp_sg.get());
g_sg_computed = true;
}
}
if (g_sg != Teuchos::null && !g_sg_computed)
app->evaluateSGResponse(i, curr_time, x_dot_sg.get(), x_dotdot_sg.get(), *x_sg,
sacado_param_vec, p_sg_index, p_sg_vals,
*g_sg);
}
}
#endif
#ifdef ALBANY_ENSEMBLE
//
// Multi-point evaluation
//
mp_const_vector_t x_mp = inArgs.get_x_mp();
if (x_mp != Teuchos::null) {
mp_const_vector_t x_dot_mp = Teuchos::null;
mp_const_vector_t x_dotdot_mp = Teuchos::null;
if(num_time_deriv > 0)
x_dot_mp = inArgs.get_x_dot_mp();
if(num_time_deriv > 1)
x_dotdot_mp = inArgs.get_x_dotdot_mp();
if (x_dot_mp != Teuchos::null || x_dotdot_mp != Teuchos::null) {
alpha = inArgs.get_alpha();
//omega = inArgs.get_omega();
beta = inArgs.get_beta();
curr_time = inArgs.get_t();
}
if (x_dotdot_mp != Teuchos::null) {
omega = inArgs.get_omega();
}
Teuchos::Array<int> p_mp_index;
for (int i=0; i<num_param_vecs; i++) {
mp_const_vector_t p_mp = inArgs.get_p_mp(i);
if (p_mp != Teuchos::null) {
p_mp_index.push_back(i);
for (int j=0; j<p_mp_vals[i].size(); j++) {
int num_mp_blocks = p_mp->size();
p_mp_vals[i][j].reset(num_mp_blocks);
p_mp_vals[i][j].copyForWrite();
for (int l=0; l<num_mp_blocks; l++) {
p_mp_vals[i][j].fastAccessCoeff(l) = (*p_mp)[l][j];
}
}
}
}
mp_vector_t f_mp = outArgs.get_f_mp();
mp_operator_t W_mp = outArgs.get_W_mp();
bool f_mp_computed = false;