Material Models#
Each RatelMaterial
is responsible for adding volumetric terms to the residual, Jacobian, and diagnostic quantity evaluation operators as well as any surface terms that require volumetric or material model values.
Additionally, each RatelMaterial
is responsible for building and modifying corresponding preconditioner components, as needed.
-
enum RatelModelType#
Specify material region model.
Values:
-
enumerator RATEL_MODEL_FEM#
FEM material model.
-
enumerator RATEL_MODEL_FEM#
-
typedef struct RatelModelData_private *RatelModelData#
-
typedef struct RatelMaterial_private *RatelMaterial#
-
PetscErrorCode RatelMaterialCreate_CEED_BP3(Ratel ratel, RatelMaterial material)#
Create RatelMaterial for CEED BP3.
- Parameters:
ratel – [in] Ratel context
material – [out] RatelMaterial context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelRegisterModel_CEED_BP3(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#
Register CEED BP3 model.
- Parameters:
ratel – [in] Ratel context
cl_argument – [in] Command line argument to use for model
material_create_functions – [out] PETSc function list for RatelMaterials
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialCreate_CEED_BP4(Ratel ratel, RatelMaterial material)#
Create RatelMaterial for CEED BP4.
- Parameters:
ratel – [in] Ratel context
material – [out] RatelMaterial context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelRegisterModel_CEED_BP4(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#
Register CEED BP4 model.
- Parameters:
ratel – [in] Ratel context
cl_argument – [in] Command line argument to use for model
material_create_functions – [out] PETSc function list for RatelMaterials
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialCreate_ElasticityLinear(Ratel ratel, RatelMaterial material)#
Create RatelMaterial for linear elasticity.
- Parameters:
ratel – [in] Ratel context
material – [out] RatelMaterial context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelRegisterModel_ElasticityLinear(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#
Register linear elastic model.
- Parameters:
ratel – [in] Ratel context
cl_argument – [in] Command line argument to use for model
material_create_functions – [out] PETSc function list for RatelMaterials
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialCreate_ElasticityMixedLinear(Ratel ratel, RatelMaterial material)#
Create RatelMaterial for linear elasticity.
- Parameters:
ratel – [in] Ratel context
material – [out] RatelMaterial context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelRegisterModel_ElasticityMixedLinear(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#
Register mixed linear elastic model.
- Parameters:
ratel – [in] Ratel context
cl_argument – [in] Command line argument to use for model
material_create_functions – [out] PETSc function list for RatelMaterials
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialCreate_ElasticityMixedNeoHookeanInitial(Ratel ratel, RatelMaterial material)#
Create RatelMaterial for mixed Neo-Hookean hyperelasticity at finite strain in initial configuration.
- Parameters:
ratel – [in] Ratel context
material – [out] RatelMaterial context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelRegisterModel_ElasticityMixedNeoHookeanInitial(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#
Register Mixed Neo-Hookean hyperelasticity at finite strain in initial configuration.
- Parameters:
ratel – [in] Ratel context
cl_argument – [in] Command line argument to use for model
material_create_functions – [out] PETSc function list for RatelMaterials
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialCreate_ElasticityMooneyRivlinInitial(Ratel ratel, RatelMaterial material)#
Create RatelMaterial for Mooney-Rivlin hyperelasticity at finite strain in initial configuration.
- Parameters:
ratel – [in] Ratel context
material – [out] RatelMaterial context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelRegisterModel_ElasticityMooneyRivlinInitial(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#
Register Mooney-Rivlin hyperelasticity at finite strain in initial configuration.
- Parameters:
ratel – [in] Ratel context
cl_argument – [in] Command line argument to use for model
material_create_functions – [out] PETSc function list for RatelMaterials
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialCreate_ElasticityNeoHookeanCurrentAD(Ratel ratel, RatelMaterial material)#
Create RatelMaterial for Neo-Hookean hyperelasticity at finite strain in current configuration.
- Parameters:
ratel – [in] Ratel context
material – [out] RatelMaterial context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelRegisterModel_ElasticityNeoHookeanCurrentAD(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#
Register Neo-Hookean hyperelasticity at finite strain in current configuration using Enzyme-AD.
- Parameters:
ratel – [in] Ratel context
cl_argument – [in] Command line argument to use for model
material_create_functions – [out] PETSc function list for RatelMaterials
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialCreate_ElasticityNeoHookeanCurrent(Ratel ratel, RatelMaterial material)#
Create RatelMaterial for Neo-Hookean hyperelasticity at finite strain in curent configuration.
- Parameters:
ratel – [in] Ratel context
material – [out] RatelMaterial context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelRegisterModel_ElasticityNeoHookeanCurrent(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#
Register Neo-Hookean hyperelasticity at finite strain in curent configuration.
- Parameters:
ratel – [in] Ratel context
cl_argument – [in] Command line argument to use for model
material_create_functions – [out] PETSc function list for RatelMaterials
- Returns:
An error code: 0 - success, otherwise - failure
-
static PetscErrorCode RatelCheckTapeSize_ElasticityNeoHookeanInitialAD(Ratel ratel)#
Helper function to check allocated Enzyme tape size.
- Parameters:
ratel – [in] Ratel context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialCreate_ElasticityNeoHookeanInitialAD(Ratel ratel, RatelMaterial material)#
Create RatelMaterial for Neo-Hookean hyperelasticity at finite strain in initial configuration.
- Parameters:
ratel – [in] Ratel context
material – [out] RatelMaterial context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelRegisterModel_ElasticityNeoHookeanInitialAD(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#
Register Neo-Hookean hyperelasticity at finite strain in initial configuration using Enzyme-AD.
- Parameters:
ratel – [in] Ratel context
cl_argument – [in] Command line argument to use for model
material_create_functions – [out] PETSc function list for RatelMaterials
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialCreate_ElasticityNeoHookeanInitial(Ratel ratel, RatelMaterial material)#
Create RatelMaterial for Neo-Hookean hyperelasticity at finite strain in initial configuration.
- Parameters:
ratel – [in] Ratel context
material – [out] RatelMaterial context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelRegisterModel_ElasticityNeoHookeanInitial(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#
Register Neo-Hookean hyperelasticity at finite strain in initial configuration.
- Parameters:
ratel – [in] Ratel context
cl_argument – [in] Command line argument to use for model
material_create_functions – [out] PETSc function list for RatelMaterials
- Returns:
An error code: 0 - success, otherwise - failure
-
static PetscErrorCode RatelCeedPhysicsContextCreate_MooneyRivlin(RatelMaterial material, CeedScalar nu, CeedScalar mu_1, CeedScalar mu_2, CeedScalar rho, CeedQFunctionContext *ctx)#
Process command line options for Neo-Hookean physics.
- Parameters:
material – [in] RatelMaterial to setup physics context
nu – [in] Poisson’s ratio
mu_1 – [in] Material Property mu_1
mu_2 – [in] Material Property mu_2
rho – [in] Density for scaled mass matrix
ctx – [out] libCEED QFunctionContext for Neo-Hookean physics
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialPhysicsContextCreate_MooneyRivlin(RatelMaterial material, CeedQFunctionContext *ctx)#
Build libCEED QFunctionContext for Mooney-Rivlin physics.
- Parameters:
material – [in] RatelMaterial to setup physics context
ctx – [out] libCEED QFunctionContext for Mooney-Rivlin physics
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialPhysicsSmootherDataSetup_MooneyRivlin(RatelMaterial material)#
Setup data for libCEED QFunctionContext for smoother with Mooney-Rivlin physics.
- Parameters:
material – [in] RatelMaterial to setup physics context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialPlatenContextCreate_MooneyRivlin(RatelMaterial material, CeedScalar normal[3], CeedScalar center[3], CeedScalar distance, CeedScalar gamma, CeedScalar final_time, CeedInt face_id, CeedInt face_domain_value, CeedQFunctionContext *ctx)#
Build libCEED QFunctionContext for platen BC with Mooney-Rivlin physics.
- Parameters:
material – [in] RatelMaterial to setup platen context
normal – [in] Normal vector to platen surface
center – [in] Center of platen surface
distance – [in] Displacement of platen along normal
gamma – [in] Nitsche’s method penalty parameter
final_time – [in] Final time to complete platen movement
face_id – [in] DMPlex face domain id
face_domain_value – [in] DMPlex face domain stratum value
ctx – [out] libCEED QFunctionContext for platen
- Returns:
An error code: 0 - success, otherwise - failure
-
static PetscErrorCode RatelCeedPhysicsContextCreate_NeoHookean(RatelMaterial material, CeedScalar nu, CeedScalar E, CeedScalar rho, CeedQFunctionContext *ctx)#
Process command line options for Neo-Hookean physics.
- Parameters:
material – [in] RatelMaterial to setup physics context
nu – [in] Poisson’s ratio
E – [in] Young’s Modulus
rho – [in] Density for scaled mass matrix
ctx – [out] libCEED QFunctionContext for Neo-Hookean physics
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialPhysicsContextCreate_NeoHookean(RatelMaterial material, CeedQFunctionContext *ctx)#
Build libCEED QFunctionContext with Neo-Hookean physics.
- Parameters:
material – [in] RatelMaterial to setup physics context
ctx – [out] libCEED QFunctionContext for Neo-Hookean physics
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialPhysicsSmootherDataSetup_NeoHookean(RatelMaterial material)#
Setup data for libCEED QFunctionContext for smoother with Neo-Hookean physics.
- Parameters:
material – [in] RatelMaterial to setup physics context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialPlatenContextCreate_NeoHookean(RatelMaterial material, CeedScalar normal[3], CeedScalar center[3], CeedScalar distance, CeedScalar gamma, CeedScalar final_time, CeedInt face_id, CeedInt face_domain_value, CeedQFunctionContext *ctx)#
Build libCEED QFunctionContext for platen BC with Neo-Hookean physics.
- Parameters:
material – [in] RatelMaterial to setup platen context
normal – [in] Normal vector to platen surface
center – [in] Center of platen surface
distance – [in] Displacement of platen along normal
gamma – [in] Nitsche’s method penalty parameter
final_time – [in] Final time to complete platen movement
face_id – [in] DMPlex face domain id
face_domain_value – [in] DMPlex face domain stratum value
ctx – [out] libCEED QFunctionContext for platen
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialCreate_FEM(Ratel ratel, RatelMaterial material)#
Create a RatelMaterial object for a finite element model.
- Parameters:
ratel – [in] Ratel context
material – [out] RatelMaterial context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelDMSetup_FEM(Ratel ratel)#
Create a RatelMaterial object for a finite element model.
- Parameters:
ratel – [inout] Ratel context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelDMSetupByOrder_FEM(Ratel ratel, PetscBool setup_boundary, PetscInt *orders, PetscInt coord_order, PetscInt q_extra, CeedInt num_fields, const CeedInt *field_sizes, DM dm)#
Setup DM with FE space of appropriate degree.
- Parameters:
ratel – [in] Ratel context
setup_boundary – [in] Flag to add Dirichlet boundary
orders – [in] Polynomial orders of field
coord_order – [in] Polynomial order of coordinate basis, or RATEL_DECIDE for default
q_extra – [in] Additional quadrature order, or RATEL_DECIDE for default
num_fields – [in] Number of fields in solution vector
field_sizes – [in] Array of number of components for each field
dm – [out] DM to setup
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupVolumeQData_FEM(RatelMaterial material, const char *label_name, PetscInt label_value, CeedElemRestriction *restriction, CeedVector *q_data)#
Compute CeedOperator volumetric QData for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
label_name – [in] DMPlex label name for volume
label_value – [in] DMPlex label value for volume
restriction – [out] CeedElemRestriction for QData
q_data – [out] CeedVector holding QData
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupSurfaceGradientQData_FEM(RatelMaterial material, DM dm, const char *label_name, PetscInt label_value, CeedElemRestriction *restriction, CeedVector *q_data)#
Compute CeedOperator surface gradient QData for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
dm – [in] DMPlex grid
label_name – [in] DMPlex label name for surface
label_value – [in] DMPlex label value for surface
restriction – [out] CeedElemRestriction for QData
q_data – [out] CeedVector holding QData
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupResidualJacobianSuboperators_FEM(RatelMaterial material, CeedOperator op_residual_u, CeedOperator op_residual_ut, CeedOperator op_residual_utt, CeedOperator op_jacobian)#
Setup Residual and Jacobian CeedOperators for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
op_residual_u – [out] Composite residual u term CeedOperator to add RatelMaterial suboperator
op_residual_ut – [out] Composite residual u_t term CeedOperator to add RatelMaterial suboperator
op_residual_utt – [out] Composite residual u_tt term CeedOperator to add RatelMaterial suboperator
op_jacobian – [out] Composite Jacobian CeedOperator to add RatelMaterial suboperator
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupJacobianMultigridLevel_FEM(RatelMaterial material, PetscInt level, CeedVector m_loc, CeedOperator sub_op_jacobian_fine, CeedOperator op_jacobian_coarse, CeedOperator op_prolong, CeedOperator op_restrict)#
Setup multigrid level CeedOperators for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
level – [in] Multigrid level to setup
m_loc – [in] libCEED vector holding multiplicity
sub_op_jacobian_fine – [in] Fine grid Jacobian CeedOperator
op_jacobian_coarse – [inout] Composite Jacobian CeedOperator to add RatelMaterial suboperators
op_prolong – [inout] Composite prolongation CeedOperator to add RatelMaterial suboperators
op_restrict – [inout] Composite restriction CeedOperator to add RatelMaterial suboperators
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupEnergySuboperator_FEM(RatelMaterial material, CeedOperator op_energy)#
Setup energy CeedOperator for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
op_energy – [out] Composite energy CeedOperator to add RatelMaterial suboperator
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupDiagnosticSuboperators_FEM(RatelMaterial material, CeedOperator op_mass_diagnostic, CeedOperator op_diagnostic)#
Setup diagnostic value CeedOperator for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
op_mass_diagnostic – [out] Composite diagnostic value projection CeedOperator to add RatelMaterial suboperator
op_diagnostic – [out] Composite diagnostic value CeedOperator to add RatelMaterial suboperator
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupSurfaceForceSuboperators_FEM(RatelMaterial material, CeedOperator *ops_surface_force)#
Setup surface force CeedOperator for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
ops_surface_force – [out] Composite surface force CeedOperators to add RatelMaterial suboperator
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupMMSErrorSuboperator_FEM(RatelMaterial material, CeedOperator op_mms_error)#
Setup MMS error CeedOperator for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
op_mms_error – [out] Composite MMS error CeedOperator to add RatelMaterial suboperator
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialCreate(Ratel ratel, const char *material_name, RatelMaterial *material)#
Create a RatelMaterial object.
- Parameters:
ratel – [in] Ratel context
material_name – [in] Material name for command line prefix
material – [out] Address to store newly created RatelMaterial
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialView(RatelMaterial material, PetscViewer viewer)#
View a RatelMaterial object.
- Parameters:
material – [in] RatelMaterial to view
viewer – [in] Visualization context
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialDestroy(RatelMaterial *material)#
Destroy a RatelMaterial object.
- Parameters:
material – [inout] RatelMaterial to destroy
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetActiveFieldSizes(RatelMaterial material, CeedInt *num_active_fields, const CeedInt **active_field_sizes)#
Get number of components for a RatelMaterial object.
- Parameters:
material – [in] RatelMaterial context
num_active_fields – [out] Number of components in RatelMaterial
active_field_sizes – [out] Number of components in RatelMaterial
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetNumDiagnosticComponents(RatelMaterial material, CeedInt *num_components)#
Get number of diagnostic components for a RatelMaterial object.
- Parameters:
material – [in] RatelMaterial context
num_components – [out] Number of diagnostic components in RatelMaterial
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetNumStateFields(RatelMaterial material, CeedInt *num_state_fields)#
Get number of state fields for a RatelMaterial object.
- Parameters:
material – [in] RatelMaterial context
num_state_fields – [out] Number of state fields in RatelMaterial
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetActiveFieldNames(RatelMaterial material, const char ***field_names)#
Get active field names for a RatelMaterial object.
- Parameters:
material – [in] RatelMaterial context
field_names – [out] Names of fields in RatelMaterial
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetDiagnosticFieldNames(RatelMaterial material, const char ***field_names)#
Get diagnostic field names for a RatelMaterial object.
- Parameters:
material – [in] RatelMaterial context
field_names – [out] Names of diagnostic fields in RatelMaterial
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetStateFieldNames(RatelMaterial material, const char ***field_names)#
Get state field names for a RatelMaterial object.
- Parameters:
material – [in] RatelMaterial context
field_names – [out] Names of state fields in RatelMaterial
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetLabelValues(RatelMaterial material, PetscInt *num_label_values, PetscInt **label_values)#
Get volume label values for a RatelMaterial object.
- Parameters:
material – [in] RatelMaterial context
num_label_values – [out] Number of label values for RatelMaterial
label_values – [out] Volume label values for RatelMaterial
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetModelType(RatelMaterial material, RatelModelType *model_type)#
Get RatelModelType for a RatelMaterial object.
- Parameters:
material – [in] RatelMaterial context
model_type – [out] RatelModelType for RatelMaterial
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetMaterialName(RatelMaterial material, const char **material_name)#
Get material name for a RatelMaterial, or NULL if none set.
- Parameters:
material – [in] RatelMaterial context
material_name – [out] Char array holding model name
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetModelName(RatelMaterial material, const char **model_name)#
Get model name for a RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
model_name – [out] Char array holding model name
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetSurfaceGradientLabelName(RatelMaterial material, PetscInt dm_face, const char **label_name)#
Get label name for solution DM for a RatelMaterial by face number.
- Parameters:
material – [in] RatelMaterial context
dm_face – [in] DMPlex face number
label_name – [out] Char array holding label name
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetSurfaceGradientDiagnosticLabelName(RatelMaterial material, PetscInt dm_face, const char **label_name)#
Get label name for diagnostic DM for a RatelMaterial by face number.
- Parameters:
material – [in] RatelMaterial context
dm_face – [in] DMPlex face number
label_name – [out] Char array holding label name
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetSurfaceGradientOperatorFaceLabelAndValue(RatelMaterial material, CeedOperator op, DMLabel *face_domain_label, PetscInt *face_domain_value)#
Get domain label and domain value for solution DM for a RatelMaterial from CeedOperator context.
- Parameters:
material – [in] RatelMaterial context
op – [in] CeedOperator with face_id and face_domain_value fields
face_domain_label – [out] DMPlex label corresponding to face domain
face_domain_value – [out] Stratum value
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialIsOnProcess(RatelMaterial material, PetscBool *is_on_process)#
Check if RatelMaterial is on current process.
- Parameters:
material – [in] RatelMaterial context
is_on_process – [out] Boolean flag indicating if RatelMaterial is on current process
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialHasMMS(RatelMaterial material, PetscBool *has_mms)#
Get RatelModelType for a RatelMaterial object.
- Parameters:
material – [in] RatelMaterial context
has_mms – [out] Boolean flag indicating if RatelMaterial has MMS solution
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetCLPrefix(RatelMaterial material, char **cl_prefix)#
Get command line option prefix for a RatelMaterial object.
- Parameters:
material – [in] RatelMaterial context
cl_prefix – [out] Command line option prefix for RatelMaterial
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetCLMessage(RatelMaterial material, char **cl_message)#
Get command line option message for a RatelMaterial object.
- Parameters:
material – [in] RatelMaterial context
cl_message – [out] Command line option message for RatelMaterial
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialCreateOperatorName(RatelMaterial material, const char *base_name, char **operator_name)#
Build CeedOperator name for material Note: Caller is responsible for freeing the allocated name string with PetscFree().
- Parameters:
material – [in] RatelMaterial context
base_name – [in] String holding base name for operator
operator_name – [out] String holding operator name for RatelMaterial
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetSolutionData(RatelMaterial material, CeedInt *num_active_fields, CeedElemRestriction **restrictions, CeedBasis **bases)#
Get CeedElemRestriction and CeedBasis objects corresponding to residual evaluation.
- Parameters:
material – [in] RatelMaterial context
num_active_fields – [out] Number of active fields in residual evaluation
restrictions – [out] CeedElemRestrictions corresponding to residual evaluation
bases – [out] CeedBases corresponding to residual evaluation
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetOperatorName(RatelMaterial material, const char *base_name, CeedOperator op)#
Build CeedOperator name for material.
- Parameters:
material – [in] RatelMaterial context
base_name – [in] String holding base name for operator
op – [inout] CeedOperator to set the name for
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetVolumeQData(RatelMaterial material, CeedElemRestriction *restriction, CeedVector *q_data)#
Get CeedOperator volumetric QData for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
restriction – [out] CeedElemRestriction for QData
q_data – [out] CeedVector holding QData
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetSurfaceGradientQData(RatelMaterial material, PetscInt dm_face, PetscInt orientation, CeedElemRestriction *restriction, CeedVector *q_data)#
Get CeedOperator surface gradient QData for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
dm_face – [in] DMPlex face number
orientation – [in] Face orientation number, giving DMLabel value
restriction – [out] CeedElemRestriction for QData
q_data – [out] CeedVector holding QData
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialGetSurfaceGradientDiagnosticQData(RatelMaterial material, PetscInt dm_face, PetscInt orientation, CeedElemRestriction *restriction, CeedVector *q_data)#
Get CeedOperator diagnostic surface gradient QData for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
dm_face – [in] DMPlex face number
orientation – [in] Face orientation number, giving DMLabel value
restriction – [out] CeedElemRestriction for QData
q_data – [out] CeedVector holding QData
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupResidualJacobianSuboperators(RatelMaterial material, CeedOperator op_residual_u, CeedOperator op_residual_ut, CeedOperator op_residual_utt, CeedOperator op_jacobian)#
Setup residual and Jacobian CeedOperators for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
op_residual_u – [out] Composite residual u term CeedOperator to add RatelMaterial suboperator
op_residual_ut – [out] Composite residual u_t term CeedOperator to add RatelMaterial suboperator
op_residual_utt – [out] Composite residual u_tt term CeedOperator to add RatelMaterial suboperator
op_jacobian – [out] Composite Jacobian CeedOperator to add RatelMaterial suboperator
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupPlatenSuboperators(RatelMaterial material, CeedOperator op_residual_u, CeedOperator op_jacobian)#
Setup residual and Jacobian CeedOperators for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
op_residual_u – [out] Composite residual u term CeedOperator to add RatelMaterial suboperator
op_jacobian – [out] Composite Jacobian CeedOperator to add RatelMaterial suboperator
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupPressureSuboperators(RatelMaterial material, CeedOperator op_residual_u, CeedOperator op_jacobian)#
Setup residual and Jacobian CeedOperators for Pressure boundary condition.
- Parameters:
material – [in] RatelMaterial context
op_residual_u – [out] Composite residual u term CeedOperator to add RatelMaterial suboperator
op_jacobian – [out] Composite Jacobian CeedOperator to add RatelMaterial suboperator
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupMultigridLevel(RatelMaterial material, PetscInt level, CeedVector m_loc, CeedOperator op_jacobian_fine, CeedOperator op_jacobian_coarse, CeedOperator op_prolong, CeedOperator op_restrict)#
Setup multigrid level CeedOperators for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
level – [in] Multigrid level to setup
m_loc – [in] libCEED vector holding multiplicity
op_jacobian_fine – [in] Composite Jacobian CeedOperator holding fine grid suboperators
op_jacobian_coarse – [inout] Composite Jacobian CeedOperator to add RatelMaterial suboperators
op_prolong – [inout] Composite prolongation CeedOperator to add RatelMaterial suboperators
op_restrict – [inout] Composite restriction CeedOperator to add RatelMaterial suboperators
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetJacobianSootherContext(RatelMaterial material, PetscBool set_or_unset, CeedOperator op_jacobian, PetscBool *was_set)#
Set smoother contexts for Jacobian operators for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
set_or_unset – [in] Boolean flag to set (TRUE) or unset (FALSE) the smoother context
op_jacobian – [inout] Composite Jacobian CeedOperator to update
was_set – [out] Boolean flag indicating if any smoother context was set.
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupEnergySuboperator(RatelMaterial material, CeedOperator op_energy)#
Setup energy CeedOperator for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
op_energy – [out] Composite energy CeedOperator to add RatelMaterial suboperator
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupDiagnosticSuboperators(RatelMaterial material, CeedOperator op_mass_diagnostic, CeedOperator op_diagnostic)#
Setup diagnostic value CeedOperator for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
op_mass_diagnostic – [out] Composite diagnostic value projection CeedOperator to add RatelMaterial suboperator
op_diagnostic – [out] Composite diagnostic value CeedOperator to add RatelMaterial suboperator
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupSurfaceForceSuboperators(RatelMaterial material, CeedOperator *ops_surface_force)#
Setup surface force CeedOperator for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
ops_surface_force – [out] Composite surface force CeedOperators to add RatelMaterial suboperator
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelMaterialSetupMMSErrorSuboperator(RatelMaterial material, CeedOperator op_mms_error)#
Setup MMS error CeedOperator for RatelMaterial.
- Parameters:
material – [in] RatelMaterial context
op_mms_error – [out] Composite MMS error CeedOperator to add RatelMaterial suboperator
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelRegisterModels(Ratel ratel, PetscFunctionList *material_create_functions)#
Register setup functions for models.
- Parameters:
ratel – [in] Ratel context
material_create_functions – [out] Function list for creating RatelMaterials
- Returns:
An error code: 0 - success, otherwise - failure
-
PetscErrorCode RatelModelDataVerifyRelativePath(Ratel ratel, RatelModelData model_data)#
Verify all QFunction paths are relative to Ratel JiT root directory.
- Parameters:
ratel – [in] Ratel context
model_data – [inout] Model data to check QFunction paths
- Returns:
An error code: 0 - success, otherwise - failure