Changeset ef85a09 in sasmodels


Ignore:
Timestamp:
Dec 14, 2017 4:07:26 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
b85227d
Parents:
108e70e
Message:

document the new c_code='…' model definition option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/guide/plugin.rst

    r108e70e ref85a09  
    499499**source=['fn.c', ...]** includes the listed C source files in the 
    500500program before *Iq* and *form_volume* are defined. This allows you to 
    501 extend the library of C functions available to your model.  Note that 
     501extend the library of C functions available to your model. 
     502 
     503*c_code* includes arbitrary C code into your kernel, which can be 
     504handy for defining helper functions for *Iq* and *form_volume*. Note that 
    502505you can put the full function definition for *Iq* and *form_volume* 
    503 (include function declaration) into an external C file and add it to the list 
    504 of sources instead of defining it within the python model file. 
     506(include function declaration) into *c_code* as well, or put them into an 
     507external C file and add that file to the list of sources. 
    505508 
    506509Models are defined using double precision declarations for the 
     
    526529 
    527530    #define INVALID(v) (v.bell_radius < v.radius) 
     531 
     532The INVALID define can go into *Iq*, or *c_code*, or an external C file 
     533listed in *source*. 
    528534 
    529535Oriented Shapes 
Note: See TracChangeset for help on using the changeset viewer.