00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159 #ifndef _mmh_intf_
00160 #define _mmh_intf_
00161
00162 #include <stdio.h>
00163
00164 #ifdef __cplusplus
00165 extern "C"{
00166 #endif
00167
00174 #define MMC_MAXELFAC 5
00175 #define MMC_MAXFAVNO 4
00176 #define MMC_MAXELVNO 6
00177 #define MMC_MAXELSONS 8
00178 #define MMC_MAXELEDGES 9
00180 extern const int MMC_MAX_EDGE_ELEMS;
00181
00182 extern const int MMC_CUR_MESH_ID;
00183 extern const int MMC_INIT_GEN_LEVEL;
00184
00186 typedef enum {
00187 MMC_MOD_FEM_MESH_DATA = 0,
00188 MMC_MOD_FEM_PRISM_DATA = 1,
00189 MMC_MOD_FEM_TETRA_DATA = 2,
00190 MMC_MOD_FEM_HYBRID_DATA = 3,
00191 MMC_GRADMESH_DATA = 10,
00192 MMC_HP_FEM_MESH_DATA = 1,
00193 MMC_NASTRAN_DATA = (int)'n',
00194 MMC_NASTRAN_FREE_DATA = MMC_NASTRAN_DATA,
00195 MMC_NASTRAN_SHORT_DATA = (int)'s',
00196 MMC_NASTRAN_LONG_DATA = (int)'l',
00197 MMC_BINARY_DATA = (int)'b',
00198 MMC_BOUND_VERTS_DATA = (int)'m',
00199 MMC_IN_ANSYS_DATA = (int)'i',
00200 MMC_PARAVIEW_VTK_DATA = (int)'v',
00201 MMC_MSH_DATA = (int)'f',
00202 MMC_MAX_FILE_TYPE=126
00203 } mmt_file_type;
00204
00205
00206 extern const int MMC_AUTO_GENERATE_ID;
00207
00209 extern const int MMC_BOUNDARY;
00210 extern const int MMC_BIG_NGB;
00211 extern const int MMC_SUB_BND;
00214
00215 typedef enum {
00216 MMC_NODE = 0,
00217 MMC_EDGE = 1,
00218 MMC_FACE = 2,
00219 MMC_ELEMENT = 3,
00220 MMC_ALL_N_TYPES
00221 } mmt_mesh_entity;
00222
00224 typedef enum {
00225 MMC_QUAD = 4,
00226 MMC_TRIA = 3,
00227 MMC_TETRA = 7,
00228 MMC_PRISM = 5,
00229 MMC_BRICK = 6,
00230 MMC_ENTITY_UNKNOWN = -1
00231 } mmt_mesh_entity_types;
00232
00233
00234
00236 extern const int MMC_DO_UNI_REF;
00237 extern const int MMC_DO_UNI_DEREF;
00240 extern const int MMC_ACTIVE;
00241 extern const int MMC_INACTIVE;
00242 extern const int MMC_FREE;
00245 extern const int MMC_PRINT_NOT;
00246 extern const int MMC_PRINT_ERRORS;
00247 extern const int MMC_PRINT_INFO;
00248 extern const int MMC_PRINT_ALLINFO;
00251 extern const int MMC_NOT_REF;
00252 extern const int MMC_REF_ISO;
00253 extern const int MMC_REF_ANI;
00256 extern const int MMC_INIT_GEN_LEVEL;
00257 extern const int MMC_NO_FATH;
00259 extern const int MMC_FACE_NODES_FOR_TETRA[4][3];
00260 extern const int MMC_FACE_NODES_FOR_PRISM[5][4];
00261
00262 extern const int MMC_IS_SUPPORTING_NEW_MPI;
00263
00271 extern int mmr_module_introduce(
00273 char* Mesh_name
00274 );
00275
00279 extern void* mmr_module_internals(
00281 int Mesh_id
00282 );
00283
00284
00288 extern int mmr_init_mesh(
00289 int Control,
00292 char *Filename,
00293 FILE* interactive_output
00294 );
00295
00296
00297
00298
00299
00300
00301
00302
00303 extern int mmr_init_mesh2(
00304 FILE* Interactive_output,
00305 const int N_nodes,
00306 const int N_edges,
00307 const int N_faces,
00308 const int N_elems
00309 );
00310
00314 extern int mmr_export_mesh(
00315 int Mesh_id,
00316 int Control,
00318 char *Filename
00319 );
00320
00324 extern int mmr_test_mesh(
00325 int Mesh_id
00326 );
00327
00331 int mmr_mesh_i_params(
00333 int Mesh_id,
00334 int Num
00335 );
00336
00340 extern int mmr_get_nr_elem(
00342 int Mesh_id
00343 );
00344
00348 extern int mmr_get_max_elem_id(
00350 int Mesh_id
00351 );
00352
00356 extern int mmr_get_next_act_elem(
00359 int Mesh_id,
00360 int Nel
00361 );
00362
00366 extern int mmr_get_next_elem_all(
00369 int Mesh_id,
00370 int Nel
00371 );
00372
00376 extern int mmr_get_nr_face(
00378 int Mesh_id
00379 );
00380
00384 extern int mmr_get_max_face_id(
00386 int Mesh_id
00387 );
00388
00392 extern int mmr_get_next_act_face(
00395 int Mesh_id,
00396 int Nfa
00397 );
00398
00402 extern int mmr_get_next_face_all(
00405 int Mesh_id,
00406 int Nfa
00407 );
00408
00412 extern int mmr_get_nr_edge(
00414 int Mesh_id
00415 );
00416
00420 extern int mmr_get_max_edge_id(
00422 int Mesh_id
00423 );
00424
00428 extern int mmr_get_next_edge_all(
00431 int Mesh_id,
00432 int Ned
00433 );
00434
00438 extern int mmr_get_nr_node(
00440 int Mesh_id
00441 );
00442
00446 extern int mmr_get_max_node_id(
00448 int Mesh_id
00449 );
00450
00454 extern int mmr_get_next_node_all(
00457 int Mesh_id,
00458 int Nno
00459 );
00460
00464 extern int mmr_get_max_gen(
00466 int Mesh_id
00467 );
00468
00472 extern int mmr_set_max_gen(
00473 int Mesh_id,
00474 int Max_gen
00475 );
00476
00481 extern int mmr_get_max_gen_diff(
00483 int Mesh_id
00484 );
00485
00490 extern int mmr_set_max_gen_diff(
00491 int Mesh_id,
00492 int Max_gen_diff
00493 );
00494
00498 extern int mmr_init_ref(
00499 int Mesh_id
00500 );
00501
00505 int mmr_refine_el(
00506 int Mesh_id,
00507 int El
00508 );
00509
00513 int mmr_derefine_el(
00514 int Mesh_id,
00515 int El
00516 );
00517
00521 int mmr_refine_mesh(
00522 int Mesh_id
00523 );
00524
00528 int mmr_derefine_mesh(
00529 int Mesh_id
00530 );
00531
00536 extern int mmr_is_ready_for_proj_dof_ref(
00537 int Mesh_id
00538 );
00539
00543 extern int mmr_r_refine(
00544 int Mesh_id,
00545 int Bc,
00547 void (*reallocation_func)(double * x,double * y, double * z)
00549 );
00550
00554 extern int mmr_gen_boundary_layer(
00556 int Mesh_id,
00557 int Bc,
00559 int thicknessProc,
00560
00561 int noLayers,
00562 int distribuiton,
00563 double * ignoreVect
00564 );
00565
00569 extern int mmr_final_ref(
00570 int Mesh_id
00571 );
00572
00576 extern int mmr_free_mesh(
00577 int Mesh_id
00578 );
00579
00580
00584 extern int mmr_elem_structure(
00585 int Mesh_id,
00586 int El,
00587 int* Elem_struct
00588 );
00589
00593 extern int mmr_el_status(
00597 int Mesh_id,
00598 int El
00599 );
00600
00601
00605 extern int mmr_el_type(
00606
00607
00608
00609
00610 int Mesh_id,
00611 int El
00612 );
00613
00628 extern int mmr_el_groupID(
00629 int Mesh_id,
00630 int El
00631 );
00632
00648 extern int mmr_el_set_groupID(
00649 int Mesh_id,
00650 int El,
00651 int Group_id
00652 );
00653
00657 extern int mmr_el_type_ref(
00661 int Mesh_id,
00662 int El
00663 );
00664
00668 extern int mmr_el_faces(
00669 int Mesh_id,
00670 int El,
00671 int* Faces,
00672
00673 int* Orient
00674
00675
00676 );
00677
00681 extern int mmr_el_node_coor(
00682 int Mesh_id,
00683 int El,
00684 int* Nodes,
00685
00686 double* Node_coor
00687 );
00688
00692 int mmr_el_edges(
00693 int Mesh_id,
00694 int El,
00695 int* Edges
00696
00697 );
00698
00702 extern int mmr_el_fam(
00704 int Mesh_id,
00705 int El,
00706 int *Elsons,
00708 int *Type
00711 );
00712
00713
00714
00715
00716 extern int mmr_el_fam_all(
00718 int Mesh_id,
00719 int El,
00720 int *Elsonscd
00722 );
00723
00724
00728 extern int mmr_el_gen(
00729 int Mesh_id,
00730 int El
00731 );
00732
00737 extern int mmr_el_ancestor(
00738 int Mesh_id,
00739 int El,
00740 int Ilev
00741 );
00742
00747 extern double mmr_el_hsize(
00748 int Mesh_id,
00749 int El,
00750 double *Size_x,
00751 double *Size_y,
00752 double *Size_z
00753 );
00754
00758 extern int mmr_el_eq_neig(
00759 int Mesh_id,
00760 int El,
00761 int* Neig,
00765 int* Neig_sides
00766 );
00767
00771 extern int mmr_face_structure(
00772 int Mesh_id,
00773 int Fa,
00774 int* Face_struct
00775 );
00776
00780 extern int mmr_fa_status(
00781
00782
00783
00784 int Mesh_id,
00785 int Fa
00786 );
00787
00791 extern int mmr_fa_type(
00792
00793
00794
00795 int Mesh_id,
00796 int Fa
00797 );
00798
00802 extern int mmr_fa_bc(
00803 int Mesh_id,
00804 int Fa
00805 );
00806
00810 extern int mmr_fa_set_bc(
00811 int Mesh_id,
00812 int Fa,
00813 int Bc_num
00814 );
00815
00816
00820 extern int mmr_fa_sub_bnd(
00821 int Mesh_id,
00822 int Face_id
00823 );
00824
00828 extern int mmr_fa_set_sub_bnd(
00829 int Mesh_id,
00830 int Face_id,
00831 int Side_id
00832 );
00833
00837 extern int mmr_fa_edges(
00838 int Mesh_id,
00839 int Fa,
00840 int *Fa_edges,
00841 int *Ed_orient
00842
00843
00844 );
00845
00851 extern void mmr_fa_eq_neig(
00852 int Mesh_id,
00853 int Fa,
00854 int *Fa_neig,
00863 int *Neig_sides,
00864 int *Node_shift
00865
00867 );
00868
00874 extern void mmr_fa_neig(
00875 int Mesh_id,
00876 int Fa,
00877 int *Fa_neig,
00884 int *Neig_sides,
00885 int *Node_shift,
00886
00888 int *Diff_gen,
00889 double *Acoeff,
00890 double *Bcoeff
00893 );
00894
00898 extern int mmr_fa_fam(
00899 int Mesh_id,
00900 int Fa,
00901 int* Fasons,
00903 int* Node_mid
00904 );
00905
00909 extern int mmr_fa_node_coor(
00910 int Mesh_id,
00911 int Fa,
00912 int* Nodes,
00913 double* Node_coor
00914 );
00915
00916
00920 extern int mmr_el_fa_nodes(
00921 int Mesh_id,
00922 int El,
00923 int Fa,
00924 int *Fa_nodes
00925 );
00926
00931 extern void mmr_fa_elem_coor(
00932 int Mesh_id,
00933 double *Xloc,
00934 int *Fa_neig,
00935
00936
00937 int *Neig_sides,
00938 int Node_shift,
00939
00941 double *Acoeff,
00942 double *Bcoeff,
00943 double *Xneig
00944 );
00945
00949 extern void mmr_fa_area(
00950 int Mesh_id,
00951 int Fa,
00952 double *Area,
00953 double *Vec_norm
00954 );
00955
00959 extern int mmr_edge_status(
00963 int Mesh_id,
00964 int Ed
00965 );
00966
00970 extern int mmr_edge_nodes(
00971 int Mesh_id,
00972 int Ed,
00973 int *Edge_nodes
00974 );
00975
00979 extern int mmr_edge_elems(
00980 int Mesh_id,
00981 int Ed,
00982 int *Edge_elems
00984 );
00985
00990 int mmr_create_edge_elems(
00991 int Mesh_id,
00992 int Max_edge_id
00994 );
00995
00999 extern int mmr_edge_sons(
01000 int Mesh_id,
01001 int Ed,
01002 int *Edge_sons,
01003 int *Edge_mid_node
01004 );
01005
01009 extern int mmr_edge_structure(
01010 int Mesh_id,
01011 int Ed,
01012 int* Edge_struct
01013 );
01014
01018 extern int mmr_set_edge_type(
01019 int Mesh_id,
01020 int Edge_id,
01021 int Type
01022 );
01023
01027 extern int mmr_set_edge_fam(
01028 int Mesh_id,
01029 int Edge_id,
01030 int Son1,
01031 int Son2
01032 );
01033
01037 extern int mmr_set_face_fam(
01038 int Mesh_id,
01039 int Face_id,
01040 int *Sons
01041 );
01042
01046 extern int mmr_set_face_neig(
01047 int Mesh_id,
01048 int Face_id,
01049 int Neig1,
01050 int Neig2,
01051 int Neig1Type,
01052 int Neig2Type
01053 );
01054
01058 int mmr_set_elem_fath(
01059 int Mesh_id,
01060 int Elem_id,
01061 int Fath
01062 );
01063
01067 extern int mmr_set_elem_fam(
01068 int Mesh_id,
01069 int Elem_id,
01070 int Fath,
01071 int *Sons
01072 );
01073
01077 extern int mmr_node_status(
01080 int Mesh_id,
01081 int Node
01082 );
01083
01087 extern int mmr_node_coor(
01088 int Mesh_id,
01089 int Node,
01090 double *Coor
01091 );
01092
01093
01094
01095
01096 extern int mmr_set_node_coor(
01097 int Mesh_id,
01098 int Node,
01099 double *Xcoor
01100 );
01101
01102
01103
01104
01105 extern int mmr_move_node(
01106 int Mesh_id,
01107 int Node,
01108 double *Dx
01109 );
01110
01115 extern int mmr_loc_loc(
01116 int Mesh_id,
01117 int El_from,
01118 double* X_from,
01119 int El_to,
01120 double* X_to
01121 );
01122
01123 extern int mmr_create_element(
01125 int Mesh_id,
01126 int Type,
01127 int Mate,
01128 int Fath,
01129 int Refi,
01130 int* Faces,
01131 int* Sons
01132 );
01133
01134 extern int mmr_create_face(
01135 int Mesh_id,
01136 int Type,
01137 int Flag_bc,
01138 int* Edges,
01139 int* Neig,
01140 int* Sons
01141 );
01142
01143 extern int mmr_create_edge(
01144 int Mesh_id,
01145 int Type,
01147 int Node1,
01148 int Node2
01149 );
01150
01151 extern int mmr_create_node(
01152 int Mesh_id,
01153 double Xcoor,
01154 double Ycoor,
01155 double Zcoor
01156 );
01157
01158 extern int mmr_clust_face(
01159 int Mesh_id,
01160 int Face,
01161 int* Face_sons
01162 );
01163
01164 extern int mmr_clust_edge(
01165 int Mesh_id,
01166 int Edge_id
01167 );
01168
01169
01170 extern int mmr_divide_face(
01171 int Mesh_id,
01172 int Fa,
01173 int* Face_sons,
01174 int* Sons_edges,
01175 int* New_nodes
01176 );
01177
01178 extern int mmr_divide_edge(
01179 int Mesh_id,
01180 int Edge,
01181 int* Edge_sons,
01182 int* Node_mid
01183 );
01184
01188 extern int mmr_del_elem(
01189 int Mesh_id,
01190 int Elem
01191 );
01192
01196 extern int mmr_del_face(
01197 int Mesh_id,
01198 int Face
01199 );
01200
01204 extern int mmr_del_edge(
01205 int Mesh_id,
01206 int Edge
01207 );
01208
01212 extern int mmr_del_node(
01213 int Mesh_id,
01214 int Node
01215 );
01216
01220 extern int mmr_get_max_elem_max(
01222 int Mesh_id
01223 );
01224
01228 extern int mmr_get_max_face_max(
01230 int Mesh_id
01231 );
01232
01236 extern int mmr_get_max_edge_max(
01238 int Mesh_id
01239 );
01240
01244 extern int mmr_get_max_node_max(
01246 int Mesh_id
01247 );
01248
01249
01250
01251
01252
01253
01261 extern int mmr_init_read(
01262 const int Mesh_id,
01263 const int N_nodes,
01264 const int N_edges,
01265 const int N_faces,
01266 const int N_elems
01267 );
01268
01269
01270 extern int mmr_finish_read(
01271 const int Mesh_id
01272 );
01273
01274
01275
01276
01277
01278 extern int mmr_add_elem(
01279 const int Mesh_id,
01280 const int Id,
01281 const int El_type,
01282 const int El_nodes[6],
01283 const int El_faces[5]
01284 , const int Material_idx);
01285
01286
01287
01288
01289
01290
01291 extern int mmr_add_face(
01292 const int Mesh_id,
01293 const int Id,
01294 const int Fa_type,
01295 const int Fa_nodes[4],
01296 const int Fa_edges[4],
01297 const int Fa_neigs[2]
01298 , const int B_cond_val);
01299
01300
01301
01302
01303
01304
01305 extern int mmr_add_edge(
01306 const int Mesh_id,
01307 const int Id,
01308 const int nodes[2]
01309 );
01310
01311
01312
01313
01314
01315 extern int mmr_add_node(
01316 const int Mesh_id,
01317 const int Id,
01318 const double Coords[3]
01319 );
01320
01321
01322
01330 extern int mmr_current_mesh_state_hash(
01331 const int Mesh_id);
01332
01333
01334
01335
01336
01337
01341 extern int mmr_init_dist2bound(
01342 const int Mesh_id,
01343 const int* BCs,
01344 const int nBCs);
01345
01346
01350 extern double mmr_get_el_dist2boundary(
01352 const int Mesh_id,
01353 const int El_id,
01354 const double * Coord);
01355
01356
01357
01358 extern void mmr_get_coor_from_motion_element(
01359 const int Mesh_id,
01360 int idEl,
01361 int idLP,
01362 double *coor,
01363 int flagaSiatki
01364 );
01365
01370 extern void mmr_copyMESH(const int Mesh_id,int flaga);
01371
01372
01377 extern void mmr_create_mesh_Cube(
01378 const int Mesh_id,
01379 const char *nazwa,
01380 int node_x,
01381 int node_y,
01382 int node_z,
01383 double size_x,
01384 double size_y,
01385 double size_z,
01386 double divide,
01387 int *warunki
01388 );
01389
01394 extern void mmr_init_all_change(const int Mesh_id,int a);
01395
01396 extern void mmr_test_mesh_motion(const int Mesh_id,int ileWarstw,int obecny_krok, int od_krok,int ileKrok,double minPoprawy,double px0,double py0,double pz0,double px1,double py1,double pz1,double endX,double endY,double endZ);
01397
01398 extern double mmr_test_weldpool(const int Mesh_id,double obecnyKrok, double krok_start,double minPoprawy,double doX,double doY,double dl,double zmiejszaPrzes,double limit,double szerokosc);
01399
01400
01401 extern int mmr_groups_number(const int Mesh_id);
01402 extern int mmr_groups_ids(const int Mesh_id, int *tab, int l_tab);
01403
01412
01413 extern void mmr_get_vec_norm_at_node(const int Mesh_id,int node_id,double *vec_norm);
01414
01415 extern int mmr_get_fa_el_bc_connect(
01416 const int Mesh_id,
01417 int face_id,
01418 int *el_id
01419 );
01420
01422
01423
01424 #ifdef __cplusplus
01425 }
01426 #endif
01427
01428 #endif