My Project
programmer's documentation
|
#include "cs_defs.h"
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "bft_mem.h"
#include "bft_printf.h"
#include "cs_ext_neighborhood.h"
#include "cs_field.h"
#include "cs_map.h"
#include "cs_measures_util.h"
#include "cs_mesh.h"
#include "cs_mesh_adjacencies.h"
#include "cs_mesh_quantities.h"
#include "cs_parall.h"
#include "cs_math.h"
#include "cs_time_step.h"
#include "cs_at_opt_interp.h"
Functions | |
cs_at_opt_interp_t * | cs_at_opt_interp_create (const char *name) |
Create an optimal interpolation descriptor. More... | |
cs_at_opt_interp_t * | cs_at_opt_interp_by_id (int id) |
Return a pointer to an optimal interpolation based on its id. More... | |
cs_at_opt_interp_t * | cs_at_opt_interp_by_name (const char *name) |
Return a pointer to an optimal interpolation based on its name. More... | |
void | cs_at_opt_interps_destroy (void) |
Destroy all defined optimal interpolations. More... | |
void | cs_at_opt_interp_read_file (char const filename[50], cs_measures_set_t *ms, cs_at_opt_interp_t *oi, const int f_dim) |
Read an optimal interpolation file for a given variable and fill in the matching measures set and optimal interpolation structures. More... | |
int | cs_at_opt_interp_is_p1_proj_needed (void) |
Return 1 if a p1 projection has been enabled for at least one optimal interpolation. This function is used to determine if extended neighborhood is needed. More... | |
void | cs_at_opt_interp_map_values (cs_at_opt_interp_t *oi, cs_measures_set_t *ms) |
(re)Allocate and fill in an optimal interpolation structure from an optimal interpolation file. More... | |
void | cs_at_opt_interp_obs_operator (cs_measures_set_t *ms, cs_at_opt_interp_t *oi, cs_interpol_grid_t *ig) |
Compute observation operator (H). More... | |
void | cs_at_opt_interp_project_model_covariance (cs_measures_set_t *ms, cs_at_opt_interp_t *oi) |
Compute $\tens{H}\tens{B}\transpose{\tens{H}}$. More... | |
int * | cs_at_opt_interp_get_active_obs (cs_measures_set_t *ms, cs_at_opt_interp_t *oi, cs_field_t *f_oia, bool **inverse, int ***ao_idx) |
Count active observations and compute time weights in case of unsteady. More... | |
void | cs_at_opt_interp_compute_analysis (cs_field_t *f, cs_at_opt_interp_t *oi, cs_field_t *f_oia, int n_active_obs, int *ao_idx, bool inverse, int mc_id) |
Compute analysis for a given variable. More... | |
Optimal interpolation functions.
cs_at_opt_interp_t* cs_at_opt_interp_by_id | ( | int | id | ) |
Return a pointer to an optimal interpolation based on its id.
This function requires that an optimal interpolation of the given id is defined.
[in] | id | optimal interpolation id |
cs_at_opt_interp_t* cs_at_opt_interp_by_name | ( | const char * | name | ) |
Return a pointer to an optimal interpolation based on its name.
This function requires that an optimal interpolation of the given name is defined.
[in] | name | optimal interpolation name |
void cs_at_opt_interp_compute_analysis | ( | cs_field_t * | f, |
cs_at_opt_interp_t * | oi, | ||
cs_field_t * | f_oia, | ||
int | n_active_obs, | ||
int * | ao_idx, | ||
bool | inverse, | ||
int | mc_id | ||
) |
Compute analysis for a given variable.
[in] | f | field variable of which analysis will be computed |
[in] | oi | optimal interpolation for field variable |
[in] | f_oia | analysis field of field variable |
[in] | n_active_obs | number of active observations. |
[in] | ao_idx | index of active observations |
[in] | inverse | boolean, true if it necessary to recompute the inverse of HB(H) |
cs_at_opt_interp_t* cs_at_opt_interp_create | ( | const char * | name | ) |
Create an optimal interpolation descriptor.
[in] | name | optimal interpolation name |
int* cs_at_opt_interp_get_active_obs | ( | cs_measures_set_t * | ms, |
cs_at_opt_interp_t * | oi, | ||
cs_field_t * | f_oia, | ||
bool ** | inverse, | ||
int *** | ao_idx | ||
) |
Count active observations and compute time weights in case of unsteady.
[in] | ms | pointer to measures set |
[in] | oi | optimal interpolation for field variable |
[in] | f_oia | analysis field of field variable |
[in] | inverse | boolean, true if it necessary to recompute the inverse of HB(H) |
[in] | ao_idx | index of active observations |
int cs_at_opt_interp_is_p1_proj_needed | ( | void | ) |
Return 1 if a p1 projection has been enabled for at least one optimal interpolation. This function is used to determine if extended neighborhood is needed.
void cs_at_opt_interp_map_values | ( | cs_at_opt_interp_t * | oi, |
cs_measures_set_t * | ms | ||
) |
(re)Allocate and fill in an optimal interpolation structure from an optimal interpolation file.
[in] | oi | pointer to the optimal interpolation |
[in] | ms | pointer to the associated measures set |
void cs_at_opt_interp_obs_operator | ( | cs_measures_set_t * | ms, |
cs_at_opt_interp_t * | oi, | ||
cs_interpol_grid_t * | ig | ||
) |
Compute observation operator (H).
[in] | ms | pointer to measures set |
[in] | oi | pointer to an optimal interpolation |
[in] | ig | pointer to interpol grid |
void cs_at_opt_interp_project_model_covariance | ( | cs_measures_set_t * | ms, |
cs_at_opt_interp_t * | oi | ||
) |
Compute $\tens{H}\tens{B}\transpose{\tens{H}}$.
[in] | ms | pointer to measures set |
[in] | oi | pointer to an optimal interpolation |
void cs_at_opt_interp_read_file | ( | char const | filename[50], |
cs_measures_set_t * | ms, | ||
cs_at_opt_interp_t * | oi, | ||
const int | f_dim | ||
) |
Read an optimal interpolation file for a given variable and fill in the matching measures set and optimal interpolation structures.
[in] | filename | name of interpolation file |
[in] | ms | measures set structure |
[in] | oi | optimal interpolation structure |
[in] | f_dim | dimension of field |
void cs_at_opt_interps_destroy | ( | void | ) |
Destroy all defined optimal interpolations.