PanPhaseField SDK
|
PanDataNet/PanEngine API for Phase Field Model. More...
#include <pfm_sdk.h>
Public Member Functions | |
virtual int | PFDB_variables (PFM_SDK_Variables *variables, char *msg)=0 |
To extract the all the SDK variables defined in the current plugin. More... | |
virtual int | PFDB_matrix_parameter (PFM_SDK_Variables *variables, const char *tabletype, const char *parameter, double *value, char *msg)=0 |
To extract a PFDB parameter of the matrix phase. More... | |
virtual int | PFDB_phase_parameter (PFM_SDK_Variables *variables, const char *phasename, const char *tabletype, const char *parameter, double *value, char *msg)=0 |
To extract a PFDB parameter of a precipitate phase. More... | |
virtual int | PFDB_matrix_parameter_needs_update (const char *tabletype, const char *parameter, int *needs_update, char *msg)=0 |
To check if a specific matrix parameter needs a update. Typically, a parameter needs an update if it is function of SDK variables that evolves with time. More... | |
virtual int | PFDB_phase_parameter_needs_update (const char *phasename, const char *tabletype, const char *parameter, int *needs_update, char *msg)=0 |
To check if a parameter of precipitate phase needs a update. Typically, a parameter needs an update if it is function of SDK variables that evolves with time. More... | |
virtual int | PFDB_isexist_matrix (const char *tabletype, const char *parameter)=0 |
To check whether a parameter is defined in the matrix phase in the input *.pfdb file. More... | |
virtual int | PFDB_isexist_phase (const char *phasename, const char *tabletype, const char *parameter)=0 |
To check whether a parameter (of a precipitate phase) is defined in the matrix phase in the input *.pfdb file. More... | |
virtual int | PFDB_expression_value (PFM_SDK_Variables *variables, const char *expression, double *value)=0 |
To evaluate a mathematical expression that depends on the SDK variables. More... | |
virtual void | get_pt_val (int thread_id, int engine_id, PFM_SDK_Input_Condition *input, PFM_SDK_Output_Data *output, char *msg, int m_panengine_mode=0)=0 |
virtual void | get_pt_val_by_global (PFM_SDK_Input_Condition *input, PFM_SDK_Output_Data *output, char *msg, bool no_self_check=false)=0 |
virtual PFM_SDK_Protocal | get_phase_name_protocol (char *msg)=0 |
virtual PFM_SDK_Protocal | get_comp_name_protocol (char *msg)=0 |
virtual void | update_comp_name_protocal (PFM_SDK_Protocal *new_protocal, char *msg)=0 |
virtual int | get_num_threads ()=0 |
virtual void | get_cal_condition (PFM_SDK_Input_Condition *state, int engine_id)=0 |
virtual void | get_phase_names_by_initial_condition (char **&phase_names, size_t *n_names, int engine_id, char *msg)=0 |
virtual void | statistic_calc_cnt (int *new_point_cnt, int *reused_point_cnt)=0 |
Get counts of newly calculated points and reused points. More... | |
virtual void | file_save_sdk_intermediate (int *tot_sdk_file_size_KB)=0 |
Save intermedate files (binary fromat) and get the totla size of sdk intermediate files. The intermediate files are saved by SDK descontructor at the end of simulation. However, users are encouraged to save intermediate files during simulation. More... | |
virtual bool | nucleation_define_user (PF_ARGS *m_args, char *msg, bool single_thread=false)=0 |
Initialize SDK to calculate nucleation related properties. More... | |
virtual bool | nucleation_get_prop (PFM_SDK_Input_Condition *in, PFM_SDK_Output_Data *out, int thread_id, char *msg, int m_engine_mode=0)=0 |
Get precipitate composition, precipiate driving force and matrix mobility. More... | |
virtual bool | get_line_compound_info (int phase_id)=0 |
Get line compound info for a phase. More... | |
virtual void | nucleation_file_save_sdk_intermediate (int *tot_sdk_file_size_KB)=0 |
Save intermedate files (binary fromat) and get the totla size of sdk intermediate files. The intermediate files are saved by SDK descontructor at the end of simulation. However, users are encouraged to save intermediate files during simulation. More... | |
virtual shared_ptr< P_Point > | debug_get_cal_pt (int thread_id, int engine_id)=0 |
Get a copy of the PanEngine calculation point object. The returned object can be used to debug model calculations. More... | |
virtual int | verify_dongle_for_plugin (const char *plugin_name, char *msg)=0 |
To verify the dongle information for user's plugin. More... | |
PanDataNet/PanEngine API for Phase Field Model.
|
pure virtual |
To extract the all the SDK variables defined in the current plugin.
[out] | variables | To store the SDK variables with their initial values. |
[out] | msg | To store the error message if any |
|
pure virtual |
To extract a PFDB parameter of the matrix phase.
[in] | variables | SDK variables and their values. |
[in] | tabletype | The type of the parameter table. (eg: phase_field_general, custom, stiffness_tensor, etc ...) |
[in] | parameter | The name/type of the parameter. (eg: Chemical_Gradient_Factor, Interface_Width, etc ...) |
[out] | value | The value of the parameter. |
[out] | msg | Error message if any. |
|
pure virtual |
To extract a PFDB parameter of a precipitate phase.
[in] | variables | SDK variables and their values. |
[in] | phasename | The name of the phase that the parameter belongs to. |
[in] | tabletype | The type of the parameter table. (eg: custom, inter_phase, stiffness_tensor, etc ...) |
[in] | parameter | The name/type of the parameter. (eg: Atomic_Spacing, Interfacial_Energy, etc ...) |
[out] | value | The value of the parameter. |
[out] | msg | Error message if any. |
|
pure virtual |
To check if a specific matrix parameter needs a update. Typically, a parameter needs an update if it is function of SDK variables that evolves with time.
[in] | tabletype | The type of the parameter table. (eg: phase_field_general, custom, stiffness_tensor, etc ...) |
[in] | parameter | The name/type of the parameter. (eg: Chemical_Gradient_Factor, Interface_Width, etc ...) |
[out] | needs_update | 1 : If the parameter needs to be updated, 0 : If these is no need to update. |
[out] | msg | Error message if any. |
|
pure virtual |
To check if a parameter of precipitate phase needs a update. Typically, a parameter needs an update if it is function of SDK variables that evolves with time.
[in] | phasename | The name of the phase that the parameter belongs to. |
[in] | tabletype | The type of the parameter table. (eg: custom, inter_phase, stiffness_tensor, etc ...) |
[in] | parameter | The name/type of the parameter. (eg: Atomic_Spacing, Interfacial_Energy, etc ...) |
[out] | needs_update | 1 : If the parameter needs to be updated, 0 : If these is no need to update. |
[out] | msg | Error message if any. |
|
pure virtual |
To check whether a parameter is defined in the matrix phase in the input *.pfdb file.
[in] | tabletype | The type of the parameter table. (eg: phase_field_general, custom, stiffness_tensor, etc ...) |
[in] | parameter | The name/type of the parameter. (eg: Chemical_Gradient_Factor, Interface_Width, etc ...) |
|
pure virtual |
To check whether a parameter (of a precipitate phase) is defined in the matrix phase in the input *.pfdb file.
phasename | The name of the phase that the parameter belongs to. |
tabletype | The type of the parameter table. (eg: custom, inter_phase, stiffness_tensor, etc ...) |
parameter | The name/type of the parameter. (eg: Atomic_Spacing, Interfacial_Energy, etc ...) |
|
pure virtual |
To evaluate a mathematical expression that depends on the SDK variables.
[in] | variables | SDK variables and their values. |
[in] | expression | Mathematical expression. |
[out] | value | The value of the expression. |
|
pure virtual |
Do a point calculation using an engine
[in] | thread_id | the id of the thread (if the thread_id is beyong available number of thread, the first thread will be used). Use PFM_SDK::get_num_threads to get total number of threads |
[in] | engine_id | the id of the engine in the selected thread. engine_id follows the rule: (1) When only one phase is active, for example in spinodal decomposition, engine_id should always be 0; (2) When multiple phases are active, for example in precipitation with 1 matrix phase and 1 precipitate phases, the first two engines (engine_id = 0, 1) are for individual phase (mapping between phase name and engine_id is available through PFM_SDK::get_phase_name_protocol). The last engine (engine_id = 2) is for phase equilibiruim. If incorrect number of engine id is used, an error message "Error: Invalid engine id" will be returned without doing any calculation. |
[in] | input | the point calculation condition |
[in] | m_panengine_mode | (default = 0) 0: try to reuse calculated points; 1: disregarding calculated points |
[out] | output | the properties from this calculation |
[out] | msg | the message |
|
pure virtual |
Do a point calculation using global method, disregarding calculated points. When PFM_SDK::get_pt_val method gives parallel tangent phase equilibrium (for KKS model), use this method to get common tangent phase equilibrium,
[in] | input | the point calculation condition |
[in] | no_self_check | (default = false) self-checking is disabled or enabled. Self-chekcing of calculation result should be disabled when doing cooling simulation, since the global calculation may give unexpected phases. |
[out] | output | the properties from this calculation |
[out] | msg | the message |
|
pure virtual |
Get protocol of phase names: order of phase names used by SDK. The order of phases in PFM_SDK_Input_Condition and PFM_SDK_Output_Data should be consistent with this protocol
|
pure virtual |
Get protocol of element names: order of element names used by SDK. The order of component in PFM_SDK_Input_Condition and PFM_SDK_Output_Data should be consistent with this protocol
|
pure virtual |
Update protocol of element names(order of element names) used by SDK.
[in] | new_protocal | the new protocol of component order |
[out] | msg | the message |
|
pure virtual |
Get total number of available threads of engine
|
pure virtual |
Get the latest cacluation condition of engine with id of engine_id, in the first thread
[out] | state | the calculation condition (state) from the last calculation |
[in] | engine_id | the id of the engine where the state is queried |
|
pure virtual |
Get all phaes names from initially global point calculation. This is important when determine if the initial condition is proper for a model. For example in spinodal decomposition, phase number should be at least 2 and all names should be identical. In precipitation, at least two different phase names should be there.
[in] | engine_id | the id of the engine where phase information is queired |
[out] | phase_names | the array of phase names |
[out] | n_names | the number of phases |
[out] | msg | the message |
|
pure virtual |
Get counts of newly calculated points and reused points.
[out] | new_point_cnt | the count of newly calculated points |
[out] | reused_point_cnt | the count of reused points |
|
pure virtual |
Save intermedate files (binary fromat) and get the totla size of sdk intermediate files. The intermediate files are saved by SDK descontructor at the end of simulation. However, users are encouraged to save intermediate files during simulation.
[out] | tot_sdk_file_size_KB | the total size of sdk intermediate files |
|
pure virtual |
Initialize SDK to calculate nucleation related properties.
[out] | msg | the message from the initializer |
[in] | m_args | the arguments from phase field module |
[in] | single_thread | a boolean controllin tag which decides whether to use single thread for nucleation model (default is false). This option is useful when mean-field nucleation model is applied |
|
pure virtual |
Get precipitate composition, precipiate driving force and matrix mobility.
[in] | in | the input of calculation |
[out] | out | the output of calculation |
[in] | thread_id | the id of thread for this calculation |
[out] | msg | the message from the function |
[out] | m_engine_mode | (default = 0) 0: try to reuse calculated points; 1: disregarding calculated points |
|
pure virtual |
Get line compound info for a phase.
[in] | phase_id | the id of phase according to protocol |
|
pure virtual |
Save intermedate files (binary fromat) and get the totla size of sdk intermediate files. The intermediate files are saved by SDK descontructor at the end of simulation. However, users are encouraged to save intermediate files during simulation.
[out] | tot_sdk_file_size_KB | the total size of sdk intermediate files |
|
pure virtual |
Get a copy of the PanEngine calculation point object. The returned object can be used to debug model calculations.
[in] | thread_id | the id of thread from which the calculation point comes |
[in] | engine_id | the id of engine from which the calcualtion point comes return A copy of the PanEngine calculation point (P_Point) object |
|
pure virtual |
To verify the dongle information for user's plugin.
[in] | plugin_name | the name of the plugin |
[in] | msg | error message if any |