Browse Source

Removed unused functions in class "MultiLayerMie".

Ovidio Peña Rodríguez 9 years ago
parent
commit
a196f24486
2 changed files with 14 additions and 21 deletions
  1. 8 8
      src/nmie.cc
  2. 6 13
      src/nmie.h

+ 8 - 8
src/nmie.cc

@@ -78,8 +78,8 @@ namespace nmie {
         throw std::invalid_argument("Declared number of layers do not fit x and m!");
     try {
       MultiLayerMie ml_mie;
-      ml_mie.SetAllLayersSize(x);
-      ml_mie.SetAllLayersIndex(m);
+      ml_mie.SetLayersSize(x);
+      ml_mie.SetLayersIndex(m);
       ml_mie.SetPECLayer(pl);
       ml_mie.SetMaxTerms(nmax);
 
@@ -135,8 +135,8 @@ namespace nmie {
         throw std::invalid_argument("Declared number of sample for Theta is not correct!");
     try {
       MultiLayerMie ml_mie;
-      ml_mie.SetAllLayersSize(x);
-      ml_mie.SetAllLayersIndex(m);
+      ml_mie.SetLayersSize(x);
+      ml_mie.SetLayersIndex(m);
       ml_mie.SetAngles(Theta);
       ml_mie.SetPECLayer(pl);
       ml_mie.SetMaxTerms(nmax);
@@ -299,8 +299,8 @@ namespace nmie {
     try {
       MultiLayerMie ml_mie;
       ml_mie.SetPECLayer(pl);
-      ml_mie.SetAllLayersSize(x);
-      ml_mie.SetAllLayersIndex(m);
+      ml_mie.SetLayersSize(x);
+      ml_mie.SetLayersIndex(m);
       ml_mie.SetFieldCoords({Xp_vec, Yp_vec, Zp_vec});
       ml_mie.RunFieldCalculation();
       E = ml_mie.GetFieldE();
@@ -419,7 +419,7 @@ namespace nmie {
   // ********************************************************************** //
   // Modify size of all layers                                             //
   // ********************************************************************** //
-  void MultiLayerMie::SetAllLayersSize(const std::vector<double>& layer_size) {
+  void MultiLayerMie::SetLayersSize(const std::vector<double>& layer_size) {
     MarkUncalculated();
     size_param_.clear();
     double prev_layer_size = 0.0;
@@ -438,7 +438,7 @@ namespace nmie {
   // ********************************************************************** //
   // Modify refractive index of all layers                                  //
   // ********************************************************************** //
-  void MultiLayerMie::SetAllLayersIndex(const std::vector< std::complex<double> >& index) {
+  void MultiLayerMie::SetLayersIndex(const std::vector< std::complex<double> >& index) {
     MarkUncalculated();
     refractive_index_ = index;
   }

+ 6 - 13
src/nmie.h

@@ -70,16 +70,10 @@ namespace nmie {
     std::vector<std::complex<double> > GetBn(){return bn_;};
 
     // Problem definition
-    // Add new layer
-    void AddNewLayer(double layer_size, std::complex<double> layer_index);
-    // Modify width of the layer
-    void SetLayerSize(std::vector<double> layer_size, int layer_position = 0);
-    // Modify refractive index of the layer
-    void SetLayerIndex(std::vector< std::complex<double> > layer_index, int layer_position = 0);
     // Modify size of all layers
-    void SetAllLayersSize(const std::vector<double>& layer_size);
+    void SetLayersSize(const std::vector<double>& layer_size);
     // Modify refractive index of all layers
-    void SetAllLayersIndex(const std::vector< std::complex<double> >& index);
+    void SetLayersIndex(const std::vector< std::complex<double> >& index);
     // Modify scattering (theta) angles
     void SetAngles(const std::vector<double>& angles);
     // Modify coordinates for field calculation
@@ -97,12 +91,11 @@ namespace nmie {
     void ClearLayers();
     void MarkUncalculated();
 
-    // Applied units requests
+    // Read parameters
     double GetSizeParameter();
-    double GetLayerWidth(int layer_position = 0);
-    std::vector<double> GetLayersSize();
-    std::vector<std::complex<double> > GetLayersIndex();
-    std::vector<std::array<double, 3> > GetFieldCoords();
+    std::vector<double> GetLayersSize(){return size_param_;};
+    std::vector<std::complex<double> > GetLayersIndex(){return refractive_index_;};
+    std::vector<std::array<double, 3> > GetFieldCoords(){return coords_;};
 
     std::vector<std::vector< std::complex<double> > > GetFieldE(){return E_;};   // {X[], Y[], Z[]}
     std::vector<std::vector< std::complex<double> > > GetFieldH(){return H_;};