My Project
programmer's documentation
Data Structures | Enumerations | Functions
cs_at_opt_interp.h File Reference
#include "cs_defs.h"
#include "cs_field.h"
#include "cs_measures_util.h"
Include dependency graph for cs_at_opt_interp.h:

Go to the source code of this file.

Data Structures

struct  cs_at_opt_interp_t
 

Enumerations

enum  cs_at_opt_interp_type_t { CS_AT_OPT_INTERP_P0, CS_AT_OPT_INTERP_P1 }
 

Functions

cs_at_opt_interp_tcs_at_opt_interp_create (const char *name)
 Create an optimal interpolation descriptor. More...
 
cs_at_opt_interp_tcs_at_opt_interp_by_id (int id)
 Return a pointer to an optimal interpolation based on its id. More...
 
cs_at_opt_interp_tcs_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...
 

Enumeration Type Documentation

◆ cs_at_opt_interp_type_t

Enumerator
CS_AT_OPT_INTERP_P0 
CS_AT_OPT_INTERP_P1 

Function Documentation

◆ cs_at_opt_interp_by_id()

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.

Parameters
[in]idoptimal interpolation id
Returns
pointer to the optimal interpolation structure.

◆ cs_at_opt_interp_by_name()

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.

Parameters
[in]nameoptimal interpolation name
Returns
pointer to the optimal interpolation structure.

◆ cs_at_opt_interp_compute_analysis()

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.

Parameters
[in]ffield variable of which analysis will be computed
[in]oioptimal interpolation for field variable
[in]f_oiaanalysis field of field variable
[in]n_active_obsnumber of active observations.
[in]ao_idxindex of active observations
[in]inverseboolean, true if it necessary to recompute the inverse of HB(H)

◆ cs_at_opt_interp_create()

cs_at_opt_interp_t* cs_at_opt_interp_create ( const char *  name)

Create an optimal interpolation descriptor.

Parameters
[in]nameoptimal interpolation name

◆ cs_at_opt_interp_get_active_obs()

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.

Parameters
[in]mspointer to measures set
[in]oioptimal interpolation for field variable
[in]f_oiaanalysis field of field variable
[in]inverseboolean, true if it necessary to recompute the inverse of HB(H)
[in]ao_idxindex of active observations
Returns
number of active observations.
Parameters
[in]mspointer to measures set
[in]oioptimal interpolation for field variable
[in]f_oiaanalysis field of field variable
[in]inverseboolean, true if it necessary to recompute the inverse of HB(H)
[in]ao_idxindex of active observations
Returns
number of active observations for each measures component.

◆ cs_at_opt_interp_is_p1_proj_needed()

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.

Returns
1 if a p1 proj. is needed, 0 otherwise.

◆ cs_at_opt_interp_map_values()

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.

Parameters
[in]oipointer to the optimal interpolation
[in]mspointer to the associated measures set

◆ cs_at_opt_interp_obs_operator()

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).

Parameters
[in]mspointer to measures set
[in]oipointer to an optimal interpolation
[in]igpointer to interpol grid

◆ cs_at_opt_interp_project_model_covariance()

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}}$.

Parameters
[in]mspointer to measures set
[in]oipointer to an optimal interpolation

◆ cs_at_opt_interp_read_file()

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.

Parameters
[in]filenamename of interpolation file
[in]msmeasures set structure
[in]oioptimal interpolation structure
[in]f_dimdimension of field

◆ cs_at_opt_interps_destroy()

void cs_at_opt_interps_destroy ( void  )

Destroy all defined optimal interpolations.