<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy for Windows (vers 25 March 2009), see www.w3.org">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="MS Exchange Server version 08.03.0279.000">
<title>Re: [Petsc-trilinos-discussion] Scope and requirements</title>
</head>
<body>
So what? If it solves a problem, what is it to us what a client application does? The problem is that there should be no link ordering reqiirement between trilinos and petsc. What if trilinos had adapters for petsc solvers and preconditioners (like was supposed to happen in tops-2 ), how would that work (that is called a circular dependency)? With C++ we could just put in static initialization code in downstream lib to insert adapter automatically but there should really be an independent package outside of both that provides trilinos and petsc interoperability and that solves the ordering problem.<br>
<br>
-Ross<br>
<br>
<br>
-----Original Message-----<br>
<b>From: </b>Barry Smith [<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>]<br>
<b>Sent: </b>Friday, November 22, 2013 08:02 PM Eastern Standard Time<br>
<b>To: </b>Bartlett, Roscoe A.<br>
<b>Cc: </b>Jed Brown; Matthew Knepley; petsc-trilinos-discussion@lists.mcs.anl.gov<br>
<b>Subject: </b>Re: [Petsc-trilinos-discussion] Scope and requirements<br>
<br>
<!-- Converted from text/plain format -->
<br>
<p><font size="2">On Nov 22, 2013, at 6:48 PM, Bartlett, Roscoe A. <bartlettra@ornl.gov> wrote:<br>
<br>
> Then what is the issue with shared vs static libs? Why can't downstream client app just compile the petsc ml adapter, call the registration func then use ml under petsc like before?<br>
<br>
   They can. Our objection to this is<br>
<br>
> call the registration func.<br>
<br>
    Barry<br>
<br>
<br>
><br>
> -Ross<br>
><br>
> -----Original Message-----<br>
> From: Jed Brown [jedbrown@mcs.anl.gov]<br>
> Sent: Friday, November 22, 2013 06:44 PM Eastern Standard Time<br>
> To: Matthew Knepley; Bartlett, Roscoe A.<br>
> Cc: Barry Smith; petsc-trilinos-discussion@lists.mcs.anl.gov<br>
> Subject: Re: [Petsc-trilinos-discussion] Scope and requirements<br>
><br>
> Matthew Knepley <knepley@gmail.com> writes:<br>
><br>
> > <a href="http://en.wikipedia.org/wiki/Dependency_injection">http://en.wikipedia.org/wiki/Dependency_injection</a> Yes, we use plugins in<br>
><br>
> > exactly the same way. They obey the top-level interface,<br>
><br>
> > just like your Stratimikos interfaces, and we instantiate the concrete type<br>
><br>
> > dynamically (we can load the appropriate DLL with a<br>
><br>
> > runtime option if necessary). It has been this way since I was in grad<br>
><br>
> > school in 1996.<br>
><br>
><br>
><br>
> PETSc's system is closer to what Martin Fowler refers to as "service<br>
><br>
> locator" in his essay which seems to be a popular reference, though the<br>
><br>
> techniques had been around for decades by the time he wrote the essay.<br>
><br>
><br>
><br>
> <a href="http://www.martinfowler.com/articles/injection.html">http://www.martinfowler.com/articles/injection.html</a><br>
><br>
<br></font></p>
</body>
</html>