- bottom_leftThe bottom left point (in x,y,z with spaces in-between).
C++ Type:libMesh::VectorValue<double>
Controllable:No
Description:The bottom left point (in x,y,z with spaces in-between).
- insideHow to mark elements inside the box.
C++ Type:MooseEnum
Controllable:No
Description:How to mark elements inside the box.
- outsideHow to mark elements outside the box.
C++ Type:MooseEnum
Controllable:No
Description:How to mark elements outside the box.
- top_rightThe bottom left point (in x,y,z with spaces in-between).
C++ Type:libMesh::VectorValue<double>
Controllable:No
Description:The bottom left point (in x,y,z with spaces in-between).
BoxMarker
Marks the region inside and outside of a 'box' domain for refinement or coarsening.
Description
The BoxMarker
is a stand-alone marker that marks all elements inside and outside for coarsening or refinement. The marker operates using a bounding box that is specified by lower and upper extents of the bounding box, in 3 dimensions regardless of the dimensions of the problem.
Example Input Syntax
[Adaptivity]
[./Markers]
[./box]
type = BoxMarker
bottom_left = '0.3 0.3 0'
top_right = '0.6 0.6 0'
inside = refine
outside = do_nothing
[../]
[../]
[]
(test/tests/markers/box_marker/box_marker_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
Optional Parameters
- 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:No
Description:Set the enabled status of the MooseObject.
- 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
Advanced Parameters
Input Files
- (test/tests/markers/dont_mark/dont_mark_test.i)
- (modules/ray_tracing/test/tests/userobjects/ray_tracing_study/ray_data/ray_data.i)
- (test/tests/postprocessors/num_nodes/num_nodes.i)
- (test/tests/misc/serialized_solution/adapt.i)
- (test/tests/time_integrators/explicit-euler/ee-2d-linear-adapt.i)
- (test/tests/outputs/json/distributed/distributed.i)
- (test/tests/markers/combo_marker/combo_marker_test.i)
- (test/tests/userobjects/toggle_mesh_adaptivity/toggle_mesh_adaptivity.i)
- (test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles_toggle_adaptivity.i)
- (test/tests/postprocessors/memory_usage/vector_memory_usage.i)
- (test/tests/adaptivity/initial_marker/initial_marker.i)
- (test/tests/outputs/oversample/adapt.i)
- (test/tests/materials/stateful_prop/spatial_adaptivity_test.i)
- (test/tests/markers/box_marker/box_marker_adapt_test.i)
- (test/tests/interfacekernels/adaptivity/adaptivity.i)
- (test/tests/constraints/equal_value_boundary_constraint/adaptivity.i)
- (modules/optimization/examples/diffusion_reaction/parameter_mesh.i)
- (test/tests/fvkernels/fv_adapt/steady-adapt.i)
- (test/tests/adaptivity/initial_adapt/initial_adapt.i)
- (test/tests/outputs/exodus/variable_output_test.i)
- (test/tests/reporters/mesh_info/mesh_info.i)
- (modules/porous_flow/examples/lava_lamp/1phase_convection.i)
- (test/tests/misc/selective_reinit/selective_reinit_test.i)
- (test/tests/adaptivity/max_h_level/max_h_level.i)
- (test/tests/dirackernels/point_caching/point_caching_adaptive_refinement.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-2d-linear-adapt.i)
- (test/tests/materials/stateful_prop/stateful_prop_adaptivity_test.i)
- (test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles.i)
- (test/tests/adaptivity/interval/adapt_interval.i)
- (test/tests/postprocessors/nearest_node_number/nearest_node_number_3.i)
- (modules/level_set/test/tests/transfers/markers/single_level/parent.i)
- (modules/contact/test/tests/verification/patch_tests/automatic_patch_update/iteration_adaptivity_parallel.i)
- (test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles_toggle_adaptivity_wait.i)
- (test/tests/userobjects/toggle_mesh_adaptivity/toggle_mesh_adaptivity_wait.i)
- (modules/contact/test/tests/adaptivity/contact_initial_adaptivity.i)
- (test/tests/fvkernels/fv_adapt/transient-adapt.i)
- (test/tests/markers/box_marker/box_marker_test.i)
- (modules/porous_flow/examples/lava_lamp/2phase_convection.i)
- (test/tests/kernels/diffusion_with_hanging_node/simple_diffusion.i)
- (modules/contact/test/tests/verification/patch_tests/automatic_patch_update/iteration_adaptivity_parallel_node_face.i)
- (modules/level_set/test/tests/functions/olsson_bubble/olsson_bubble.i)
- (test/tests/postprocessors/num_dofs/num_dofs.i)
- (test/tests/postprocessors/num_elems/num_elems.i)
- (test/tests/kernels/hfem/robin_adapt.i)
- (test/tests/kernels/diffusion_with_hanging_node/ad_simple_diffusion.i)
- (test/tests/outputs/output_interface/marker.i)
(test/tests/markers/box_marker/box_marker_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Adaptivity]
[./Markers]
[./box]
type = BoxMarker
bottom_left = '0.3 0.3 0'
top_right = '0.6 0.6 0'
inside = refine
outside = do_nothing
[../]
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/markers/dont_mark/dont_mark_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Adaptivity]
[./Markers]
[./box]
type = BoxMarker
bottom_left = '0.3 0.3 0'
top_right = '0.6 0.6 0'
inside = refine
outside = coarsen
[../]
[./combo]
type = ComboMarker
markers = 'box box2'
[../]
[./box2]
type = BoxMarker
bottom_left = '0.5 0.5 0'
top_right = '0.8 0.8 0'
inside = dont_mark
outside = refine
[../]
[../]
[]
[Outputs]
exodus = true
[]
(modules/ray_tracing/test/tests/userobjects/ray_tracing_study/ray_data/ray_data.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmax = 5
ymax = 5
[]
[]
[RayBCs]
[kill1]
type = KillRayBC
boundary = 'top right bottom left'
study = test1
[]
[kill2]
type = KillRayBC
boundary = 'top right bottom left'
study = test2
[]
[kill3]
type = KillRayBC
boundary = 'top right bottom left'
study = test3
[]
[kill4]
type = KillRayBC
boundary = 'top right bottom left'
study = test4
[]
[]
[RayKernels]
[data1]
type = TestRayDataRayKernel
study = test1
[]
[data2]
type = TestRayDataRayKernel
study = test2
[]
[data3]
type = TestRayDataRayKernel
study = test3
[]
[data4]
type = TestRayDataRayKernel
study = test4
[]
[]
[UserObjects]
[test1]
type = TestRayDataStudy
execute_on = timestep_end
vertex_to_vertex = true
centroid_to_vertex = true
centroid_to_centroid = true
data_size = 1
aux_data_size = 2
[]
[test2]
type = TestRayDataStudy
execute_on = timestep_end
vertex_to_vertex = true
centroid_to_vertex = true
centroid_to_centroid = true
data_size = 2
aux_data_size = 3
[]
[test3]
type = TestRayDataStudy
execute_on = timestep_end
vertex_to_vertex = true
centroid_to_vertex = true
centroid_to_centroid = true
data_size = 3
aux_data_size = 4
[]
[test4]
type = TestRayDataStudy
execute_on = timestep_end
vertex_to_vertex = true
centroid_to_vertex = true
centroid_to_centroid = true
data_size = 4
aux_data_size = 6
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Problem]
solve = false
[]
[Adaptivity]
steps = 1
marker = marker
[Markers/marker]
type = BoxMarker
bottom_left = '3 0 0'
top_right = '5 5 0'
inside = REFINE
outside = DO_NOTHING
[]
[]
[Postprocessors]
[ray_distance1]
type = RayTracingStudyResult
result = total_distance
study = test1
[]
[ray_distance2]
type = RayTracingStudyResult
result = total_distance
study = test2
[]
[ray_distance3]
type = RayTracingStudyResult
result = total_distance
study = test3
[]
[ray_distance4]
type = RayTracingStudyResult
result = total_distance
study = test4
[]
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/num_nodes/num_nodes.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
nz = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
order = FIRST
family = LAGRANGE
[../]
[./v_aux]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 3
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./num_nodes]
type = NumNodes
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(test/tests/misc/serialized_solution/adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./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]
[./aux_serialized]
type = TestSerializedSolution
system = aux
[../]
[./nl_serialized]
type = TestSerializedSolution
system = nl
[../]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Adaptivity]
marker = box_refine
[./Markers]
[./box_refine]
type = BoxMarker
bottom_left = '0.2 0.2 0'
top_right = '0.8 0.8 0'
inside = REFINE
outside = DONT_MARK
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/time_integrators/explicit-euler/ee-2d-linear-adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = (x+y)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*(x+y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
lumping = true
implicit = true
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
implicit = true
[../]
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '-0.4 -0.4 0'
inside = refine
top_right = '0.4 0.4 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'explicit-euler'
start_time = 0.0
num_steps = 4
dt = 0.005
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(test/tests/outputs/json/distributed/distributed.i)
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[]
[Adaptivity]
initial_marker = marker
[Markers/marker]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '1 0.5 0'
inside = 'refine'
outside = 'do_nothing'
[]
[]
[Variables/u]
[]
[Executioner]
type = Steady
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Reporters/mesh_info]
type = MeshInfo
[]
[Outputs]
json = true
[]
(test/tests/markers/combo_marker/combo_marker_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Adaptivity]
[./Markers]
[./box]
type = BoxMarker
bottom_left = '0.3 0.3 0'
top_right = '0.6 0.6 0'
inside = refine
outside = do_nothing
[../]
[./combo]
type = ComboMarker
markers = 'box box2'
[../]
[./box2]
type = BoxMarker
bottom_left = '0.5 0.5 0'
top_right = '0.8 0.8 0'
inside = refine
outside = coarsen
[../]
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/toggle_mesh_adaptivity/toggle_mesh_adaptivity.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.1
[]
[Adaptivity]
cycles_per_step = 1
marker = marker
max_h_level = 2
[./Markers]
[./marker]
type = BoxMarker
bottom_left = '0.35 0.25 0'
top_right = '0.5 0.5 0'
inside = refine
outside = coarsen
[../]
[../]
[]
[UserObjects]
[./mesh_adaptivity_off]
type = ToggleMeshAdaptivity
mesh_adaptivity = 'off'
[../]
[]
[Outputs]
exodus = true
[./console]
type = Console
print_mesh_changed_info = true
[../]
[]
(test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles_toggle_adaptivity.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
cycles_per_step = 1
marker = box
max_h_level = 2
initial_steps = 4
initial_marker = initial_box
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = dont_mark
type = BoxMarker
[../]
[./initial_box]
type = BoxMarker
bottom_left = '0.8 0.1 0'
top_right = '0.9 0.2 0'
inside = refine
outside = dont_mark
[../]
[../]
[]
[UserObjects]
[./toggle_adaptivity]
type = ToggleMeshAdaptivity
mesh_adaptivity = 'off'
[../]
[]
[Postprocessors]
[./adaptivity_cycles]
type = NumAdaptivityCycles
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/memory_usage/vector_memory_usage.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[GlobalParams]
order = CONSTANT
family = MONOMIAL
[]
[Variables]
[./u]
[../]
[]
[Adaptivity]
[./Markers]
[./box]
type = BoxMarker
bottom_left = '0.6 0.7 0'
top_right = '0.9 0.9 0'
inside = refine
outside = do_nothing
[../]
[../]
marker = box
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[VectorPostprocessors]
[./mem]
type = VectorMemoryUsage
execute_on = 'INITIAL TIMESTEP_END NONLINEAR LINEAR'
report_peak_value = true
mem_units = kilobytes # or bytes, megabytes, gigabytes
[../]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
csv = true
[]
(test/tests/adaptivity/initial_marker/initial_marker.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
initial_steps = 4
initial_marker = initial_box
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = dont_mark
type = BoxMarker
[../]
[./initial_box]
type = BoxMarker
bottom_left = '0.8 0.1 0'
top_right = '0.9 0.2 0'
inside = refine
outside = dont_mark
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/outputs/oversample/adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t*t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[./oversample]
type = Exodus
refinements = 2
file_base = adapt_out_oversample
execute_on = 'initial timestep_end'
[../]
[]
(test/tests/materials/stateful_prop/spatial_adaptivity_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
uniform_refine = 3
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ssm]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./conv]
type = Convection
variable = u
velocity = '1 0 0'
[../]
[]
[AuxKernels]
[./ssm]
type = MaterialRealAux
variable = ssm
property = diffusivity
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./ssm]
type = SpatialStatefulMaterial
block = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
num_steps = 4
dt = 1
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
[]
[Adaptivity]
marker = box
[./Markers]
[./box]
type = BoxMarker
bottom_left = '0.2 0.2 0'
top_right = '0.4 0.4 0'
inside = refine
outside = coarsen
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/markers/box_marker/box_marker_adapt_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 0
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Adaptivity]
steps = 1
marker = box
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/adaptivity/adaptivity.i)
# This input file is used for two tests:
# 1) Check that InterfaceKernels work with mesh adaptivity
# 2) Error out when InterfaceKernels are used with adaptivity
# and stateful material prpoerties
[Mesh]
parallel_type = 'replicated'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
[./InitialCondition]
type = ConstantIC
value = 1
[../]
block = 0
[../]
[./u_neighbor]
[./InitialCondition]
type = ConstantIC
value = 1
[../]
block = 1
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = (x*x*x)-6.0*x
[../]
[./bc_fn]
type = ParsedFunction
expression = (x*x*x)
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = diffusivity
block = 0
[../]
[./abs]
type = Reaction
variable = u
block = 0
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
block = 0
[../]
[./diffn]
type = MatDiffusionTest
variable = u_neighbor
prop_name = diffusivity
block = 1
[../]
[./absn]
type = Reaction
variable = u_neighbor
block = 1
[../]
[./forcingn]
type = BodyForce
variable = u_neighbor
function = forcing_fn
block = 1
[../]
[]
[InterfaceKernels]
[./flux_match]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = u_neighbor
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = FunctionDirichletBC
variable = u
boundary = 'left'
function = bc_fn
[../]
[./u_neighbor]
type = FunctionDirichletBC
variable = u_neighbor
boundary = 'right'
function = bc_fn
[../]
[]
[Materials]
active = 'constant'
[./stateful]
type = StatefulTest
prop_names = 'diffusivity'
prop_values = '1'
block = '0 1'
[../]
[./constant]
type = GenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '1'
block = '0 1'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Adaptivity]
marker = 'marker'
steps = 1
[./Markers]
[./marker]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '1 1 0'
inside = refine
outside = coarsen
[../]
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/constraints/equal_value_boundary_constraint/adaptivity.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 6
ny = 6
[]
[Adaptivity]
marker = 'box'
[Markers]
[box]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '1 1 0 '
inside = 'refine'
outside = 'do_nothing'
[]
[]
[]
[Variables]
[diffused]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = 'diffused'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = 'diffused'
boundary = 'left'
value = 1.0
[]
[right]
type = DirichletBC
variable = 'diffused'
boundary = 'right'
value = 0.0
[]
[]
[Constraints]
[y_top]
type = EqualValueBoundaryConstraint
variable = 'diffused'
primary = '45'
secondary = 'top'
penalty = 10e6
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
num_steps = 3
nl_rel_tol = 1e-06
nl_abs_tol = 1e-08
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/optimization/examples/diffusion_reaction/parameter_mesh.i)
[Mesh]
[gmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.5 0.5'
dy = '0.5 0.5'
ix = '1 1'
iy = '1 1'
subdomain_id = '0 0
0 1'
[]
parallel_type = REPLICATED
[]
[Adaptivity]
initial_steps = 2
initial_marker = box
[Markers/box]
type = BoxMarker
bottom_left = '0.75 0.75 0'
top_right = '1 1 0'
inside = REFINE
outside = DO_NOTHING
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
execute_on = TIMESTEP_END
[]
(test/tests/fvkernels/fv_adapt/steady-adapt.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 1
elem_type = QUAD4
[]
[]
[Variables]
[u]
order = CONSTANT
family = MONOMIAL
fv = true
type = MooseVariableFVReal
[]
[]
[Functions]
[exact-quadratic]
type = ParsedFunction
expression = '-(x-1)^2+1'
[]
[exact-linear]
type = ParsedFunction
expression = 'x'
[]
[]
[FVKernels]
inactive = 'source'
[diff]
type = FVDiffusion
variable = u
coeff = coeff
use_point_neighbors = true
[]
[source]
type = FVBodyForce
variable = u
function = 2
[]
[]
[FVBCs]
[right]
type = FVDirichletBC
variable = u
boundary = right
value = 1
[]
[left]
type = FVDirichletBC
variable = u
boundary = left
value = 0
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'hypre'
[]
[Adaptivity]
marker = box
initial_steps = 1
[Markers]
[box]
bottom_left = '0.5 0 0'
inside = refine
top_right = '1 1 0'
outside = do_nothing
type = BoxMarker
[]
[]
[]
[Outputs]
exodus = true
csv = true
[console]
type = Console
system_info = 'framework mesh aux nonlinear relationship execution'
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = u
function = exact-linear
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/adaptivity/initial_adapt/initial_adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
initial_steps = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/exodus/variable_output_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./aux]
family = SCALAR
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./aux_pp]
type = ScalarVariable
variable = aux
outputs = none
[../]
[]
[Outputs]
execute_on = 'timestep_end'
[./exodus]
type = Exodus
file_base = new_out
hide_variables = 'u box aux_pp'
scalar_as_nodal = true
execute_scalars_on = none
[../]
[./console]
Type = Console
[../]
[]
(test/tests/reporters/mesh_info/mesh_info.i)
[Mesh]
parallel_type = DISTRIBUTED
[generate]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
# For consistent partitioning across platforms
[Partitioner]
type = GridPartitioner
nx = 2
ny = 1
[]
[]
[Adaptivity]
initial_marker = marker
[Markers/marker]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '1 0.5 0'
inside = 'refine'
outside = 'do_nothing'
[]
[]
[Variables/u]
[]
[Executioner]
type = Steady
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Reporters/mesh_info]
type = MeshInfo
[]
[Outputs]
[out]
type = JSON
[]
[]
(modules/porous_flow/examples/lava_lamp/1phase_convection.i)
# Two phase density-driven convection of dissolved CO2 in brine
#
# The model starts with CO2 in the liquid phase only. The CO2 diffuses into the brine.
# As the density of the CO2-saturated brine is greater
# than the unsaturated brine, a gravitational instability arises and density-driven
# convection of CO2-rich fingers descend into the unsaturated brine.
#
# The instability is seeded by a random perturbation to the porosity field.
# Mesh adaptivity is used to refine the mesh as the fingers form.
#
# Note: this model is computationally expensive, so should be run with multiple cores.
[GlobalParams]
PorousFlowDictator = 'dictator'
gravity = '0 -9.81 0'
[]
[Adaptivity]
max_h_level = 2
marker = marker
initial_marker = initial
initial_steps = 2
[Indicators]
[indicator]
type = GradientJumpIndicator
variable = zi
[]
[]
[Markers]
[marker]
type = ErrorFractionMarker
indicator = indicator
refine = 0.8
[]
[initial]
type = BoxMarker
bottom_left = '0 1.95 0'
top_right = '2 2 0'
inside = REFINE
outside = DO_NOTHING
[]
[]
[]
[Mesh]
type = GeneratedMesh
dim = 2
ymin = 1.5
ymax = 2
xmax = 2
ny = 20
nx = 40
bias_y = 0.95
[]
[AuxVariables]
[xnacl]
initial_condition = 0.01
[]
[saturation_gas]
order = FIRST
family = MONOMIAL
[]
[xco2l]
order = FIRST
family = MONOMIAL
[]
[density_liquid]
order = FIRST
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = 'timestep_end'
[]
[xco2l]
type = PorousFlowPropertyAux
variable = xco2l
property = mass_fraction
phase = 0
fluid_component = 1
execute_on = 'timestep_end'
[]
[density_liquid]
type = PorousFlowPropertyAux
variable = density_liquid
property = density
phase = 0
execute_on = 'timestep_end'
[]
[]
[Variables]
[pgas]
[]
[zi]
scaling = 1e4
[]
[]
[ICs]
[pressure]
type = FunctionIC
function = 10e6-9.81*1000*y
variable = pgas
[]
[zi]
type = ConstantIC
value = 0
variable = zi
[]
[porosity]
type = RandomIC
variable = porosity
min = 0.25
max = 0.275
seed = 0
[]
[]
[BCs]
[top]
type = DirichletBC
value = 0.04
variable = zi
boundary = top
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pgas
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pgas
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pgas
disp_long = '0 0'
disp_trans = '0 0'
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = zi
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = zi
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = zi
disp_long = '0 0'
disp_trans = '0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas zi'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2
capillary_pressure = pc
[]
[]
[FluidProperties]
[co2sw]
type = CO2FluidProperties
[]
[co2]
type = TabulatedBicubicFluidProperties
fp = co2sw
[]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = '45'
[]
[brineco2]
type = PorousFlowFluidState
gas_porepressure = 'pgas'
z = 'zi'
temperature_unit = Celsius
xnacl = 'xnacl'
capillary_pressure = pc
fluid_state = fs
[]
[porosity]
type = PorousFlowPorosityConst
porosity = porosity
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-11 0 0 0 1e-11 0 0 0 1e-11'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
phase = 0
n = 2
s_res = 0.1
sum_s_res = 0.2
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
phase = 1
n = 2
s_res = 0.1
sum_s_res = 0.2
[]
[diffusivity]
type = PorousFlowDiffusivityConst
diffusion_coeff = '2e-9 2e-9 2e-9 2e-9'
tortuosity = '1 1'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1e6
nl_max_its = 25
l_max_its = 100
dtmax = 1e4
nl_abs_tol = 1e-6
[TimeStepper]
type = IterationAdaptiveDT
dt = 100
growth_factor = 2
cutback_factor = 0.5
[]
[]
[Functions]
[flux]
type = ParsedFunction
symbol_values = 'delta_xco2 dt'
symbol_names = 'dx dt'
expression = 'dx/dt'
[]
[]
[Postprocessors]
[total_co2_in_gas]
type = PorousFlowFluidMass
phase = 1
fluid_component = 1
[]
[total_co2_in_liquid]
type = PorousFlowFluidMass
phase = 0
fluid_component = 1
[]
[numdofs]
type = NumDOFs
[]
[delta_xco2]
type = ChangeOverTimePostprocessor
postprocessor = total_co2_in_liquid
[]
[dt]
type = TimestepSize
[]
[flux]
type = FunctionValuePostprocessor
function = flux
[]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
exodus = true
csv = true
[]
(test/tests/misc/selective_reinit/selective_reinit_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./dummy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./constant_dummy]
type = ConstantAux
variable = dummy
execute_on = 'initial timestep_end'
value = 4
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./u_integral]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Adaptivity]
[./Indicators]
[./indicator]
type = GradientJumpIndicator
variable = u
[../]
[../]
[./Markers]
[./box]
type = BoxMarker
bottom_left = '0.2 0.2 0'
top_right = '0.8 0.8 0'
inside = refine
outside = coarsen
[../]
[../]
[]
[Outputs]
exodus = true
show = u
[]
[LotsOfAuxVariables]
[./avar]
number = 20
[../]
[]
(test/tests/adaptivity/max_h_level/max_h_level.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
execute_scalars_on = none
[../]
[]
(test/tests/dirackernels/point_caching/point_caching_adaptive_refinement.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
uniform_refine = 2
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[DiracKernels]
active = 'point_source'
[./point_source]
type = CachingPointSource
variable = u
[../]
[]
[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'
[]
[Adaptivity]
steps = 3
marker = 'combo'
[./Markers]
[./combo]
# In a real problem you would want to mark based on an error
# indicator, but we want this test to run consistently in
# parallel, so we just mark elements within a box for
# refinement. The boxes here are based on the 8x8
# uniformly-refined initial grid.
type = ComboMarker
markers = 'box1 box2 box3'
[../]
[./box1]
type = BoxMarker
bottom_left = '0.125 0.625 0'
top_right = '0.375 0.875 0'
inside = refine
outside = dont_mark
[../]
[./box2]
type = BoxMarker
bottom_left = '0.625 0.625 0'
top_right = '0.875 0.875 0'
inside = refine
outside = dont_mark
[../]
[./box3]
type = BoxMarker
bottom_left = '0.625 0.125 0'
top_right = '0.875 0.375 0'
inside = refine
outside = dont_mark
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/time_integrators/actually_explicit_euler_verification/ee-2d-linear-adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = (x+y)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*(x+y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
preset = false
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '-0.4 -0.4 0'
inside = refine
top_right = '0.4 0.4 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
start_time = 0.0
num_steps = 4
dt = 0.005
l_tol = 1e-12
[./TimeIntegrator]
type = ActuallyExplicitEuler
[../]
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(test/tests/materials/stateful_prop/stateful_prop_adaptivity_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
uniform_refine = 2
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./prop1]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = MatDiffusionTest
variable = u
prop_name = thermal_conductivity
prop_state = old # Use the "Old" value to compute conductivity
[../]
[./ie]
type = TimeDerivative
variable = u
[../]
[]
[AuxKernels]
[./prop1_output]
type = MaterialRealAux
variable = prop1
property = thermal_conductivity
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = 1
value = 0.0
[../]
[./top]
type = DirichletBC
variable = u
boundary = 2
value = 1.0
[../]
[]
[Materials]
[./stateful]
type = StatefulTest
prop_names = thermal_conductivity
prop_values = 1.0
[../]
[]
[Postprocessors]
[./integral]
type = ElementAverageValue
variable = prop1
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
l_max_its = 10
start_time = 0.0
num_steps = 4
dt = .1
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Adaptivity]
marker = box
[./Markers]
[./box]
type = BoxMarker
bottom_left = '0.2 0.2 0.2'
top_right = '0.4 0.4 0.4'
inside = refine
outside = coarsen
[../]
[../]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
cycles_per_step = 1
marker = box
max_h_level = 2
initial_steps = 4
initial_marker = initial_box
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = dont_mark
type = BoxMarker
[../]
[./initial_box]
type = BoxMarker
bottom_left = '0.8 0.1 0'
top_right = '0.9 0.2 0'
inside = refine
outside = dont_mark
[../]
[../]
[]
[Postprocessors]
[./adaptivity_cycles]
type = NumAdaptivityCycles
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(test/tests/adaptivity/interval/adapt_interval.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 6
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
interval = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/nearest_node_number/nearest_node_number_3.i)
# Using NearestNodeNumber, finds the node number of the nearest node to the point in the mesh
# In this case, the point is coincident with node number 1, but then adaptivity changes this
[Mesh]
type = GeneratedMesh
dim = 2
ny = 1
nx = 4
xmax = 8
# For consistency with distributed mesh
allow_renumbering = false
[]
[Adaptivity]
marker = marker
[Markers]
[marker]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '8 1 0'
inside = refine
outside = do_nothing
[]
[]
[]
[UserObjects]
[nnn_uo]
type = NearestNodeNumberUO
point = '2 0 0'
execute_on = 'initial timestep_begin'
[]
[]
[Postprocessors]
[nnn]
type = NearestNodeNumber
nearest_node_number_uo = nnn_uo
execute_on = 'initial timestep_begin'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
end_time = 2
[]
[Outputs]
csv = true
[]
(modules/level_set/test/tests/transfers/markers/single_level/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Adaptivity]
marker = marker
max_h_level = 1
[./Markers]
[./marker]
type = BoxMarker
bottom_left = '0.25 0.25 0'
top_right = '0.75 0.75 0'
outside = DO_NOTHING
inside = REFINE
[../]
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Problem]
type = LevelSetProblem
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[MultiApps]
[./sub]
type = LevelSetReinitializationMultiApp
input_files = 'sub.i'
execute_on = TIMESTEP_BEGIN
[../]
[]
[Transfers]
[./marker_to_sub]
type = LevelSetMeshRefinementTransfer
to_multi_app = sub
source_variable = marker
variable = marker
[../]
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/verification/patch_tests/automatic_patch_update/iteration_adaptivity_parallel.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
coord_type = XYZ
patch_update_strategy = iteration
patch_size = 8
ghosting_patch_size = 20
[cube1]
type = GeneratedMeshGenerator
dim = 2
boundary_name_prefix = cube1
xmax = 1
ymax = 1
nx = 2
ny = 2
[]
[cube2]
type = GeneratedMeshGenerator
dim = 2
boundary_name_prefix = cube2
boundary_id_offset = 5
xmax = 1
ymax = 1
nx = 2
ny = 2
[]
[block_id]
type = SubdomainIDGenerator
input = cube2
subdomain_id = 2
[]
[combine]
inputs = 'cube1 block_id'
type = CombinerGenerator
positions = '0 0 0
0 1 0'
[]
[rename2]
type = RenameBlockGenerator
input = combine
old_block = '0 2'
new_block = 'cube1 cube2'
[]
[]
[Adaptivity]
initial_marker = box
initial_steps = 1
max_h_level = 1
[Markers]
[box]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
inside = refine
outside = do_nothing
[]
[]
[]
[Variables]
[disp_x]
block = 'cube1 cube2'
[]
[disp_y]
block = 'cube1 cube2'
[]
[]
[Modules/TensorMechanics/Master]
[cube1_mechanics]
strain = FINITE
block = 'cube1 cube2'
[]
[]
[BCs]
[cube1_x]
type = ADDirichletBC
variable = disp_x
boundary = 'cube1_bottom '
value = 0.0
[]
[cube1_y]
type = ADDirichletBC
variable = disp_y
boundary = 'cube1_bottom '
value = 0.0
[]
[cube2_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'cube2_top'
function = '-t'
preset = false
[]
[cube2_x]
type = ADDirichletBC
variable = disp_x
boundary = 'cube2_top'
value = 0
[]
[]
[Materials]
[cube1_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 68.9e9
poissons_ratio = 0.3
block = 'cube1'
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'cube1 cube2'
[]
[cube2_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 140e9
poissons_ratio = 0.3
block = 'cube2'
[]
[]
[Contact]
[contactswell]
secondary = cube1_top
primary = cube2_bottom
model = frictionless
formulation = mortar_penalty
penalty = 1.0e12
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-9
nl_abs_tol = 1e-9
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
end_time = 0.02e-3
dtmax = 4
dtmin = 0.001e-3
dt = 0.01e-3
automatic_scaling = true
off_diagonals_in_auto_scaling = true
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles_toggle_adaptivity_wait.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
cycles_per_step = 1
marker = box
max_h_level = 2
initial_steps = 4
initial_marker = initial_box
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = dont_mark
type = BoxMarker
[../]
[./initial_box]
type = BoxMarker
bottom_left = '0.8 0.1 0'
top_right = '0.9 0.2 0'
inside = refine
outside = dont_mark
[../]
[../]
[]
[UserObjects]
[./toggle_adaptivity]
type = ToggleMeshAdaptivity
mesh_adaptivity = 'off'
apply_after_timestep = 1
[../]
[]
[Postprocessors]
[./adaptivity_cycles]
type = NumAdaptivityCycles
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(test/tests/userobjects/toggle_mesh_adaptivity/toggle_mesh_adaptivity_wait.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.1
[]
[Adaptivity]
cycles_per_step = 1
marker = marker
max_h_level = 4
[./Markers]
[./marker]
type = BoxMarker
bottom_left = '0.35 0.25 0'
top_right = '0.5 0.5 0'
inside = refine
outside = coarsen
[../]
[../]
[]
[UserObjects]
[./mesh_adaptivity_off]
type = ToggleMeshAdaptivity
mesh_adaptivity = 'off'
apply_after_timestep = 1
[../]
[]
[Outputs]
exodus = true
[./console]
type = Console
print_mesh_changed_info = true
[../]
[]
(modules/contact/test/tests/adaptivity/contact_initial_adaptivity.i)
# This is a test of the usage of initial adaptivity with contact.
# It ensures that contact is enforced on the new nodes that are
# created due to refinement on the secondary side of the interface.
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[Mesh]
file = 2blocks.e
patch_size = 80
parallel_type = replicated
[]
[AuxVariables]
[./penetration]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./negramp]
type = ParsedFunction
expression = -t/10
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
[]
[]
[AuxKernels]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[Postprocessors]
[./nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = negramp
[../]
[./right_y]
type = DirichletBC
variable = disp_y
boundary = 4
value = 0.0
[../]
[]
[Materials]
[./stiffStuff1]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./stiffStuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Contact]
[./leftright]
secondary = 3
primary = 2
model = frictionless
penalty = 1e+6
normal_smoothing_distance = 0.1
[../]
[]
[Adaptivity]
steps = 0
marker = box
max_h_level = 2
initial_steps = 2
[./Markers]
[./box]
type = BoxMarker
bottom_left = '0.5 -2.0 0.0'
top_right = '0.75 2.0 0.0'
inside = refine
outside = do_nothing
[../]
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.2
end_time = 1.0
l_tol = 1e-6
nl_rel_tol = 1e-12
nl_abs_tol = 1e-9
[]
[Outputs]
exodus = true
console = true
[]
(test/tests/fvkernels/fv_adapt/transient-adapt.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
elem_type = QUAD4
[]
[]
[Variables]
[u]
order = CONSTANT
family = MONOMIAL
[]
[v][]
[]
[Functions]
[force]
type = ParsedFunction
expression = t
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = v
[]
[force]
type = BodyForce
variable = v
function = force
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = u
coeff = coeff
[]
[force]
type = FVBodyForce
variable = u
function = force
[]
[]
[FVBCs]
[right]
type = FVDirichletBC
variable = u
boundary = right
value = 1
[]
[left]
type = FVDirichletBC
variable = u
boundary = left
value = 0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = v
boundary = right
value = 1
[]
[left]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1
solve_type = 'NEWTON'
[]
[Adaptivity]
marker = box
initial_steps = 1
[Markers]
[box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[]
[]
[]
[Outputs]
exodus = true
[]
(test/tests/markers/box_marker/box_marker_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Adaptivity]
[./Markers]
[./box]
type = BoxMarker
bottom_left = '0.3 0.3 0'
top_right = '0.6 0.6 0'
inside = refine
outside = do_nothing
[../]
[../]
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/examples/lava_lamp/2phase_convection.i)
# Two phase density-driven convection of dissolved CO2 in brine
#
# Initially, the model has a gas phase at the top with a saturation of 0.29
# (which corresponds to an initial value of zi = 0.2).
# Diffusion of the dissolved CO2
# component from the saturated liquid to the unsaturated liquid below reduces the
# amount of CO2 in the gas phase. As the density of the CO2-saturated brine is greater
# than the unsaturated brine, a gravitational instability arises and density-driven
# convection of CO2-rich fingers descend into the unsaturated brine.
#
# The instability is seeded by a random perturbation to the porosity field.
# Mesh adaptivity is used to refine the mesh as the fingers form.
#
# Note: this model is computationally expensive, so should be run with multiple cores,
# preferably on a cluster.
[GlobalParams]
PorousFlowDictator = 'dictator'
gravity = '0 -9.81 0'
[]
[Adaptivity]
max_h_level = 2
marker = marker
initial_marker = initial
initial_steps = 2
[Indicators]
[indicator]
type = GradientJumpIndicator
variable = zi
[]
[]
[Markers]
[marker]
type = ErrorFractionMarker
indicator = indicator
refine = 0.8
[]
[initial]
type = BoxMarker
bottom_left = '0 1.95 0'
top_right = '2 2 0'
inside = REFINE
outside = DO_NOTHING
[]
[]
[]
[Mesh]
type = GeneratedMesh
dim = 2
ymax = 2
xmax = 2
ny = 40
nx = 40
bias_y = 0.95
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pgas
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pgas
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pgas
disp_long = '0 0'
disp_trans = '0 0'
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = zi
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = zi
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = zi
disp_long = '0 0'
disp_trans = '0 0'
[]
[]
[AuxVariables]
[xnacl]
initial_condition = 0.01
[]
[saturation_gas]
order = FIRST
family = MONOMIAL
[]
[xco2l]
order = FIRST
family = MONOMIAL
[]
[density_liquid]
order = FIRST
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = 'timestep_end'
[]
[xco2l]
type = PorousFlowPropertyAux
variable = xco2l
property = mass_fraction
phase = 0
fluid_component = 1
execute_on = 'timestep_end'
[]
[density_liquid]
type = PorousFlowPropertyAux
variable = density_liquid
property = density
phase = 0
execute_on = 'timestep_end'
[]
[]
[Variables]
[pgas]
[]
[zi]
scaling = 1e4
[]
[]
[ICs]
[pressure]
type = FunctionIC
function = 10e6-9.81*1000*y
variable = pgas
[]
[zi]
type = BoundingBoxIC
variable = zi
x1 = 0
x2 = 2
y1 = 1.95
y2 = 2
inside = 0.2
outside = 0
[]
[porosity]
type = RandomIC
variable = porosity
min = 0.25
max = 0.275
seed = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas zi'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2
capillary_pressure = pc
[]
[]
[FluidProperties]
[co2sw]
type = CO2FluidProperties
[]
[co2]
type = TabulatedBicubicFluidProperties
fp = co2sw
[]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = '45'
[]
[brineco2]
type = PorousFlowFluidState
gas_porepressure = 'pgas'
z = 'zi'
temperature_unit = Celsius
xnacl = 'xnacl'
capillary_pressure = pc
fluid_state = fs
[]
[porosity]
type = PorousFlowPorosityConst
porosity = porosity
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-11 0 0 0 1e-11 0 0 0 1e-11'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
phase = 0
n = 2
s_res = 0.1
sum_s_res = 0.2
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
phase = 1
n = 2
s_res = 0.1
sum_s_res = 0.2
[]
[diffusivity]
type = PorousFlowDiffusivityConst
diffusion_coeff = '2e-9 2e-9 2e-9 2e-9'
tortuosity = '1 1'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1e6
nl_max_its = 25
l_max_its = 100
dtmax = 1e4
nl_abs_tol = 1e-6
[TimeStepper]
type = IterationAdaptiveDT
dt = 10
growth_factor = 2
cutback_factor = 0.5
[]
[]
[Functions]
[flux]
type = ParsedFunction
symbol_values = 'delta_xco2 dt'
symbol_names = 'dx dt'
expression = 'dx/dt'
[]
[]
[Postprocessors]
[total_co2_in_gas]
type = PorousFlowFluidMass
phase = 1
fluid_component = 1
[]
[total_co2_in_liquid]
type = PorousFlowFluidMass
phase = 0
fluid_component = 1
[]
[numdofs]
type = NumDOFs
[]
[delta_xco2]
type = ChangeOverTimePostprocessor
postprocessor = total_co2_in_liquid
[]
[dt]
type = TimestepSize
[]
[flux]
type = FunctionValuePostprocessor
function = flux
[]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
exodus = true
csv = true
[]
(test/tests/kernels/diffusion_with_hanging_node/simple_diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 1
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
# BCs cannot be preset due to Jacobian test
[./left]
type = DirichletBC
preset = false
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
preset = false
variable = u
boundary = right
value = 1
[../]
[]
[Preconditioning]
[./pre]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options = '-pc_svd_monitor -ksp_view_pmat'
petsc_options_iname = '-pc_type'
petsc_options_value = 'svd'
[]
[Outputs]
exodus = true
[]
[Adaptivity]
marker = box
max_h_level = 1
initial_steps = 1
[./Markers]
[./box]
type = BoxMarker
bottom_left = '0.5 0 0'
top_right = '1 1 0'
inside = 'refine'
outside = 'do_nothing'
[../]
[../]
[]
(modules/contact/test/tests/verification/patch_tests/automatic_patch_update/iteration_adaptivity_parallel_node_face.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
coord_type = XYZ
patch_update_strategy = iteration
patch_size = 8
ghosting_patch_size = 20
[cube1]
type = GeneratedMeshGenerator
dim = 2
boundary_name_prefix = cube1
xmax = 1
ymax = 1
nx = 2
ny = 2
[]
[cube2]
type = GeneratedMeshGenerator
dim = 2
boundary_name_prefix = cube2
boundary_id_offset = 5
xmax = 1
ymax = 1
nx = 2
ny = 2
[]
[block_id]
type = SubdomainIDGenerator
input = cube2
subdomain_id = 2
[]
[combine]
inputs = 'cube1 block_id'
type = CombinerGenerator
positions = '0 0 0
0 1 0'
[]
[rename2]
type = RenameBlockGenerator
input = combine
old_block = '0 2'
new_block = 'cube1 cube2'
[]
[]
[Adaptivity]
initial_marker = box
initial_steps = 1
max_h_level = 1
[Markers]
[box]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
inside = refine
outside = do_nothing
[]
[]
[]
[Variables]
[disp_x]
block = 'cube1 cube2'
[]
[disp_y]
block = 'cube1 cube2'
[]
[]
[Modules/TensorMechanics/Master]
[cube1_mechanics]
strain = FINITE
block = 'cube1 cube2'
[]
[]
[BCs]
[cube1_x]
type = ADDirichletBC
variable = disp_x
boundary = 'cube1_bottom '
value = 0.0
[]
[cube1_y]
type = ADDirichletBC
variable = disp_y
boundary = 'cube1_bottom '
value = 0.0
[]
[cube2_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'cube2_top'
function = '-t'
preset = false
[]
[cube2_x]
type = ADDirichletBC
variable = disp_x
boundary = 'cube2_top'
value = 0
[]
[]
[Materials]
[cube1_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 68.9e9
poissons_ratio = 0.3
block = 'cube1'
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'cube1 cube2'
[]
[cube2_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 140e9
poissons_ratio = 0.3
block = 'cube2'
[]
[]
[Contact]
[contactswell]
secondary = cube1_top
primary = cube2_bottom
model = frictionless
formulation = kinematic
penalty = 1.0e6
normalize_penalty = true
tangential_tolerance = 0.1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-16
nl_abs_tol = 1e-16
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
end_time = 0.02e-3
dtmax = 4
dtmin = 0.001e-3
dt = 0.01e-3
automatic_scaling = true
off_diagonals_in_auto_scaling = true
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
execute_on = 'FINAL'
[]
(modules/level_set/test/tests/functions/olsson_bubble/olsson_bubble.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Adaptivity]
initial_marker = marker
initial_steps = 2
max_h_level = 2
[./Markers]
[./marker]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
inside = REFINE
outside = DO_NOTHING
[../]
[../]
[]
[AuxVariables]
[./bubble]
[../]
[]
[AuxKernels]
[./bubble_aux]
type = FunctionAux
variable = bubble
function = bubble_func
execute_on = initial
[../]
[]
[Functions]
[./bubble_func]
type = LevelSetOlssonBubble
center = '0.25 0.25 0'
radius = 0.15
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'TIMESTEP_END'
exodus = true
[]
(test/tests/postprocessors/num_dofs/num_dofs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
order = FIRST
family = LAGRANGE
[../]
[./v_aux]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./num_dofs_nl]
type = NumDOFs
system = NL
[../]
[./num_dofs_aux]
type = NumDOFs
system = AUX
[../]
# default
[./num_dofs_all]
type = NumDOFs
system = ALL
[../]
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/num_elems/num_elems.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
nz = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
order = FIRST
family = LAGRANGE
[../]
[./v_aux]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 3
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./num_elems_active]
type = NumElems
elem_filter = 'ACTIVE'
execute_on = 'initial timestep_end'
[../]
[./num_elems_total]
type = NumElems
elem_filter = 'TOTAL'
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(test/tests/kernels/hfem/robin_adapt.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
components = 2
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
components = 2
[]
[]
[AuxVariables]
[v]
order = CONSTANT
family = MONOMIAL
block = 0
initial_condition = '1'
[]
[]
[Kernels]
[diff]
type = ArrayDiffusion
variable = u
block = 0
diffusion_coefficient = dc
[]
[source]
type = ArrayCoupledForce
variable = u
v = v
coef = '1 2'
block = 0
[]
[]
[DGKernels]
[surface]
type = ArrayHFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = ArrayVacuumBC
boundary = 'left right top bottom'
variable = u
[]
[]
[Materials]
[dc]
type = GenericConstantArray
prop_name = dc
prop_value = '1 1'
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralArrayVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementArrayL2Norm
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]
exodus = true
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
initial_steps = 2
[Markers]
[box]
bottom_left = '0 0 0'
inside = refine
top_right = '0.5 0.5 0'
outside = do_nothing
type = BoxMarker
[]
[]
[]
(test/tests/kernels/diffusion_with_hanging_node/ad_simple_diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 1
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = ADDiffusion
variable = u
[../]
[force]
type = ADBodyForce
variable = u
function = '0'
[]
[]
[BCs]
# BCs cannot be preset due to Jacobian test
[./left]
type = DirichletBC
preset = false
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
preset = false
variable = u
boundary = right
value = 1
[../]
[]
[Preconditioning]
[./pre]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options = '-pc_svd_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'svd'
[]
[Outputs]
exodus = true
[]
[Adaptivity]
marker = box
max_h_level = 1
initial_steps = 1
[./Markers]
[./box]
type = BoxMarker
bottom_left = '0.5 0 0'
top_right = '1 1 0'
inside = 'refine'
outside = 'do_nothing'
[../]
[../]
[]
(test/tests/outputs/output_interface/marker.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
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Adaptivity]
[./Indicators]
[./indicator_0]
type = GradientJumpIndicator
variable = u
outputs = none
[../]
[./indicator_1]
type = GradientJumpIndicator
variable = u
outputs = none
[../]
[../]
[./Markers]
[./marker_0]
type = ValueThresholdMarker
outputs = markers
refine = 0.5
variable = u
[../]
[./marker_1]
type = BoxMarker
bottom_left = '0.25 0.25 0'
top_right = '0.75 0.75 0'
inside = REFINE
outside = DONT_MARK
outputs = markers
[../]
[../]
[]
[Outputs]
[./markers]
type = Exodus
[../]
[./no_markers]
type = Exodus
[../]
[]