#include "base/cs_defs.h"#include <float.h>#include <assert.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <limits.h>#include <math.h>#include <mpi.h>#include "bft/bft_error.h"#include "bft/bft_printf.h"#include "fvm/fvm_io_num.h"#include "fvm/fvm_triangulate.h"#include "alge/cs_cell_to_vertex.h"#include "alge/cs_gradient.h"#include "alge/cs_matrix_default.h"#include "base/cs_array.h"#include "base/cs_boundary_conditions.h"#include "base/cs_ext_neighborhood.h"#include "base/cs_field.h"#include "base/cs_field_default.h"#include "base/cs_field_operator.h"#include "base/cs_field_pointer.h"#include "base/cs_math.h"#include "base/cs_mem.h"#include "base/cs_parall.h"#include "base/cs_renumber.h"#include "base/cs_physical_constants.h"#include "base/cs_renumber_update.h"#include "base/cs_timer_stats.h"#include "mesh/cs_mesh.h"#include "mesh/cs_mesh_adjacencies.h"#include "mesh/cs_mesh_coarsen.h"#include "mesh/cs_mesh_coherency.h"#include "mesh/cs_mesh_location.h"#include "mesh/cs_mesh_quantities.h"#include "mesh/cs_mesh_refine.h"#include "mesh/cs_redistribute.h"#include "mesh/cs_partition.h"#include "mesh/cs_mesh_adaptive_refinement.h"
Include dependency graph for cs_mesh_adaptive_refinement.cpp:Functions | |
| static void | _build_cell_r_level (cs_mesh_t *m, int *c_r_level) |
| static void | _realloc_and_update_field_refinement (cs_field_t *f, const cs_lnum_t n_old, const cs_lnum_t o2n_idx[], const cs_lnum_t new_idx[], const cs_real_3_t cog[], const cs_real_3_t cell_cen[], const cs_real_t measure[]) |
| static void | _realloc_and_update_bc_coeffs_refinement (const cs_field_t *f, const cs_lnum_t n_old, const cs_lnum_t o2n_idx[]) |
| static void | _realloc_and_update_field_coarsening (cs_field_t *f, const cs_lnum_t n_old, const cs_lnum_t n2o_idx[], const cs_lnum_t n2o[], const cs_real_t measure[], const cs_lnum_t i_face_map[]) |
| static void | _realloc_and_update_bc_coeffs_coarsening (cs_field_t *f, const cs_lnum_t n_old, const cs_lnum_t n2o_idx[], const cs_lnum_t n2o[], const cs_real_t measure[]) |
| static void | _halo_sync_std_owner (cs_field_t *f, const cs_halo_t *halo) |
| Sync a standard field. More... | |
| static void | _halo_sync_series_owner (cs_field_t *f, const cs_halo_t *halo) |
| Sync a field which is a series owner and has subfields. More... | |
| static void | _halo_sync (cs_field_t *f) |
| Sync a field. More... | |
| static void | _realloc_and_interp_after_refinement (cs_mesh_t *mesh, int location_id, const cs_lnum_t n_i_elts, const cs_lnum_t o2n_idx[], const cs_lnum_t new_idx[], const cs_real_3_t o_cog[], const cs_real_3_t n_cog[], const cs_real_t measure[]) |
| static void | _realloc_and_interp_after_coarsening (cs_mesh_t *mesh, int location_id, const cs_lnum_t n_i_elts, const cs_lnum_t n2o_idx[], const cs_lnum_t n2o[], const cs_real_t measure[], const cs_lnum_t i_face_map[]) |
| static void | _propagate_refinement (cs_mesh_t *m, int indic[]) |
| static void | _build_coarsen_refine_buffer_zone (cs_mesh_t *mesh, int indic[]) |
| static void | _load_balance (cs_mesh_t *mesh) |
| static void | _free_gradients (void) |
| static void | _update_mesh_quantities (cs_mesh_t *mesh) |
| static void | _update_boundary_conditions (void) |
| static void | _update_amr_mesh_data (cs_mesh_t *mesh) |
| static void | _refine_step (const int indic[]) |
| static void | _coarsen_step (const int indic[]) |
| static void | _amr_finalize (void) |
| Finalize AMR. More... | |
| void | cs_adaptive_refinement_define (int n_layers, int nt_interval, cs_amr_indicator_t *indic_func, const void *indic_input, int interpolation, bool load_balance) |
| Activation and Initializing af the global AMR structure. More... | |
| void | cs_adaptive_refinement_update_gradients (void) |
| Compute field gradients when necessary (for fields interpolation) More... | |
| void | cs_adaptive_refinement_free_gradients (void) |
| Free field gradients. More... | |
| void | cs_adaptive_refinement_step (void) |
| Perform a refinement / coarsening step. More... | |
Variables | |
| static cs_amr_info_t | _amr_info |
| cs_amr_info_t * | cs_glob_amr_info = &_amr_info |
| static cs_timer_counter_t | _amr_t_tot |
| static cs_timer_counter_t | _amr_t_coarsen |
| static cs_timer_counter_t | _amr_t_refine |
| static cs_timer_counter_t | _amr_t_data |
| static cs_timer_counter_t | _amr_t_load_balance |
| static cs_timer_counter_t | _amr_t_renumber |
| static int | _amr_stat_id = -1 |
|
static |
Finalize AMR.
This simply logs associated timers.
|
static |
|
static |
|
static |
|
static |
|
static |
Sync a field.
| [in] | f | pointer to cs_field_t |
|
static |
Sync a field which is a series owner and has subfields.
| [in] | f | pointer to cs_field_t |
| [in] | halo | pointer to cs_halo_t |
|
static |
Sync a standard field.
| [in] | f | pointer to cs_field_t |
| [in] | halo | pointer to cs_halo_t |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| void cs_adaptive_refinement_define | ( | int | n_layers, |
| int | nt_interval, | ||
| cs_amr_indicator_t * | indic_func, | ||
| const void * | indic_input, | ||
| int | interpolation, | ||
| bool | load_balance | ||
| ) |
Activation and Initializing af the global AMR structure.
| [in] | n_layers | number of layers of refinement around user criteria |
| [in] | nt_interval | time_step interval between adaptation steps |
| [in] | indic_func | user function marking cells that should be refined |
| [in] | indic_input | input for indic_func or nullptr |
| [in] | load_balance | activate load balancing post mesh adapation |
| void cs_adaptive_refinement_free_gradients | ( | void | ) |
Free field gradients.
| void cs_adaptive_refinement_step | ( | void | ) |
Perform a refinement / coarsening step.
| void cs_adaptive_refinement_update_gradients | ( | void | ) |
Compute field gradients when necessary (for fields interpolation)
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| cs_amr_info_t* cs_glob_amr_info = &_amr_info |