<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Patix,<br>
      <br>
      I wonder that the TRNSYS developer group does not provide perfect
      TRNSYS.H. Why??<br>
      Anyway, I think that all arguments must be declared as a pointer,
      unless they are declared as a Value in FORTRAN.<br>
      Try the following declaration.<br>
      <br>
      extern "C" __declspec(dllimport) void _cdecl SOLVEDIFFEQ(double*
      aa, double* bb, double* INIT_VALUE, double* END_VALUE, double*
      AVG_VALUE);<br>
      <br>
      I have posted some articles for C++ component on my blog. Please
      check these articles if you like.<br>
      Unfortunately, these are written in Japanese. Try to read them
      with Google translation tool.<br>
      <a class="moz-txt-link-freetext" href="https://kankyoukei.blogspot.jp/2016/04/trnsyscc6.html">https://kankyoukei.blogspot.jp/2016/04/trnsyscc6.html</a><br>
      <a class="moz-txt-link-freetext" href="https://kankyoukei.blogspot.jp/2016/04/trnsys-cc7.html">https://kankyoukei.blogspot.jp/2016/04/trnsys-cc7.html</a><br>
      <span lang="EN-US"></span><br>
      Regards,<br>
      Yuichi Yasuda<br>
      <span lang="EN-US"></span><span lang="EN-US"><br>
      </span>On 2016/12/20 20:36, Patxi Sorbet Presentacion via
      TRNSYS-users wrote:<br>
    </div>
    <blockquote
      cite="mid:8825e0171ed2423782d2c474cf0700ce@Csrv22.incener.local"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Batang;
        panose-1:2 3 6 0 0 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"\@Batang";
        panose-1:2 3 6 0 0 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EstiloCorreo17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span lang="EN-US">Hello Everyone,<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">I’m, currently dealing
            with the development of a new type, but not in the
            Fortran-based official way.
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">Up to now, I have
            developed several Types in C++ using information from
            templates that come included in the program folders, and
            some imagination.
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">For the moment, things
            went well this way.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">But now I want to solve
            a differential equation calling the built-in routine
            SolveDiffEq(AA, BB, TI, TF, TBAR).
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">I may develop my own
            Finite difference scheme and go on, but I’m trying to take
            advantage from that kernel subroutine.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">For the moment I have
            not found the right way (if it exists) to include the
            routine header in Trnsys.h, for later compiling and running
            in the generated dll. I guess It should be this way, but it
            doesn’t’t work when running trnexe.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white"
            lang="EN-US">extern</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"
            lang="EN-US">
          </span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white"
            lang="EN-US">"C"</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"
            lang="EN-US">
          </span><span
style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white"
            lang="EN-US">__declspec</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"
            lang="EN-US">(</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white"
            lang="EN-US">dllimport</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"
            lang="EN-US">)
          </span><span
style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white"
            lang="EN-US">void</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"
            lang="EN-US">
          </span><span
style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white"
            lang="EN-US">_cdecl</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"
            lang="EN-US"> SOLVEDIFFEQ(</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white"
            lang="EN-US">double</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"
            lang="EN-US"> aa, </span><span
style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white"
            lang="EN-US">double</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"
            lang="EN-US"> bb,
          </span><span
style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white"
            lang="EN-US">double</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"
            lang="EN-US">* INIT_VALUE,
          </span><span
style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white"
            lang="EN-US">double</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"
            lang="EN-US">* END_VALUE,
          </span><span
style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white"
            lang="EN-US">double</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"
            lang="EN-US">* AVG_VALUE);</span><span
            style="font-size:9.5pt;font-family:Consolas;color:black"
            lang="EN-US"><o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.5pt;font-family:Consolas;color:black"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">If anyone has the same
            concerns, we may interchange information about how creating
            & compiling Types this way, without purchasing an IVF
            license. I will be very pleased to share my work.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">Thanks in advance<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">Regards,<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">----------------------------------------------------------------------<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">Patxi Sorbet<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">Research Engineer<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">Solar Thermal Energy
            Department<o:p></o:p></span></p>
        <p class="MsoNormal">NATIONAL RENEWABLE ENERGY CENTRE<o:p></o:p></p>
        <p class="MsoNormal">Ciudad de la Innovación, 7 -31621         -
          Sarriguren (Navarra) Spain<o:p></o:p></p>
        <p class="MsoNormal"><a class="moz-txt-link-abbreviated" href="http://www.cener.com">www.cener.com</a><o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span style="mso-fareast-language:ES"><o:p> </o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
TRNSYS-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:TRNSYS-users@lists.onebuilding.org">TRNSYS-users@lists.onebuilding.org</a>
<a class="moz-txt-link-freetext" href="http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org">http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org</a>
</pre>
    </blockquote>
    <br>
    <p><br>
    </p>
    <div class="moz-signature">-- <br>
      <p>株式会社クアトロ<br>
        <a href="http://qcd.co.jp/">http://qcd.co.jp/</a><br>
        <font color="red">ホームページリニューアルしました!!</font><br>
        安田 雄市<br>
        TEL 03-5768-6744<br>
        FAX 03-5768-6745<br>
        e-mail: <a class="moz-txt-link-abbreviated" href="mailto:yasuda@qcd.co.jp">yasuda@qcd.co.jp</a></p>
    </div>
  </body>
</html>