dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #23898
Re: VariationalProblem interface
-
To:
Anders Logg <logg@xxxxxxxxx>
-
From:
"Garth N. Wells" <gnw20@xxxxxxxxx>
-
Date:
Tue, 21 Jun 2011 10:05:10 +0100
-
Cc:
dolfin@xxxxxxxxxxxxxxxxxxx
-
In-reply-to:
<20110621085647.GQ2037@smaug>
-
User-agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10
On 21/06/11 09:56, Anders Logg wrote:
> On Tue, Jun 21, 2011 at 09:45:27AM +0100, Garth N. Wells wrote:
>>
>>
>> On 21/06/11 08:58, Anders Logg wrote:
>>> Thanks for looking into this. So it looks like this will work out
>>> fine. So are there any objections to changing the VariationalProblem
>>> (which depends on the order of arguments) to the more explicit
>>>
>>> LinearVariationalSolver
>>> NonlinearVariationalSolver
>>>
>>> *solver* classes (instead of problem classes so that it's consistent
>>> with the way we treat la),
>>
>> What about also having
>>
>> LinearVariationalProblem
>> NonlinearVariationalProblem
>>
>> as more-or-less containers for defining the problem. Something that
>> these may be useful for is writing and reading restart files (especially
>> in parallel),
>>
>> // Create problem
>> LinearVariationProblem problem(......);
>>
>> // Write check point
>> problem.checkpoint("restart_file.hdf5");
>>
>> or
>>
>> File f("restart_file.hdf5");
>> f << problem;
>>
>> We could then have a common
>>
>> VariationalSolver variation_solver(problem, linear_solver, . . . );
>>
>> interface.
>
> Maybe, but could this not be handled by the solver classes?
>
> solver = NonlinearVariationalSolver(F, J, etc)
> solver.set_checkpoint("restart_file.hdf5")
> solver.parameters["..."] = ...
> solver.anything_else()
> solver.solve()
>
Yes, but it would make he class more complicated and it would be
unclear is the data that defined the problem is being saved (Mesh,
coefficient vectors, dof map) or or of the state of the solver is being
saved (preconditioner, etc).
Martin threw up encapsulating the problem definition and I don't think
that it's been adequately discussed yet for a conclusion to be drawn.
Garth
> --
> Anders
Follow ups
References
-
Re: VariationalProblem interface
From: Johan Hake, 2011-06-14
-
Re: VariationalProblem interface
From: Anders Logg, 2011-06-14
-
Re: VariationalProblem interface
From: Garth N. Wells, 2011-06-14
-
Re: VariationalProblem interface
From: Marie E. Rognes, 2011-06-14
-
Re: VariationalProblem interface
From: Anders Logg, 2011-06-14
-
Re: VariationalProblem interface
From: Martin Sandve Alnæs, 2011-06-14
-
Re: VariationalProblem interface
From: Anders Logg, 2011-06-15
-
Re: VariationalProblem interface
From: Martin Sandve Alnæs, 2011-06-21
-
Re: VariationalProblem interface
From: Anders Logg, 2011-06-21
-
Re: VariationalProblem interface
From: Garth N. Wells, 2011-06-21
-
Re: VariationalProblem interface
From: Anders Logg, 2011-06-21