Coder Social home page Coder Social logo

Comments (10)

nimgould avatar nimgould commented on August 19, 2024 1

You are right, the component imform%scu_data needs to be initialized on the fortran side, so I have now set default values in the definition of the tyep. Of course, there is no need for the scu c-side routines at the moment, these are simply placeholders in case someone ever writes the compete c interface (same for all of these subsidary routines), only the control/inform values are needed (if available).

Will push when I next get a chance

from galahad.

nimgould avatar nimgould commented on August 19, 2024

scu doesn't have an initialize routine as the
fortran package doesn't have a control type.
Thus there is nothing to initialize.

At present I have not added full C interfaces to
many of the subsidiary routines, but just the
control/inform structures (that are used by cascade
in other packages).

from galahad.

amontoison avatar amontoison commented on August 19, 2024

How do you initialize the data parameter of scu_information and scu_terminate?

from galahad.

amontoison avatar amontoison commented on August 19, 2024

@nimgould Can I close this issue?

from galahad.

nimgould avatar nimgould commented on August 19, 2024

Yes, thanks

from galahad.

amontoison avatar amontoison commented on August 19, 2024

I don't see the routine scu_initialize in the header file:
https://github.com/ralna/GALAHAD/blob/master/include/galahad_scu.h

from galahad.

nimgould avatar nimgould commented on August 19, 2024

As I said, it is not needed, scu has no control type parameters to set.

from galahad.

amontoison avatar amontoison commented on August 19, 2024

You are right, the component imform%scu_data needs to be initialized on the fortran side, so I have now set default values in the definition of the tyep. Of course, there is no need for the scu c-side routines at the moment, these are simply placeholders in case someone ever writes the compete c interface (same for all of these subsidary routines), only the control/inform values are needed (if available).

Will push when I next get a chance

👆👆👆
You still need to initialize the data parameter that is created in Julia or C.

from galahad.

nimgould avatar nimgould commented on August 19, 2024

Presumably, this can be done on the C side?

from galahad.

amontoison avatar amontoison commented on August 19, 2024

I can't do it directly in Julia.
This is my test for SCU in Julia:

# test_scu.jl
# Simple code to test the Julia interface to SCU

using GALAHAD
using Test

function test_scu()
  data = Ref{Ptr{Cvoid}}()
  control = Ref{scu_control_type}()
  inform = Ref{scu_inform_type}()

  status = Ref{Cint}()
  scu_initialize(data, control, status)
  scu_information(data, inform, status)
  scu_terminate(data, control, inform)

  return 0
end

@testset "SCU" begin
  @test test_scu() == 0
end

Because the C function scu_initialize is missing, I can run the test.

from galahad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.