I added an member to my class by the name “linear_solver” and initialize it in
the init_data() method using this snippet:
linear_solver.reset(new libMesh::PetscLinearSolver<Real>(this->comm()));
if (libMesh::on_command_line("--solver_system_names")) {
std::string nm = this->name() + "_";
linear_solver->init(nm.c_str());
}
Seems to be working fine so far.
-Manav
> On Jan 29, 2018, at 3:12 PM, Roy Stogner <[email protected]> wrote:
>
>
> On Mon, 29 Jan 2018, Manav Bhatia wrote:
>
>> I ended up creating a function similar to the one in LInearImplicitSystem to
>> get around this issue.
>>
>> Working out fine now.
>
> Good to hear.
>
> Is your get_linear_solver() anything general enough to move upstream
> to NonlinearImplicitSystem? The lack of a get_linear_solver()
> overload there might be because I was going to add one and realized
> some good reason why I couldn't, but a more likely scenario is just
> that I wasn't using (or testing with, therefore) that class and didn't
> want to implement something blind.
> ---
> Roy
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users