|
From: Prashant K. J. <pjh...@gm...> - 2020-07-12 01:55:51
|
Hi All,
I have been struggling with a very simple problem. I create a system as
follows:
EquationSystems es(mesh);
auto &taf_sys = es.add_system<TransientLinearImplicitSystem>("TAF");
taf_sys.add_variable("taf", FIRST);
After I solve taf_sys, I want to localize the solution of taf_sys system
(ie "taf" field) on all processors in the taf_localize vector. I have tried
many approaches such as
1.
std::vector<double> taf_localize;
taf_sys.solution->localize(taf_localize);
2.
std::vector<double> taf_localize;
taf_sys.current_local_solution->localize(taf_localize);
3.
static int init = -1;
static std::unique_ptr<NumericVector<Number>> taf_localize =
NumericVector<Number>::build(comm());
if (init < 0) {
taf_localize->init (taf_sys.solution->size(), false, SERIAL);
init = 0;
}
taf_sys.solution->localize(*taf_localize);
They all fail with
Assertion `(this->comm()).verify(std::to_string(642))' failed
Can anyone help with this? Thank you.
Regards,
Prashant
|