aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjthorn <jthorn@df1f8a13-aa1d-4dd4-9681-27ded5b42416>2002-05-12 18:01:58 +0000
committerjthorn <jthorn@df1f8a13-aa1d-4dd4-9681-27ded5b42416>2002-05-12 18:01:58 +0000
commit28092c2a0b54ea3de7270a2d2c8fc3d518f16ec3 (patch)
tree94506baa8282a2914f0a9bef5a3276e8c196481a /src
parent254411a8cb5aae742d044ff502a214c01f65ec20 (diff)
document args to subfunctions a bit more,
add a missing const qualifier to one of the args git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/LocalInterp/trunk@30 df1f8a13-aa1d-4dd4-9681-27ded5b42416
Diffstat (limited to 'src')
-rw-r--r--src/GeneralizedPolynomial-Uniform/InterpLocalUniform.c2
-rw-r--r--src/GeneralizedPolynomial-Uniform/template.c55
-rw-r--r--src/GeneralizedPolynomial-Uniform/template.h2
3 files changed, 46 insertions, 13 deletions
diff --git a/src/GeneralizedPolynomial-Uniform/InterpLocalUniform.c b/src/GeneralizedPolynomial-Uniform/InterpLocalUniform.c
index bd32e04..76dbe4a 100644
--- a/src/GeneralizedPolynomial-Uniform/InterpLocalUniform.c
+++ b/src/GeneralizedPolynomial-Uniform/InterpLocalUniform.c
@@ -883,7 +883,7 @@ struct molecule_min_max_m_info *p_molecule_min_max_m_info
/* molecule positions */
{
-CCTK_INT** p_molecule_positions = NULL;
+CCTK_INT* const* p_molecule_positions = NULL;
CCTK_POINTER molecule_positions_temp [MAX_N_DIMS];
CCTK_INT* molecule_positions_array[MAX_N_DIMS];
status = Util_TableGetPointerArray(param_table_handle,
diff --git a/src/GeneralizedPolynomial-Uniform/template.c b/src/GeneralizedPolynomial-Uniform/template.c
index bc84bbf..0e6f004 100644
--- a/src/GeneralizedPolynomial-Uniform/template.c
+++ b/src/GeneralizedPolynomial-Uniform/template.c
@@ -197,19 +197,49 @@
/******************************************************************************/
/*@@
- @routine FUNCTION_NAME
- @date 23 Oct 2001
- @author Jonathan Thornburg <jthorn@aei.mpg.de>
- @desc
+ @routine FUNCTION_NAME
+ @date 23 Oct 2001
+ @author Jonathan Thornburg <jthorn@aei.mpg.de>
+ @desc
This function does generalized interpolation of one or more
2d arrays to arbitrary points. For details, see the header
comments for InterpLocalUniform() (in "InterpLocalUniform.c"
in this same directory).
- This function's arguments are all a subset of those of
- InterpLocalUniform() ; the only difference is that this function
+ This function's arguments are mostly all a subset of those of
+ InterpLocalUniform() ; the difference is that this function
takes all its arguments explicitly, whereas InputLocalArrays()
takes some of them indirectly via a key/value parameter table.
+ Here we document only the "new" explicit arguments, and these
+ only briefly; see the InterpLocalUniform() documentation
+ and/or the thorn guide for this thorn for further details.
+
+ @var error_flags
+ @vdesc If we encounter an out-of-range point and this pointer
+ is non-NULL, we store a description of the out-of-range
+ point in the pointed-to structure.
+ @vtype struct error_flags *error_flags;
+ @vio out
+
+ @var molecule_structure_flags
+ @vdesc If this pointer is non-NULL, we store flags describing
+ the interpolation molecule's structure in the pointed-to
+ structure.
+ @vtype struct molecule_structure_flags *molecule_structure_flags;
+ @vio out
+
+ @var molecule_min_max_m_info
+ @vdesc If this pointer is non-NULL, we store the interpolation
+ molecule's min/max m in the pointed-to structure.
+ @vtype struct molecule_min_max_m_info *molecule_min_max_m_info;
+ @vio out
+
+ @var molecule_positions
+ @vdesc If this pointer is non-NULL, we store the interpolation
+ molecule's positions in the (caller-supplied) arrays
+ pointed to by this pointer.
+ @vtype CCTK_INT* const molecule_positions[];
+ @vio out
@returntype int
@returndesc This function's return result is the same as that of
@@ -249,7 +279,7 @@ int FUNCTION_NAME(/***** coordinate system *****/
struct error_flags *error_flags,
struct molecule_structure_flags *molecule_structure_flags,
struct molecule_min_max_m_info *molecule_min_max_m_info,
- CCTK_INT* molecule_positions[])
+ CCTK_INT* const molecule_positions[])
{
/*
* Implementation notes:
@@ -383,10 +413,13 @@ int FUNCTION_NAME(/***** coordinate system *****/
/*
* Jacobian structure info
*/
-molecule_structure_flags->MSS_is_fn_of_interp_coords = 0;
-molecule_structure_flags->MSS_is_fn_of_which_operation = 0;
-molecule_structure_flags->MSS_is_fn_of_input_array_values = 0;
-molecule_structure_flags->Jacobian_is_fn_of_input_array_values = 0;
+if (molecule_structure_flags != NULL)
+ then {
+ molecule_structure_flags->MSS_is_fn_of_interp_coords = 0;
+ molecule_structure_flags->MSS_is_fn_of_which_operation = 0;
+ molecule_structure_flags->MSS_is_fn_of_input_array_values = 0;
+ molecule_structure_flags->Jacobian_is_fn_of_input_array_values = 0;
+ }
if (molecule_min_max_m_info != NULL)
then {
int axis;
diff --git a/src/GeneralizedPolynomial-Uniform/template.h b/src/GeneralizedPolynomial-Uniform/template.h
index 0c25fe1..0f3eaef 100644
--- a/src/GeneralizedPolynomial-Uniform/template.h
+++ b/src/GeneralizedPolynomial-Uniform/template.h
@@ -33,4 +33,4 @@ int FUNCTION_NAME(/***** coordinate system *****/
struct error_flags *error_flags,
struct molecule_structure_flags *molecule_structure_flags,
struct molecule_min_max_m_info *molecule_min_max_m_info,
- CCTK_INT* molecule_positions[]);
+ CCTK_INT* const molecule_positions[]);