Changeset 8a48713 in sasview for sansmodels/src


Ignore:
Timestamp:
Jun 23, 2009 2:19:50 PM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
f41b4c3
Parents:
3b9e023
Message:

implement 1D for parallelepiped model

Location:
sansmodels/src/sans/models
Files:
6 added
3 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/c_extensions/c_models.c

    rdb1dcef r8a48713  
    2727 
    2828        addCCylinderModel(m); 
     29        addCParallelepipedModel(m); 
    2930        addCCoreShellCylinderModel(m); 
    3031        addCCoreShellModel(m); 
  • sansmodels/src/sans/models/c_models/c_models.cpp

    r4d09267 r8a48713  
    99 
    1010void addCCylinderModel(PyObject *module); 
     11void addCParallelepipedModel(PyObject *module); 
    1112void addCSphereModel(PyObject *module); 
    1213void addCHardsphereStructure(PyObject *module); 
     
    148149 
    149150        addCCylinderModel(m); 
     151        addCParallelepipedModel(m); 
    150152        addCCoreShellCylinderModel(m); 
    151153        addCCoreShellModel(m); 
  • sansmodels/src/sans/models/c_models/models.hh

    ra0782f1 r8a48713  
    1919extern "C" { 
    2020        #include "cylinder.h" 
     21        #include "parallelepiped.h" 
    2122} 
    2223 
     
    4243        double evaluate_rphi(double q, double phi); 
    4344}; 
     45 
     46class ParallelepipedModel{ 
     47public: 
     48        // TODO: add 2D  
     49        // Model parameters 
     50        Parameter scale; 
     51        Parameter short_edgeA; 
     52        Parameter longer_edgeB; 
     53        Parameter longuest_edgeC; 
     54        Parameter contrast; 
     55        Parameter background; 
     56        Parameter parallel_theta; 
     57        Parameter parallel_phi; 
     58 
     59        // Constructor 
     60        ParallelepipedModel(); 
     61 
     62        // Operators to get I(Q) 
     63        double operator()(double q); 
     64        double operator()(double qx, double qy); 
     65        double evaluate_rphi(double q, double phi); 
     66}; 
     67 
    4468 
    4569class SphereModel{ 
Note: See TracChangeset for help on using the changeset viewer.