This directory collects the input files to test the code.
This directory collects the input and output data files to test the code.
## Instructions
The execution of the original code can be controlled through a set of configuration files that define the characteristics of the problem and affect the type of output. The following sections describe the contents of the configuration files and, to some extent, those of the output ones, presenting one code in each section.
The execution of the original code can be controlled through a set of configuration files that define the characteristics of the problem and affect the type of output. In order to allow for consistency tests between the results of the legacy _FORTRAN_ implementation and the new _C++_ version, a set or pre-computed test cases is provided. The test cases are arranged in folders named after the code branch they are intended to test. Namely:
### cluster
- the `cluster` folder contains input and output data for test cases using clusters of spheres;
- the `sphere` folder contains input and output data for test cases based on a single sphere;
- the `trapping` folder contains input and output data for test cases applying to the `trapping` code.
`clu` is designed to calculate a complex geometry made up by many spheres. These can be either fully embedded in a larger sphere or separated within the external medium. Spherecompenetration is not accounted for.
The legacy _FORTRAN_ code is distributed together with the `np_tmcode` software package, so that the user can verrify the correspondence between results obtained by different code builds. However, some of the _FORTRAN_ based calculations are time consuming. For this reason, the set of pre-computed output files should serve as a first choice for reference.
*TODO:* add the description of the cluster configuration files
### sphere
`sph` is designed to perform the simplest case calculation, namely the scattering of incident radiation on a single sphere. To perform the calculation, the two following formatted files need to be provided:
were the different lines have the following roles:
1. general configuration of the scattering problem, with some specification of the transition between materials
2. definition of the elevation angle arrays for the incident and scattered radiation fields
3. definition of the azimuth angle arrays for the incident and scattered radiation fields
4. a flag to set whether the intermediate data should be written to output files
5. an end-of-file code (generally 0)
In general, input data files are identified by names that start with the `D` character, while output files have names that start with the `O` character. The _C++_ implementation of the code prepends a `c_` prefix to all of its output files (while still using the same input ones).
This directory collects the input files to test the code.
This directory contains test data for models made up by more than one sphere.
## Instructions
The execution of the original code can be controlled through a set of configuration files that define the characteristics of the problem and affect the type of output. The following sections describe the contents of the configuration files and, to some extent, those of the output ones, presenting one code in each section.
### cluster
`clu` is designed to calculate a complex geometry made up by many spheres. These can be either fully embedded in a larger sphere or separated within the external medium. Sphere compenetration is not accounted for.
*TODO:* add the description of the cluster configuration files
### sphere
`sph` is designed to perform the simplest case calculation, namely the scattering of incident radiation on a single sphere. To perform the calculation, the two following formatted files need to be provided:
`clu` and its _C++_ implementation, `np_clu`, are designed to perform more advanced calculations, namely the scattering of incident radiation on a complex particle made of several spherical components. To perform the calculation, the two following formatted files need to be provided:
- DEDFB
```
@@ -24,13 +14,22 @@ The execution of the original code can be controlled through a set of configurat
|
v
SPHERE_ID_VECTOR ->
LAYER_NUMBER_VECTOR SPHERE_RADII_VECTOR
| |
v v
FRACTIONAL_BREAK_RADII ->
LAYER_NUMBER_SPHERE_1 SPHERE_1_RADIUS
FRACTIONAL_BREAK_RADII
|
v
LAYER_NUMBER_SPHERE_2 SPHERE_2_RADIUS
FRACTIONAL_BREAK_RADII
|
v
...
|
v
LAYER_NUMBER_SPHERE_N SPHERE_N_RADIUS
FRACTIONAL_BREAK_RADII
|
v
DIEL_CONST_VECTOR ->
DIEL_CONST_VECTOR
|
v
EOF_CODE
@@ -40,24 +39,28 @@ were the different lines have the following roles:
2. define the external dielectric constant and the scaling configuration
3. define the vector of scales (either explicitly, with one element per row, or in steps, with only first element and step declared)
4. create a vector of IDs to attach to the spheres
5. define the vectors spcifying the number of layers and the radii of the spheres (one sphere per line)
6. define the fractional break radii (one line per sphere, one column per layer)
7. define the vector of dielectric constants or starting functions (one line per sphere, one column per layer)
5. define the vectors specifying the number of layers and the radii of the spheres (one sphere per line)
6. define the fractional break radii (one line per layer)
7. define the vector of dielectric constants or starting functions (one line per layer in sphere)
This directory collects the input files to test the code.
This directory contains test data for the single sphere case.
## Instructions
The execution of the original code can be controlled through a set of configuration files that define the characteristics of the problem and affect the type of output. The following sections describe the contents of the configuration files and, to some extent, those of the output ones, presenting one code in each section.
### cluster
`clu` is designed to calculate a complex geometry made up by many spheres. These can be either fully embedded in a larger sphere or separated within the external medium. Sphere compenetration is not accounted for.
*TODO:* add the description of the cluster configuration files
### sphere
`sph` is designed to perform the simplest case calculation, namely the scattering of incident radiation on a single sphere. To perform the calculation, the two following formatted files need to be provided:
`sph` and its _C++_ implementation, `np_sphere`, are designed to perform the simplest case calculation, namely the scattering of incident radiation on a single sphere. To perform the calculation, the two following formatted files need to be provided:
- DEDFB
```
@@ -24,13 +14,11 @@ The execution of the original code can be controlled through a set of configurat
|
v
SPHERE_ID_VECTOR ->
LAYER_NUMBER_VECTOR SPHERE_RADII_VECTOR
| |
v v
FRACTIONAL_BREAK_RADII ->
LAYER_NUMBER_SPHERE_1 SPHERE_1_RADIUS
FRACTIONAL_BREAK_RADII
|
v
DIEL_CONST_VECTOR ->
DIEL_CONST_VECTOR
|
v
EOF_CODE
@@ -40,9 +28,9 @@ were the different lines have the following roles:
2. define the external dielectric constant and the scaling configuration
3. define the vector of scales (either explicitly, with one element per row, or in steps, with only first element and step declared)
4. create a vector of IDs to attach to the spheres
5. define the vectors spcifying the number of layers and the radii of the spheres (one sphere per line)
6. define the fractional break radii (one line per sphere, one column per layer)
7. define the vector of dielectric constants or starting functions (one line per sphere, one column per layer)
5. define the vectors specifying the number of layers and the radii of the spheres (one sphere per line)
6. define the fractional break radii (one line per layer)
7. define the vector of dielectric constants or starting functions (one line per layer in sphere)
8. an end-of-file code (generally 0)
- DSPH
@@ -50,14 +38,14 @@ were the different lines have the following roles:
This directory collects the input files to test the code.
## Instructions
The execution of the original code can be controlled through a set of configuration files that define the characteristics of the problem and affect the type of output. The following sections describe the contents of the configuration files and, to some extent, those of the output ones, presenting one code in each section.
### cluster
`clu` is designed to calculate a complex geometry made up by many spheres. These can be either fully embedded in a larger sphere or separated within the external medium. Sphere compenetration is not accounted for.
*TODO:* add the description of the cluster configuration files
### sphere
`sph` is designed to perform the simplest case calculation, namely the scattering of incident radiation on a single sphere. To perform the calculation, the two following formatted files need to be provided:
This directory contains test data for the `trapping` code.
## Instructions
As of M9, `trapping` has only been ported to _C++_ and not yet parallelized. Instructions to test this part of the code are very similar to those concerning `sphere` and `cluster`, i.e. the code needs to be run using the available input files and checking for the consistency of the resulting output files.
# License
Copyright (C) 2024 INAF - Osservatorio Astronomico di Cagliari
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
A copy of the GNU General Public License is distributed along with
this program in the COPYING file. If not, see: <https://www.gnu.org/licenses/>.