<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>here we are developing in C++ and using PETSc encapsulated into
C++ classes since 1997.... I am curious about a kind of survey on
"How do you use PETSc in your code?"<br>
</p>
<p>I would say that bad code in feasible in almost all languages
(yes, we did that to! :) ): peer code review is there to help
prevent that! We enforce unwanted features (i.e. in our case we
forbid exceptions) by git hooks... Also, some old features are
disabled if you use "-std=c++17" compiler flag for example.Also
clang++ can warn you about deprecated features... and we are
forcing to compile without warnings in our CI chain.<br>
</p>
<p>I absolutely vote for a C++ API over existing PETSc!</p>
<p>If PETSc is at end encapsulated into Julia or Rust for example,
is it easily callable from C++? <br>
</p>
<p>What about the easiness of PETSc++ callable from other languages?</p>
<p>Eric<br>
</p>
<div class="moz-cite-prefix">On 2022-07-25 17:34, Barry Smith wrote:<br>
</div>
<blockquote type="cite"
cite="mid:941B4E85-D4E0-4634-8E69-4AE0950C649B@petsc.dev">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class=""><br class="">
</div>
<div class=""> A major problem with writing a completely new
version of a large code base is that one has to start with
nothing and slowly build up to everything, which can take years.
Years in which you need to continue to maintain the old version,
people want to continue to add functionality to the old version,
and people want to continue to use the old version because the
new version doesn't have "the functionality the user needs"
ready yet.</div>
<div class=""><br class="">
</div>
<div class=""> Is there an approach where we can have a new PETSc
API/language/paradigm but start with a very thin layer on the
current API so it just works from day one?</div>
<div class="">
<ul class="MailOutline">
<li class="">to this would seem to require if PETSc future is
not in C, there has to be a very, very easy way and low
error-prone way to wrap PETSc current to be called from the
new language. For example, how petsc4py wraps seems too
manual and too error-prone. C++ can easily and low-error
prone call C, any other viable candidates?</li>
</ul>
<div class=""><br class="">
</div>
</div>
<div class=""><br class="">
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Eric Chamberland, ing., M. Ing
Professionnel de recherche
GIREF/Université Laval
(418) 656-2131 poste 41 22 42</pre>
</body>
</html>