Skip to content

Commit

Permalink
parse av flags from egads attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Park authored and Mike Park committed Apr 27, 2021
1 parent 0816f8c commit b364307
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/ref_phys.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <math.h>
#include <string.h>

#include "ref_egads.h"
#include "ref_malloc.h"
#include "ref_math.h"
#include "ref_recon.h"
Expand Down Expand Up @@ -385,6 +386,23 @@ REF_STATUS ref_phys_parse_tags(REF_DICT ref_dict, const char *tags) {
return REF_SUCCESS;
}

REF_STATUS ref_phys_av_tag_attributes(REF_DICT ref_dict, REF_GEOM ref_geom) {
const char *patch_type;
REF_INT id, type;
REF_STATUS ref_status;
each_ref_geom_face_id(ref_geom, id) {
ref_status = ref_egads_get_attribute(ref_geom, REF_GEOM_FACE, id,
"av:patch_type", &patch_type);
if (REF_SUCCESS == ref_status) {
if (0 == strcmp("noslipwall", patch_type)) {
type = 4000;
RSS(ref_dict_store(ref_dict, id, type), "store");
}
}
}
return REF_SUCCESS;
}

/* continuous galerkin spike
for (equ = 0; equ < nequ; equ++) {
each_ref_cell_valid_cell_with_nodes(ref_cell, cell, nodes) {
Expand Down
2 changes: 2 additions & 0 deletions src/ref_phys.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include "ref_defs.h"
#include "ref_dict.h"
#include "ref_geom.h"
#include "ref_grid.h"

BEGIN_C_DECLORATION
Expand Down Expand Up @@ -51,6 +52,7 @@ REF_STATUS ref_phys_mask_strong_bcs(REF_GRID ref_grid, REF_DICT ref_dict,

REF_STATUS ref_phys_read_mapbc(REF_DICT ref_dict, const char *mapbc_filename);
REF_STATUS ref_phys_parse_tags(REF_DICT ref_dict, const char *tags);
REF_STATUS ref_phys_av_tag_attributes(REF_DICT ref_dict, REF_GEOM ref_geom);

REF_STATUS ref_phys_cc_fv_res(REF_GRID ref_grid, REF_INT nequ, REF_DBL *flux,
REF_DBL *res);
Expand Down

0 comments on commit b364307

Please sign in to comment.