- variableThe name of the variable that this object operates on
C++ Type:std::vector<VariableName>
Controllable:No
Description:The name of the variable that this object operates on
ElementL2Norm
Computes a volume integral of the specified variable
The element norm is defined as:
The element norm of a variable is computed as:
The term accounts for the geometry/volume of the element, the for the weight in the quadrature, for an eventual coordinate change (cylindrical, spherical) and is the value of the variable at the quadrature point.
Example input syntax
In this example, we compute the L2 norm for a variety of auxiliary variable types using ElementL2Norm
postprocessors.
[Postprocessors]
[./int2_u]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[../]
[./int2_l2_lagrange]
type = ElementL2Norm
variable = l2_lagrange
execute_on = 'initial timestep_end'
[../]
[./int2_l2_hierarchic]
type = ElementL2Norm
variable = l2_hierarchic
execute_on = 'initial timestep_end'
[../]
[./int_u]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[../]
[./int_l2_lagrange]
type = ElementIntegralVariablePostprocessor
variable = l2_lagrange
execute_on = 'initial timestep_end'
[../]
[./int_l2_hierarchic]
type = ElementIntegralVariablePostprocessor
variable = l2_hierarchic
execute_on = 'initial timestep_end'
[../]
[]
(test/tests/auxkernels/element_aux_var/l2_element_aux_var_test.i)Input Parameters
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Options:FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, TRANSFER
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Optional Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
- seed0The seed for the master random number generator
Default:0
C++ Type:unsigned int
Controllable:No
Description:The seed for the master random number generator
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
Input Files
- (test/tests/executioners/fixed_point/2d_diffusion_fixed_point.i)
- (test/tests/multiapps/secant/transient_main.i)
- (modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_esm_using_cut_mesh.i)
- (modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain.i)
- (test/tests/multiapps/picard/picard_custom_postprocessor.i)
- (test/tests/executioners/nl_pingpong/nonlinear_residual_pingpong.i)
- (test/tests/problems/eigen_problem/jfnk_mo/ne_mo_with_linear_aux.i)
- (test/tests/postprocessors/coupled_solution_dofs/coupled_solution_dofs.i)
- (test/tests/restart/start_time_override/transient.i)
- (test/tests/multiapps/picard/steady_picard_parent.i)
- (test/tests/multiapps/secant/steady_main.i)
- (test/tests/postprocessors/change_over_fixed_point/change_over_fixed_point.i)
- (test/tests/postprocessors/variable_inner_product/variable_inner_product.i)
- (modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_cut_mesh.i)
- (test/tests/postprocessors/parsed_postprocessor/parsed_pp.i)
- (test/tests/restart/restart_diffusion/restart_diffusion_test_steady.i)
- (test/tests/kernels/hfem/3d-lower-d-volumes.i)
- (test/tests/auxkernels/mesh_integer/dg_mesh_integer.i)
- (test/tests/restart/restart_transient_from_steady/steady.i)
- (test/tests/multiapps/picard/pseudo_transient_picard_sub.i)
- (test/tests/kernels/hfem/dirichlet.i)
- (test/tests/auxkernels/element_aux_var/element_high_order_aux_test.i)
- (test/tests/executioners/fixed_point/2d_diffusion_fixed_point_toggle.i)
- (test/tests/auxkernels/solution_aux/thread_xda.i)
- (test/tests/kernels/hfem/neumann.i)
- (test/tests/kernels/hfem/lower-d-volumes.i)
- (test/tests/postprocessors/element_l2_norm/element_l2_norm.i)
- (test/tests/multiapps/picard/steady_custom_picard_parent.i)
- (test/tests/kernels/hfem/robin.i)
- (test/tests/postprocessors/internal_side_jump/internal_side_jump.i)
- (test/tests/multiapps/picard/pseudo_transient_picard_parent.i)
- (test/tests/multiapps/steffensen/transient_sub.i)
- (test/tests/multiapps/secant/steady_sub.i)
- (test/tests/multiapps/secant/transient_sub.i)
- (modules/geochemistry/test/tests/kernels/dispersion_1.i)
- (test/tests/executioners/fixed_point/2d_diffusion_fixed_point_toggle_mat.i)
- (test/tests/multiapps/steffensen/transient_main.i)
- (test/tests/mortar/continuity-2d-conforming/conforming_two_var.i)
- (test/tests/auxkernels/element_aux_var/l2_element_aux_var_test.i)
- (test/tests/auxkernels/mesh_integer/mesh_integer.i)
- (test/tests/multiapps/picard/steady_picard_sub.i)
- (test/tests/outputs/csv/csv_align.i)
- (test/tests/multiapps/steffensen/steady_sub.i)
- (test/tests/multiapps/steffensen/steady_main.i)
- (modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_esm.i)
- (test/tests/executioners/fixed_point/nonlinear_fixed_point.i)
- (test/tests/ics/zero_ic/test.i)
- (test/tests/restart/start_time_override/start_time_override.i)
- (test/tests/dgkernels/dg_block_restrict/2d_dg_diffusion_block_restrict.i)
- (test/tests/restart/restart_transient_from_steady/restart_from_steady.i)
- (test/tests/executioners/steady_time/steady_time.i)
(test/tests/auxkernels/element_aux_var/l2_element_aux_var_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
second_order = true
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./l2_lagrange]
order = FIRST
family = L2_LAGRANGE
[../]
[./l2_hierarchic]
order = FIRST
family = L2_HIERARCHIC
[../]
[./one]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
# Coupling of nonlinear to Aux
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = CoupledForce
variable = u
v = one
[../]
[]
[AuxKernels]
[./coupled_l2_lagrange]
variable = l2_lagrange
type = CoupledAux
value = 2
operator = +
coupled = u
execute_on = 'initial timestep_end'
[../]
[./coupled_l2_hierarchic]
variable = l2_hierarchic
type = CoupledAux
value = 2
operator = +
coupled = u
execute_on = 'initial timestep_end'
[../]
[./constant]
variable = one
type = ConstantAux
value = 1
execute_on = 'initial timestep_end'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./int2_u]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[../]
[./int2_l2_lagrange]
type = ElementL2Norm
variable = l2_lagrange
execute_on = 'initial timestep_end'
[../]
[./int2_l2_hierarchic]
type = ElementL2Norm
variable = l2_hierarchic
execute_on = 'initial timestep_end'
[../]
[./int_u]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[../]
[./int_l2_lagrange]
type = ElementIntegralVariablePostprocessor
variable = l2_lagrange
execute_on = 'initial timestep_end'
[../]
[./int_l2_hierarchic]
type = ElementIntegralVariablePostprocessor
variable = l2_hierarchic
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
[./ex_out]
type = Exodus
file_base = l2elemaux
elemental_as_nodal = true
[../]
[]
(test/tests/executioners/fixed_point/2d_diffusion_fixed_point.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = -1
xmax = 1
ymin = -1
ymax = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./pseudo_time]
type = CoefReaction
variable = u
coefficient = -0.1
# comment out this will make fixed point iteration converged in one iteration
vector_tags = 'previous'
[../]
[./pseudo_time_compensation]
type = CoefReaction
variable = u
coefficient = 0.1
[../]
[]
[BCs]
[./left]
type = VacuumBC
variable = u
boundary = left
[../]
[./right]
type = NeumannBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./unorm]
type = ElementL2Norm
variable = u
[../]
[]
[Problem]
type = FixedPointProblem
fp_tag_name = 'previous'
[]
[Executioner]
type = FixedPointSteady
nl_rel_tol = 1e-2
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/secant/transient_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'secant'
fixed_point_max_its = 30
transformed_variables = 'u'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'transient_sub.i'
clone_parent_mesh = true
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
execute_on = 'timestep_begin'
[]
[]
(modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_esm_using_cut_mesh.i)
# This test is for two layer materials with different youngs modulus with AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
output_cut_plane = true
[]
[UserObjects]
[cut]
type = InterfaceMeshCut2DUserObject
mesh_file = line.e
interface_velocity_function = 1
heal_always = true
[]
[esm]
type = CutElementSubdomainModifier
geometric_cut_userobject = cut
apply_initial_conditions = false
[]
[]
[Mesh]
use_displaced_mesh = true
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 5
ymin = 0
ymax = 5
elem_type = QUAD4
[]
[bottom]
type = SubdomainBoundingBoxGenerator
input = generated_mesh
block_id = 0
bottom_left = '0 0 0'
top_right = '5 2.5 0'
[]
[top]
type = SubdomainBoundingBoxGenerator
input = bottom
block_id = 1
bottom_left = '0 2.5 0'
top_right = '5 5 0'
[]
[]
[Functions]
[ls_func]
type = ParsedFunction
expression = 'y-2.73+t'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[ls]
[]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[ls_function]
type = FunctionAux
variable = ls
function = ls_func
[]
[strain_xx]
type = RankTwoAux
variable = strain_xx
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[]
[strain_yy]
type = RankTwoAux
variable = strain_yy
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[]
[strain_xy]
type = RankTwoAux
variable = strain_xy
rank_two_tensor = total_strain
index_i = 0
index_j = 1
[]
[stress_xx]
type = RankTwoAux
variable = stress_xx
rank_two_tensor = stress
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
variable = stress_xy
rank_two_tensor = stress
index_i = 0
index_j = 1
[]
[stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_i = 1
index_j = 1
[]
[]
[Kernels]
[solid_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[solid_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
use_displaced_mesh = true
[]
[]
[Constraints]
[dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'cut'
[]
[dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'cut'
[]
[]
[BCs]
[bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[]
[bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[]
[topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[]
[topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[]
[]
[Materials]
[elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1e9
poissons_ratio = 0.3
[]
[strain_A]
type = ComputeFiniteStrain
block = 1
[]
[stress_A]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
block = 0
youngs_modulus = 1e7
poissons_ratio = 0.3
[]
[strain_B]
type = ComputeFiniteStrain
block = 0
[]
[stress_B]
type = ComputeFiniteStrainElasticStress
block = 0
[]
[]
[Postprocessors]
[disp_x_norm]
type = ElementL2Norm
variable = disp_x
[]
[disp_y_norm]
type = ElementL2Norm
variable = disp_y
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-13
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.1
num_steps = 4
max_xfem_update = 1
[]
[Outputs]
print_linear_residuals = false
exodus = true
[]
(modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain.i)
# This test is for two layer materials with different youngs modulus with AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
output_cut_plane = true
[]
[UserObjects]
[level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[]
[]
[Mesh]
use_displaced_mesh = true
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 5
ymin = 0
ymax = 5
elem_type = QUAD4
[]
[left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0 0'
input = generated_mesh
[]
[left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0 5'
input = left_bottom
[]
[]
[Functions]
[ls_func]
type = ParsedFunction
expression = 'y-2.73+t'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[ls]
[]
[a_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[a_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[a_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[ls_function]
type = FunctionAux
variable = ls
function = ls_func
[]
[a_strain_xx]
type = RankTwoAux
variable = a_strain_xx
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
[]
[a_strain_yy]
type = RankTwoAux
variable = a_strain_yy
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
[]
[a_strain_xy]
type = RankTwoAux
variable = a_strain_xy
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
[]
[b_strain_xx]
type = RankTwoAux
variable = b_strain_xx
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
[]
[b_strain_yy]
type = RankTwoAux
variable = b_strain_yy
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
[]
[b_strain_xy]
type = RankTwoAux
variable = b_strain_xy
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
[]
[stress_xx]
type = RankTwoAux
variable = stress_xx
rank_two_tensor = stress
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
variable = stress_xy
rank_two_tensor = stress
index_i = 0
index_j = 1
[]
[stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_i = 1
index_j = 1
[]
[]
[Kernels]
[solid_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[solid_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
use_displaced_mesh = true
[]
[]
[Constraints]
[dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[]
[BCs]
[bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[]
[bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[]
[topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[]
[topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[]
[]
[Materials]
[elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[]
[strain_A]
type = ComputeFiniteStrain
base_name = A
[]
[stress_A]
type = ComputeFiniteStrainElasticStress
base_name = A
[]
[elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e7
poissons_ratio = 0.3
[]
[strain_B]
type = ComputeFiniteStrain
base_name = B
[]
[stress_B]
type = ComputeFiniteStrainElasticStress
base_name = B
[]
[combined_stress]
type = LevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[]
[combined_jacob_mult]
type = LevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = Jacobian_mult
[]
[]
[Postprocessors]
[disp_x_norm]
type = ElementL2Norm
variable = disp_x
[]
[disp_y_norm]
type = ElementL2Norm
variable = disp_y
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-13
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.1
num_steps = 4
max_xfem_update = 1
[]
[Outputs]
print_linear_residuals = false
exodus = true
[]
(test/tests/multiapps/picard/picard_custom_postprocessor.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm_begin]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_begin'
outputs = none
[]
[unorm]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[]
[unorm_err]
type = RelativeDifferencePostprocessor
value1 = unorm
value2 = unorm_begin
outputs = none
[]
[vnorm]
type = ElementL2Norm
variable = v
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
disable_fixed_point_residual_norm_check = true
custom_pp = unorm_err
nl_abs_tol = 1e-14
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = steady_picard_sub.i
no_backup_and_restore = true
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/executioners/nl_pingpong/nonlinear_residual_pingpong.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = -1
xmax = 1
ymin = -1
ymax = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./power]
type = PReaction
variable = u
coefficient = 0.2
power = -5
# Comment out this will make fixed point iteration converged in one iteration.
# However, this makes the solving diverge and require a proper initial condition (>1.00625).
vector_tags = 'previous'
[../]
[]
[BCs]
[./left]
type = VacuumBC
variable = u
boundary = left
[../]
[./right]
type = NeumannBC
variable = u
boundary = right
value = 10
[../]
[]
[Postprocessors]
[./unorm]
type = ElementL2Norm
variable = u
[../]
[]
[Problem]
type = FixedPointProblem
fp_tag_name = 'previous'
[]
[Executioner]
type = FixedPointSteady
nl_rel_tol = 1e-50
line_search = none
n_max_nonlinear_pingpong = 2
[]
(test/tests/problems/eigen_problem/jfnk_mo/ne_mo_with_linear_aux.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
# the minimum eigenvalue of this problem is 2*(PI/a)^2;
# Its inverse is 0.5*(a/PI)^2 = 5.0660591821169. Here a is equal to 10.
[Variables]
[u]
order = FIRST
family = LAGRANGE
components = 2
[]
[v]
order = FIRST
family = LAGRANGE
components = 2
[]
[]
[AuxVariables]
[w][]
[]
[AuxKernels]
[w]
type = ArrayVariableComponent
variable = w
array_variable = u
component = 0
execute_on = linear
[]
[]
[Kernels]
[diffu]
type = ArrayDiffusion
variable = u
diffusion_coefficient = dc
[]
[reactionu]
type = ArrayReaction
variable = u
reaction_coefficient = rc
extra_vector_tags = 'eigen'
[]
[diffv]
type = ArrayDiffusion
variable = v
diffusion_coefficient = dc
[]
[reactionv]
type = ArrayReaction
variable = v
reaction_coefficient = rc
extra_vector_tags = 'eigen'
[]
[]
[Materials]
[dc]
type = GenericConstantArray
prop_name = dc
prop_value = '1. 1.'
[]
[rc]
type = GenericConstantArray
prop_name = rc
prop_value = '-1 -1'
[]
[]
[BCs]
[hom_u]
type = ArrayDirichletBC
variable = u
values = '0 0'
boundary = '0 1 2 3'
[]
[eigenhom_u]
type = EigenArrayDirichletBC
variable = u
boundary = '0 1 2 3'
[]
[hom_v]
type = ArrayDirichletBC
variable = v
values = '0 0'
boundary = '0 1 2 3'
[]
[eigenhom_v]
type = EigenArrayDirichletBC
variable = v
boundary = '0 1 2 3'
[]
[]
[Executioner]
type = Eigenvalue
solve_type = PJFNKMO
constant_matrices = true
[]
[VectorPostprocessors]
[eigenvalues]
type = Eigenvalues
execute_on = 'timestep_end'
[]
[]
[Postprocessors]
[unorm]
type = ElementArrayL2Norm
variable = u
component = 0
[]
[wnorm]
type = ElementL2Norm
variable = w
[]
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
(test/tests/postprocessors/coupled_solution_dofs/coupled_solution_dofs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./L2_norm]
type = ElementL2Norm
variable = u
[../]
[./integral]
type = ElementIntegralVariablePostprocessor
variable = u
[../]
[./direct_sum]
type = ElementMomentSum
variable = u
[../]
[./direct_sum_old]
type = ElementMomentSum
variable = u
implicit = false
[../]
[./direct_sum_older]
type = ElementMomentSum
variable = u
use_old = true
implicit = false
[../]
[]
[Executioner]
type = Transient
num_steps = 3
nl_abs_tol = 1e-12
[]
[Outputs]
csv = true
[]
(test/tests/restart/start_time_override/transient.i)
[Mesh]
type = GeneratedMesh
nx = 5
ny = 5
dim = 2
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Postprocessors]
[u_norm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 5
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
checkpoint = true
csv = true
[]
(test/tests/multiapps/picard/steady_picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[]
[vnorm]
type = ElementL2Norm
variable = v
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-14
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 10
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = steady_picard_sub.i
no_backup_and_restore = true
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/multiapps/secant/steady_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'secant'
fixed_point_max_its = 30
transformed_variables = 'u'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'steady_sub.i'
clone_parent_mesh = true
transformed_variables = 'v'
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/postprocessors/change_over_fixed_point/change_over_fixed_point.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 5
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = PostprocessorDirichletBC
variable = u
boundary = right
postprocessor = 'num_coupling'
[]
[]
[Executioner]
type = Steady
fixed_point_min_its = 10
fixed_point_max_its = 10
[]
[Postprocessors]
[num_coupling]
type = NumFixedPointIterations
execute_on = 'initial timestep_begin timestep_end'
[]
[norm]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_begin timestep_end'
[]
[change_over_fixed_point]
type = ChangeOverFixedPointPostprocessor
postprocessor = norm
change_with_respect_to_initial = false
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
file_base = 'change_over_fixed_point_previous'
csv = true
[]
(test/tests/postprocessors/variable_inner_product/variable_inner_product.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = -1
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD9
[]
[AuxVariables]
[./f]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = leg2
[../]
[../]
[./g]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = leg1
[../]
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[Functions]
[./leg1]
type = ParsedFunction
expression = 'x'
[../]
[./leg2]
type = ParsedFunction
expression = '0.5*(3.0*x*x-1.0)'
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[./Quadrature]
order = fourth
[]
[]
[Postprocessors]
[./f_dot_g]
type = VariableInnerProduct
variable = f
second_variable = g
[../]
[./f_dot_f]
type = VariableInnerProduct
variable = f
second_variable = f
[../]
[./norm_f]
type = ElementL2Norm
variable = f
[../]
[]
[Outputs]
file_base = variable_inner_product
csv = true
[]
(modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_cut_mesh.i)
# This test is for two layer materials with different youngs modulus with AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
output_cut_plane = true
[]
[UserObjects]
[cut]
type = InterfaceMeshCut2DUserObject
mesh_file = line.e
interface_velocity_function = -1
heal_always = true
[]
[]
[Mesh]
use_displaced_mesh = true
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 5
ymin = 0
ymax = 5
elem_type = QUAD4
[]
[left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0 0'
input = generated_mesh
[]
[left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0 5'
input = left_bottom
[]
[]
# [Functions]
# [ls_func]
# type = ParsedFunction
# expression = 'y-2.73+t'
# []
# []
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[ls]
[]
[a_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[a_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[a_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
# [ls_function]
# type = FunctionAux
# variable = ls
# function = ls_func
# []
[a_strain_xx]
type = RankTwoAux
variable = a_strain_xx
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
[]
[a_strain_yy]
type = RankTwoAux
variable = a_strain_yy
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
[]
[a_strain_xy]
type = RankTwoAux
variable = a_strain_xy
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
[]
[b_strain_xx]
type = RankTwoAux
variable = b_strain_xx
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
[]
[b_strain_yy]
type = RankTwoAux
variable = b_strain_yy
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
[]
[b_strain_xy]
type = RankTwoAux
variable = b_strain_xy
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
[]
[stress_xx]
type = RankTwoAux
variable = stress_xx
rank_two_tensor = stress
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
variable = stress_xy
rank_two_tensor = stress
index_i = 0
index_j = 1
[]
[stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_i = 1
index_j = 1
[]
[]
[Kernels]
[solid_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[solid_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
use_displaced_mesh = true
[]
[]
[Constraints]
[dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[]
[BCs]
[bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[]
[bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[]
[topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[]
[topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[]
[]
[Materials]
[elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[]
[strain_A]
type = ComputeFiniteStrain
base_name = A
[]
[stress_A]
type = ComputeFiniteStrainElasticStress
base_name = A
[]
[elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e7
poissons_ratio = 0.3
[]
[strain_B]
type = ComputeFiniteStrain
base_name = B
[]
[stress_B]
type = ComputeFiniteStrainElasticStress
base_name = B
[]
[combined_stress]
type = LevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[]
[combined_jacob_mult]
type = LevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = Jacobian_mult
[]
[]
[Postprocessors]
[disp_x_norm]
type = ElementL2Norm
variable = disp_x
[]
[disp_y_norm]
type = ElementL2Norm
variable = disp_y
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-13
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.1
num_steps = 4
max_xfem_update = 1
[]
[Outputs]
print_linear_residuals = false
exodus = true
[]
(test/tests/postprocessors/parsed_postprocessor/parsed_pp.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./L2_norm]
type = ElementL2Norm
variable = u
[../]
[L1_norm]
type = ElementL1Error
function = 0
variable = u
[]
[parsed]
type = ParsedPostprocessor
expression = 'L2_norm / L1_norm'
pp_names = 'L2_norm L1_norm'
[]
[parsed_with_t]
type = ParsedPostprocessor
expression = 'L2_norm + L1_norm + t'
pp_names = 'L2_norm L1_norm'
use_t = true
[]
[parsed_with_constants]
type = ParsedPostprocessor
expression = 'L2_norm + 3*L1_norm + mu'
pp_names = 'L2_norm L1_norm'
constant_names = 'mu'
constant_expressions = '4'
[]
[]
[Executioner]
type = Transient
num_steps = 4
nl_abs_tol = 1e-8
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
[]
[Outputs]
csv = true
[]
(test/tests/restart/restart_diffusion/restart_diffusion_test_steady.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./unorm]
type = ElementL2Norm
variable = u
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = steady_out
exodus = true
checkpoint = true
[]
(test/tests/kernels/hfem/3d-lower-d-volumes.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
nz = 3
dim = 3
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[uhat]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[lambdab]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[]
[AuxVariables]
[v]
order = CONSTANT
family = MONOMIAL
block = 0
initial_condition = '1'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[source]
type = CoupledForce
variable = u
v = v
coef = '1'
block = 0
[]
[reaction]
type = Reaction
variable = uhat
rate = '1'
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[uhat_coupled]
type = CoupledForce
variable = uhat
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
v = lambdab
coef = '1'
[]
[]
[DGKernels]
[surface]
type = TestLowerDVolumes
variable = u
lowerd_variable = lambda
l = 1
n = 3
[]
[]
[BCs]
[all]
type = HFEMDirichletBC
boundary = 'left right top bottom back front'
variable = u
lowerd_variable = lambdab
uhat = uhat
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementL2Norm
variable = lambda
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
# we hide lambda because it may flip sign due to element
# renumbering with distributed mesh
type = Exodus
hide = lambda
[]
[]
(test/tests/auxkernels/mesh_integer/dg_mesh_integer.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 5
ny = 5
extra_element_integers = 'material_id'
[]
[set_material_id0]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '0.8 0.6 0'
block_id = 0
location = INSIDE
integer_name = material_id
[]
[set_material_id1]
type = SubdomainBoundingBoxGenerator
input = set_material_id0
bottom_left = '0 0 0'
top_right = '0.8 0.6 0'
block_id = 1
location = OUTSIDE
integer_name = material_id
[]
[]
[Variables]
[u]
family = L2_LAGRANGE
order = FIRST
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = dc
[]
[timederivative]
type = TimeDerivative
variable = u
[]
[sourceterm]
type = BodyForce
variable = u
function = 1
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
diff = dc
epsilon = -1
sigma = 6
[]
[]
[AuxVariables]
[id]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[id]
type = ElementIntegerAux
variable = id
integer_names = material_id
[]
[]
[BCs]
[vacuum]
type = VacuumBC
variable = u
boundary = 'right left top bottom'
[]
[]
[Materials]
[dc]
type = ConstantIDMaterial
prop_name = dc
prop_values = '1 2'
id_name = material_id
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Transient
end_time = 0.1
dt = 0.01
nl_abs_tol = 1.e-15
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/restart/restart_transient_from_steady/steady.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right'
value = 1
[../]
[]
[Postprocessors]
[./unorm]
type = ElementL2Norm
variable = u
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
checkpoint = true
[]
(test/tests/multiapps/picard/pseudo_transient_picard_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./u]
[../]
[]
[Kernels]
[./time]
type = CoefTimeDerivative
variable = v
Coefficient = 0.1
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[]
[BCs]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[../]
[]
[Postprocessors]
[./vnorm]
type = ElementL2Norm
variable = v
[../]
[]
[Executioner]
type = Transient
end_time = 10
nl_abs_tol = 1e-12
steady_state_detection = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/hfem/dirichlet.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
dim = 2
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[uhat]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[lambdab]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[]
[AuxVariables]
[v]
order = CONSTANT
family = MONOMIAL
block = 0
initial_condition = '1'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[source]
type = CoupledForce
variable = u
v = v
coef = '1'
block = 0
[]
[reaction]
type = Reaction
variable = uhat
rate = '1'
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[uhat_coupled]
type = CoupledForce
variable = uhat
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
v = lambdab
coef = '1'
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = HFEMDirichletBC
boundary = 'left right top bottom'
variable = u
lowerd_variable = lambdab
uhat = uhat
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementL2Norm
variable = lambda
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
# we hide lambda because it may flip sign due to element
# renumbering with distributed mesh
type = Exodus
hide = lambda
[]
[]
(test/tests/auxkernels/element_aux_var/element_high_order_aux_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./high_order]
order = NINTH
family = MONOMIAL
[../]
[./one]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
# Coupling of nonlinear to Aux
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = CoupledForce
variable = u
v = one
[../]
[]
[AuxKernels]
[./coupled_high_order]
variable = high_order
type = CoupledAux
value = 2
operator = +
coupled = u
execute_on = 'initial timestep_end'
[../]
[./constant]
variable = one
type = ConstantAux
value = 1
execute_on = 'initial timestep_end'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./int2_u]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[../]
[./int2_ho]
type = ElementL2Norm
variable = high_order
execute_on = 'initial timestep_end'
[../]
[./int_u]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[../]
[./int_ho]
type = ElementIntegralVariablePostprocessor
variable = high_order
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
[./ex_out]
type = Exodus
file_base = ho
elemental_as_nodal = true
[../]
[]
(test/tests/executioners/fixed_point/2d_diffusion_fixed_point_toggle.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = -1
xmax = 1
ymin = -1
ymax = 1
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[pseudo_time]
type = CoupledForceLagged
variable = u
coefficient = 0.1
v = u
tag = 'previous'
[]
[pseudo_time_compensation]
type = CoefReaction
variable = u
coefficient = 0.1
[]
[]
[BCs]
[left]
type = VacuumBC
variable = u
boundary = left
[]
[right]
type = NeumannBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
[]
[udiff]
type = ElementL2Diff
variable = u
tag = 'previous'
[]
[]
[Problem]
type = FixedPointProblem
fp_tag_name = 'previous'
tagged_vector_for_partial_residual = false
[]
[Executioner]
type = FixedPointSteady
nl_rel_tol = 1e-2
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/auxkernels/solution_aux/thread_xda.i)
[Mesh]
# This test uses SolutionUserObject which doesn't work with ParallelMesh.
type = GeneratedMesh
parallel_type = REPLICATED
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./u_xda_func]
type = SolutionFunction
solution = xda_u
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 2
[../]
[]
[UserObjects]
[./xda_u]
type = SolutionUserObject
system = nl0
mesh = aux_nonlinear_solution_out_0001_mesh.xda
es = aux_nonlinear_solution_out_0001.xda
system_variables = u
execute_on = initial
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-10
[]
[Postprocessors]
[./unorm]
type = ElementL2Norm
variable = u
[../]
[./uerror]
type = ElementL2Error
variable = u
function = u_xda_func
[../]
[]
[Outputs]
csv = true
[]
(test/tests/kernels/hfem/neumann.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
dim = 2
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[reaction]
type = Reaction
variable = u
rate = '1'
block = 0
[]
[source]
type = BodyForce
variable = u
value = '1'
block = 0
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = NeumannBC
boundary = 'left right top bottom'
variable = u
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementL2Norm
variable = lambda
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
# we hide lambda because it may flip sign due to element
# renumbering with distributed mesh
type = Exodus
hide = lambda
[]
[]
(test/tests/kernels/hfem/lower-d-volumes.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
dim = 2
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[uhat]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[lambdab]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[]
[AuxVariables]
[v]
order = CONSTANT
family = MONOMIAL
block = 0
initial_condition = '1'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[source]
type = CoupledForce
variable = u
v = v
coef = '1'
block = 0
[]
[reaction]
type = Reaction
variable = uhat
rate = '1'
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[uhat_coupled]
type = CoupledForce
variable = uhat
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
v = lambdab
coef = '1'
[]
[]
[DGKernels]
[surface]
type = TestLowerDVolumes
variable = u
lowerd_variable = lambda
l = 1
n = 3
[]
[]
[BCs]
[all]
type = HFEMDirichletBC
boundary = 'left right top bottom'
variable = u
lowerd_variable = lambdab
uhat = uhat
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementL2Norm
variable = lambda
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
# we hide lambda because it may flip sign due to element
# renumbering with distributed mesh
type = Exodus
hide = lambda
[]
[]
(test/tests/postprocessors/element_l2_norm/element_l2_norm.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./L2_norm]
type = ElementL2Norm
variable = u
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
(test/tests/multiapps/picard/steady_custom_picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[]
[vnorm]
type = ElementL2Norm
variable = v
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = SteadyWithPicardCheck
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
disable_fixed_point_residual_norm_check = true
pp_name = unorm
pp_step_tol = 1e-4
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = steady_picard_sub.i
no_backup_and_restore = true
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/kernels/hfem/robin.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
dim = 2
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[source]
type = BodyForce
variable = u
value = '1'
block = 0
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = VacuumBC
boundary = 'left right top bottom'
variable = u
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementL2Norm
variable = lambda
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
# we hide lambda because it may flip sign due to element
# renumbering with distributed mesh
type = Exodus
hide = lambda
[]
[]
(test/tests/postprocessors/internal_side_jump/internal_side_jump.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[./box]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
block_id = 1
[../]
[]
[Variables]
[./u]
family = L2_LAGRANGE
order = FIRST
[../]
[]
[ICs]
[./ic0]
type = ConstantIC
variable = u
block = 0
value = 4
[../]
[./ic1]
type = ConstantIC
variable = u
block = 1
value = 6
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[DGKernels]
[./dgdiff]
type = DGDiffusion
variable = u
sigma = 4
epsilon = 1
[../]
[]
[BCs]
[./all]
type = VacuumBC
variable = u
boundary = '0 1 2 3'
[../]
[]
[Postprocessors]
[./L2_norm]
type = ElementL2Norm
variable = u
[../]
[./jump]
type = InternalSideJump
variable = u
execute_on = 'initial timestep_end'
[../]
[./jumpold]
type = InternalSideJump
variable = u
implicit = false
[../]
[]
[Executioner]
type = Transient
num_steps = 3
nl_abs_tol = 1e-12
[]
[Outputs]
csv = true
[]
(test/tests/multiapps/picard/pseudo_transient_picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[]
[vnorm]
type = ElementL2Norm
variable = v
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
fixed_point_rel_tol = 1e-6
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = pseudo_transient_picard_sub.i
no_backup_and_restore = true
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/multiapps/steffensen/transient_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[u]
[]
[]
[Kernels]
[time]
type = CoefTimeDerivative
variable = v
Coefficient = 0.1
[]
[diff_v]
type = Diffusion
variable = v
[]
[force_v]
type = CoupledForce
variable = v
v = u
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Postprocessors]
[vnorm]
type = ElementL2Norm
variable = v
[]
[]
[Executioner]
type = Transient
end_time = 10
nl_abs_tol = 1e-12
steady_state_detection = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_algorithm = 'steffensen'
[]
[Outputs]
[csv]
type = CSV
start_step = 6
[]
exodus = false
[]
(test/tests/multiapps/secant/steady_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[u]
[]
[]
[Kernels]
[diff_v]
type = Diffusion
variable = v
[]
[force_v]
type = CoupledForce
variable = v
v = u
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Postprocessors]
[vnorm]
type = ElementL2Norm
variable = v
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'secant'
[]
[Outputs]
csv = true
exodus = false
[]
(test/tests/multiapps/secant/transient_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[u]
[]
[]
[Kernels]
[time]
type = CoefTimeDerivative
variable = v
Coefficient = 0.1
[]
[diff_v]
type = Diffusion
variable = v
[]
[force_v]
type = CoupledForce
variable = v
v = u
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Postprocessors]
[vnorm]
type = ElementL2Norm
variable = v
[]
[]
[Executioner]
type = Transient
end_time = 10
nl_abs_tol = 1e-12
steady_state_detection = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_algorithm = 'secant'
[]
[Outputs]
[csv]
type = CSV
start_step = 6
[]
exodus = false
[]
(modules/geochemistry/test/tests/kernels/dispersion_1.i)
# Dispersion of a step-function front of concentration
# The initial condition is such that the theoretical result is exactly
# c = erf(x/sqrt(4*t*D)), where D = hydrodynamic_dispersion
#
# The finite mesh resolution and large time-step size means this is only achieved approximately (increasing nx and decreasing results in the error decreasing, but note the series approximation to the error function means that the error should never be exactly zero)
por = 2.0 # this is the porosity. The result should not depend on por in this example since it appears in both terms of the PDE
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -5
xmax = 5
[]
[Variables]
[conc]
[]
[]
[ICs]
[spike]
type = FunctionIC
variable = conc
function = 'if(x<=0.0, -1.0, 1.0)'
[]
[]
[Kernels]
[dot]
type = GeochemistryTimeDerivative
porosity = ${por}
variable = conc
[]
[disp]
type = GeochemistryDispersion
variable = conc
porosity = ${por}
tensor_coeff = '0.3 0 0 0 0 0 0 0 0'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.5
end_time = 1.0
[]
[AuxVariables]
[expected]
[]
[should_be_zero]
[]
[]
[AuxKernels]
[expected]
type = FunctionAux
variable = expected
function = erf
[]
[should_be_zero]
type = ParsedAux
coupled_variables = 'expected conc'
expression = 'expected - conc'
variable = should_be_zero
[]
[]
[Postprocessors]
[error]
type = ElementL2Norm
variable = should_be_zero
[]
[]
[Functions]
[erf]
type = ParsedFunction
# series expansion for evaluating the error function
expression = 'xi := x / sqrt(4 * t * 0.3); expxi := exp(-xi * xi); if(x < 0.0, -1.0, if(x > 0.0, 1.0, 0.0)) * 2 / sqrt(pi) * sqrt(1 - expxi) * (sqrt(pi) / 2.0 + 31.0 * expxi / 200.0 - 341.0 * expxi * expxi / 8000.0)'
[]
[]
[Outputs]
exodus = true
execute_on = final
[]
(test/tests/executioners/fixed_point/2d_diffusion_fixed_point_toggle_mat.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = -1
xmax = 1
ymin = -1
ymax = 1
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[pseudo_time]
type = MatKernel
variable = u
# material property name is hardcoded in VarCouplingMaterial
mat_prop = 'diffusion'
[]
[pseudo_time_compensation]
type = CoefReaction
variable = u
coefficient = 0.1
[]
[]
[Materials]
[umat]
type = VarCouplingMaterial
var = u
tag = 'previous'
coef = -0.1
[]
[]
[BCs]
[left]
type = VacuumBC
variable = u
boundary = left
[]
[right]
type = NeumannBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
[]
[udiff]
type = ElementL2Diff
variable = u
tag = 'previous'
[]
[]
[Problem]
type = FixedPointProblem
fp_tag_name = 'previous'
tagged_vector_for_partial_residual = false
[]
[Executioner]
type = FixedPointSteady
nl_rel_tol = 1e-2
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/steffensen/transient_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[coupling_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[unorm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'steffensen'
fixed_point_max_its = 30
transformed_variables = 'u'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'transient_sub.i'
clone_parent_mesh = true
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
execute_on = 'timestep_begin'
[]
[]
(test/tests/mortar/continuity-2d-conforming/conforming_two_var.i)
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-conf.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Functions]
[./exact_sln]
type = ParsedFunction
expression= y
[../]
[./ffn]
type = ParsedFunction
expression= 0
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm_u]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm_v]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./coupled_u]
type = CoupledForce
variable = v
v = u
[../]
[]
[Problem]
extra_tag_vectors = 'ref'
[]
[Constraints]
[./ced_u]
type = EqualValueConstraint
variable = lm_u
secondary_variable = u
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
absolute_value_vector_tags = 'ref'
[../]
[./ced_v]
type = EqualValueConstraint
variable = lm_v
secondary_variable = v
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
absolute_value_vector_tags = 'ref'
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_sln
[../]
[./allv]
type = DirichletBC
variable = v
boundary = '1 2 3 4'
value = 0
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[./l2_v]
type = ElementL2Norm
variable = v
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/auxkernels/element_aux_var/l2_element_aux_var_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
second_order = true
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./l2_lagrange]
order = FIRST
family = L2_LAGRANGE
[../]
[./l2_hierarchic]
order = FIRST
family = L2_HIERARCHIC
[../]
[./one]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
# Coupling of nonlinear to Aux
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = CoupledForce
variable = u
v = one
[../]
[]
[AuxKernels]
[./coupled_l2_lagrange]
variable = l2_lagrange
type = CoupledAux
value = 2
operator = +
coupled = u
execute_on = 'initial timestep_end'
[../]
[./coupled_l2_hierarchic]
variable = l2_hierarchic
type = CoupledAux
value = 2
operator = +
coupled = u
execute_on = 'initial timestep_end'
[../]
[./constant]
variable = one
type = ConstantAux
value = 1
execute_on = 'initial timestep_end'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./int2_u]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[../]
[./int2_l2_lagrange]
type = ElementL2Norm
variable = l2_lagrange
execute_on = 'initial timestep_end'
[../]
[./int2_l2_hierarchic]
type = ElementL2Norm
variable = l2_hierarchic
execute_on = 'initial timestep_end'
[../]
[./int_u]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[../]
[./int_l2_lagrange]
type = ElementIntegralVariablePostprocessor
variable = l2_lagrange
execute_on = 'initial timestep_end'
[../]
[./int_l2_hierarchic]
type = ElementIntegralVariablePostprocessor
variable = l2_hierarchic
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
[./ex_out]
type = Exodus
file_base = l2elemaux
elemental_as_nodal = true
[../]
[]
(test/tests/auxkernels/mesh_integer/mesh_integer.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 5
ny = 5
extra_element_integers = 'material_id'
[]
[set_material_id0]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '0.8 0.6 0'
block_id = 0
location = INSIDE
integer_name = material_id
[]
[set_material_id1]
type = SubdomainBoundingBoxGenerator
input = set_material_id0
bottom_left = '0 0 0'
top_right = '0.8 0.6 0'
block_id = 1
location = OUTSIDE
integer_name = material_id
[]
[]
[Variables]
[u][]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = dc
[]
[timederivative]
type = TimeDerivative
variable = u
[]
[sourceterm]
type = BodyForce
variable = u
function = 1
[]
[]
[AuxVariables]
[id]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[id]
type = ElementIntegerAux
variable = id
integer_names = material_id
[]
[]
[BCs]
[vacuum]
type = VacuumBC
variable = u
boundary = 'right left top bottom'
[]
[]
[Materials]
[dc]
type = ConstantIDMaterial
prop_name = dc
prop_values = '1 2'
id_name = material_id
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Transient
end_time = 0.1
dt = 0.01
nl_abs_tol = 1.e-15
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/multiapps/picard/steady_picard_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./u]
[../]
[]
[Kernels]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[]
[BCs]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[../]
[]
[Postprocessors]
[./vnorm]
type = ElementL2Norm
variable = v
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/csv/csv_align.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./aux0]
order = SECOND
family = SCALAR
[../]
[./aux1]
family = SCALAR
initial_condition = 5
[../]
[./aux2]
family = SCALAR
initial_condition = 10
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./right_u]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Postprocessors]
[./num_vars]
type = NumVars
system = 'NL'
[../]
[./num_aux]
type = NumVars
system = 'AUX'
[../]
[./norm]
type = ElementL2Norm
variable = u
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 4
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = CSV
align = true
delimiter = ', '
sync_times = '0.123456789123412 0.15 0.2'
precision = 8
[../]
[]
[ICs]
[./aux0_IC]
variable = aux0
values = '12 13'
type = ScalarComponentIC
[../]
[]
(test/tests/multiapps/steffensen/steady_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[u]
[]
[]
[Kernels]
[diff_v]
type = Diffusion
variable = v
[]
[force_v]
type = CoupledForce
variable = v
v = u
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Postprocessors]
[vnorm]
type = ElementL2Norm
variable = v
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'steffensen'
[]
[Outputs]
csv = true
exodus = false
[]
(test/tests/multiapps/steffensen/steady_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'steffensen'
fixed_point_max_its = 30
transformed_variables = 'u'
accept_on_max_fixed_point_iteration = true
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'steady_sub.i'
clone_parent_mesh = true
transformed_variables = 'v'
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_esm.i)
# This test is for two layer materials with different youngs modulus with AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
output_cut_plane = true
[]
[UserObjects]
[level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[]
[esm]
type = CutElementSubdomainModifier
geometric_cut_userobject = level_set_cut_uo
apply_initial_conditions = false
[]
[]
[Mesh]
use_displaced_mesh = true
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 5
ymin = 0
ymax = 5
elem_type = QUAD4
[]
[bottom]
type = SubdomainBoundingBoxGenerator
input = generated_mesh
block_id = 0
bottom_left = '0 0 0'
top_right = '5 2.5 0'
[]
[top]
type = SubdomainBoundingBoxGenerator
input = bottom
block_id = 1
bottom_left = '0 2.5 0'
top_right = '5 5 0'
[]
[]
[Functions]
[ls_func]
type = ParsedFunction
expression = 'y-2.73+t'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[ls]
[]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[ls_function]
type = FunctionAux
variable = ls
function = ls_func
[]
[strain_xx]
type = RankTwoAux
variable = strain_xx
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[]
[strain_yy]
type = RankTwoAux
variable = strain_yy
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[]
[strain_xy]
type = RankTwoAux
variable = strain_xy
rank_two_tensor = total_strain
index_i = 0
index_j = 1
[]
[stress_xx]
type = RankTwoAux
variable = stress_xx
rank_two_tensor = stress
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
variable = stress_xy
rank_two_tensor = stress
index_i = 0
index_j = 1
[]
[stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_i = 1
index_j = 1
[]
[]
[Kernels]
[solid_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[solid_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
use_displaced_mesh = true
[]
[]
[Constraints]
[dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[]
[BCs]
[bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[]
[bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[]
[topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[]
[topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[]
[]
[Materials]
[elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1e9
poissons_ratio = 0.3
[]
[strain_A]
type = ComputeFiniteStrain
block = 1
[]
[stress_A]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
block = 0
youngs_modulus = 1e7
poissons_ratio = 0.3
[]
[strain_B]
type = ComputeFiniteStrain
block = 0
[]
[stress_B]
type = ComputeFiniteStrainElasticStress
block = 0
[]
[]
[Postprocessors]
[disp_x_norm]
type = ElementL2Norm
variable = disp_x
[]
[disp_y_norm]
type = ElementL2Norm
variable = disp_y
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-13
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.1
num_steps = 4
max_xfem_update = 1
[]
[Outputs]
print_linear_residuals = false
exodus = true
[]
(test/tests/executioners/fixed_point/nonlinear_fixed_point.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = -1
xmax = 1
ymin = -1
ymax = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./power]
type = PReaction
variable = u
coefficient = 0.2
power = -5
# Comment out this will make fixed point iteration converged in one iteration.
# However, this makes the solving diverge and require a proper initial condition (>1.00625).
vector_tags = 'previous'
[../]
[]
[BCs]
[./left]
type = VacuumBC
variable = u
boundary = left
[../]
[./right]
type = NeumannBC
variable = u
boundary = right
value = 10
[../]
[]
[Postprocessors]
[./unorm]
type = ElementL2Norm
variable = u
[../]
[]
[Problem]
type = FixedPointProblem
fp_tag_name = 'previous'
[]
[Executioner]
type = FixedPointSteady
nl_rel_tol = 1e-2
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/ics/zero_ic/test.i)
# This test makes sure that when people use an initial condition that accesses _zero
# the code does not crash. The "problem" is that InitialCondition uses _qp which for
# nodal variables loops over nodes, rather then q-points. Thus if people have more
# nodes that q-points (they have to dial a lower q-rule in the Executioner block), the
# code would do an out-of-bounds access and crash.
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX27
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./ic_u]
type = ZeroIC
variable = u
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./all]
type = DirichletBC
variable = u
boundary = 'left right top bottom front back'
value = 0
[../]
[]
[Postprocessors]
[./l2_norm]
type = ElementL2Norm
variable = u
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[./Quadrature]
type = GAUSS
order = FIRST
[../]
[]
[Outputs]
csv = true
[]
(test/tests/restart/start_time_override/start_time_override.i)
[Mesh]
type = GeneratedMesh
nx = 5
ny = 5
dim = 2
[]
[Problem]
restart_file_base = transient_out_cp/LATEST
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[bodyforce]
type = BodyForce
variable = u
value = 10.0
[]
[ie]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 2
value = 10
[]
[]
[Postprocessors]
[u_norm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Transient
# Start time can be set explicitly here or be picked up from the restart file
num_steps = 5
dt = 0.1
[]
[Outputs]
csv = true
[]
(test/tests/dgkernels/dg_block_restrict/2d_dg_diffusion_block_restrict.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = 2
nx = 10
ymax = 2
ny = 10
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
block_id = 1
top_right = '1 1 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
[]
[boundaries]
input = interface
type = BreakBoundaryOnSubdomainGenerator
boundaries = 'left bottom'
[]
[]
[Variables]
[u]
order = FIRST
family = L2_LAGRANGE
block = 1
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[source]
type = BodyForce
variable = u
[]
[]
[DGKernels]
[dg_diffusion]
type = DGDiffusion
variable = u
sigma = 4
epsilon = 1
[]
[]
[BCs]
[vacuum]
type = VacuumBC
variable = u
boundary = 'left_to_1 bottom_to_1'
[]
[primary1_inteface]
type = VacuumBC
variable = u
boundary = 'primary1_interface'
[]
[]
[Postprocessors]
[norm]
type = ElementL2Norm
variable = u
block = 1
[]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-12
[]
[Problem]
kernel_coverage_check = false
[]
[Outputs]
exodus = true
[]
(test/tests/restart/restart_transient_from_steady/restart_from_steady.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Problem]
restart_file_base = steady_out_cp/LATEST
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ie]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right'
value = 2
[../]
[]
[Postprocessors]
[./unorm]
type = ElementL2Norm
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
# Reset the start_time here
start_time = 0.0
num_steps = 5
dt = .1
[]
[Outputs]
exodus = true
[]
(test/tests/executioners/steady_time/steady_time.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
nx = 4
ny = 4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = time_function
[../]
[]
[Functions]
[./time_function]
type = ParsedFunction
expression = 't+1'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left right bottom top'
value = 0
[../]
[]
[Postprocessors]
[./norm]
type = ElementL2Norm
variable = u
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]