- bufferThe buffer this compute is operating on
C++ Type:std::string
Controllable:No
Description:The buffer this compute is operating on
TensorAveragePostprocessor
Compute the average value over a buffer.
Takes the sum over all grid values divided by the number of grid cells (using torch::sum and torch::numel).
Overview
Computes the spatial average of a scalar buffer over the domain. Select the input with "buffer".
Example Input File Syntax
[Postprocessors<<<{"href": "../../syntax/Postprocessors/index.html"}>>>]
[avg_c]
type = TensorAveragePostprocessor<<<{"description": "Compute the average value over a buffer.", "href": "TensorAveragePostprocessor.html"}>>>
buffer<<<{"description": "The buffer this compute is operating on"}>>> = c
execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'INITIAL TIMESTEP_END'
[]
[](test/tests/postprocessors/postprocessors.i)Input 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).
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Options:NONE, INITIAL, LINEAR, LINEAR_CONVERGENCE, NONLINEAR, NONLINEAR_CONVERGENCE, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, MULTIAPP_FIXED_POINT_CONVERGENCE, FINAL, CUSTOM, TRANSFER
Controllable:No
Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
- 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
Execution Scheduling 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:Yes
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
- 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
- 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
Unit:(no unit assumed)
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.
Material Property Retrieval Parameters
Input Files
- (examples/cahn_hilliard/cahnhilliard4.i)
- (test/tests/neml2/scalar.i)
- (examples/lbm/Karman-vortex/cylinder.i)
- (test/tests/postprocessors/postprocessors.i)
- (test/tests/tensor_compute/coupled_pf_mech_secant.i)
- (examples/cahn_hilliard/cahnhilliard2.i)
- (test/tests/tensor_compute/group.i)
- (benchmarks/02_oswald_ripening/simple.i)
- (test/tests/tensor_compute/coupled_pf_mech.i)
- (examples/cahn_hilliard/cahnhilliard3.i)
- (examples/phase_field_crystal/pfc_fcc_atomic_structure_3d.i)
- (examples/phase_field_crystal/pfc_fcc_atomic_structure.i)
- (test/tests/tensor_compute/pfc_fcc.i)
Child Objects
buffer
C++ Type:std::string
Controllable:No
Description:The buffer this compute is operating on
(test/tests/postprocessors/postprocessors.i)
[Domain]
dim = 2
nx = 40
ny = 40
xmax = 2
ymax = 3
mesh_mode = DUMMY
[]
[TensorBuffers]
[c]
[]
[c_bar]
[]
[]
[TensorComputes]
[Initialize]
[c]
type = ParsedCompute
buffer = c
extra_symbols = true
expression = -x+y+0.3
[]
[c_bar]
type = ForwardFFT
buffer = c_bar
input = c
[]
[u]
type = ConstantTensor
buffer = u
real = 0
[]
[]
[Solve]
[root]
[test]
type = ForwardFFT
buffer = u_bar
input = u
[]
[]
[]
[]
[TensorSolver]
type = ForwardEulerSolver
time_derivative_reciprocal = c_bar
buffer = u
reciprocal_buffer = u_bar
substeps = 10
[]
[Postprocessors]
[min_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MIN
execute_on = 'INITIAL TIMESTEP_END'
[]
[max_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MAX
execute_on = 'INITIAL TIMESTEP_END'
[]
[avg_c]
type = TensorAveragePostprocessor
buffer = c
execute_on = 'INITIAL TIMESTEP_END'
[]
[int_c]
type = TensorIntegralPostprocessor
buffer = c
execute_on = 'INITIAL TIMESTEP_END'
[]
[int_c_bar]
type = ReciprocalIntegral
buffer = c_bar
execute_on = 'INITIAL TIMESTEP_END'
[]
[count]
type = ComputeGroupExecutionCount
[]
[]
[Problem]
type = TensorProblem
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
csv = true
[]
(examples/cahn_hilliard/cahnhilliard4.i)
[Domain]
dim = 3
nx = 100
ny = 100
nz = 100
xmax = ${fparse pi*4}
ymax = ${fparse pi*4}
zmax = ${fparse pi*4}
device_names = 'cuda'
mesh_mode = DUMMY
debug = true
[]
[TensorBuffers]
[c]
[]
[cbar]
[]
[mu]
[]
[mubar]
[]
[Mbarmubar]
[]
# constant tensors
[Mbar]
[]
[kappabarbar]
[]
[]
[TensorOutputs]
[xdmf]
type = XDMFTensorOutput
buffer = 'c mu'
output_mode = 'Node Cell'
enable_hdf5 = true
[]
[]
[TensorComputes]
[Initialize]
[c]
type = RandomTensor
buffer = c
min = 0.44
max = 0.56
[]
[Mbar]
type = ReciprocalLaplacianFactor
factor = 0.2 # Mobility
buffer = Mbar
[]
[kappabarbar]
type = ReciprocalLaplacianSquareFactor
factor = -0.001 # kappa
buffer = kappabarbar
[]
[]
[Solve]
[mu]
type = ParsedCompute
buffer = mu
expression = '0.1*c^2*(c-1)^2 + c*sin(x/2)*0.005'
extra_symbols = true
derivatives = c
# expression = "0.4*c^3-0.6*c^2+0.2*c"
inputs = c
[]
[mubar]
type = ForwardFFT
buffer = mubar
input = mu
[]
[Mbarmubar]
type = ParsedCompute
buffer = Mbarmubar
expression = 'Mbar*mubar'
inputs = 'Mbar mubar'
[]
[cbar]
type = ForwardFFT
buffer = cbar
input = c
[]
[]
[]
[TensorTimeIntegrators]
[c]
type = FFTSemiImplicit
buffer = c
reciprocal_buffer = cbar
linear_reciprocal = kappabarbar
nonlinear_reciprocal = Mbarmubar
[]
[]
[Postprocessors]
[min_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[C]
type = TensorIntegralPostprocessor
buffer = c
execute_on = 'TIMESTEP_END'
[]
[cavg]
type = TensorAveragePostprocessor
buffer = c
execute_on = 'TIMESTEP_END'
[]
[]
[Problem]
type = TensorProblem
spectral_solve_substeps = 1000
[]
[Executioner]
type = Transient
num_steps = 50
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 1.8
dt = 0.1
[]
dtmax = 500
[]
[Outputs]
csv = true
perf_graph = true
execute_on = 'TIMESTEP_END'
[]
(test/tests/neml2/scalar.i)
[Domain]
dim = 2
nx = 2
ny = 2
xmax = 1
ymax = 1
mesh_mode = DUMMY
[]
[Problem]
type = TensorProblem
[]
[TensorComputes]
[Initialize]
[A]
type = ConstantTensor
buffer = A
real = 2
[]
[B]
type = ConstantTensor
buffer = B
real = 3
[]
[C]
type = NEML2TensorCompute
neml2_input_file = neml2_input.i
neml2_model = multiply
marlin_inputs = 'A B'
neml2_inputs = 'forces/A forces/B'
neml2_outputs = 'state/C'
marlin_outputs = 'C'
[]
[]
[]
[Postprocessors]
[C]
type = TensorAveragePostprocessor
buffer = C
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
[]
(examples/lbm/Karman-vortex/cylinder.i)
[Domain]
dim = 2
nx = 800
ny = 200
xmax = 4
ymax = 1
device_names='cpu'
parallel_mode = REAL_SPACE
periodic_directions = 'X Y'
[]
[Stencil]
[d2q9]
type = LBMD2Q9
[]
[]
[TensorBuffers]
[rho]
type=LBMTensorBuffer
buffer_type = ms
[]
[u]
type=LBMTensorBuffer
buffer_type = mv
[]
[speed]
type=LBMTensorBuffer
buffer_type = ms
[]
[f]
type=LBMTensorBuffer
buffer_type = df
[]
[feq]
type=LBMTensorBuffer
buffer_type = df
[]
[f_post_collision]
type=LBMTensorBuffer
buffer_type = df
[]
[binary_media]
type = LBMTensorBuffer
file = binary_media.h5
is_integer = true
buffer_type = ms
[]
[]
[TensorComputes]
[Initialize]
[rho]
type=LBMConstantTensor
buffer=rho
constants = rho0
[]
[u]
type=LBMConstantTensor
buffer=u
constants = 'Ux Uy'
[]
[speed]
type=LBMComputeVelocityMagnitude
buffer=speed
velocity=u
[]
[feq]
type=LBMEquilibrium
buffer=feq
bulk=rho
velocity=u
[]
[f]
type=LBMEquilibrium
buffer=f
bulk=rho
velocity=u
[]
[f_post_coll]
type=LBMEquilibrium
buffer=f_post_collision
bulk=rho
velocity=u
[]
[]
[Solve]
[Density]
type = LBMComputeDensity
buffer=rho
f = f
[]
[Velocity]
type = LBMComputeVelocity
buffer=u
f = f
rho = rho
[]
[Equilibrium]
type = LBMEquilibrium
buffer=feq
bulk=rho
velocity=u
[]
[Collision]
type = LBMSmagorinskyCollision
buffer = f_post_collision
f = f
feq = feq
tau0 = tau
projection=true
[]
[Speed]
type = LBMComputeVelocityMagnitude
buffer = speed
velocity = u
[]
[Residual]
type = LBMComputeResidual
buffer = speed
speed = speed
[]
[]
[Boundary]
[wall]
type = LBMBounceBack
buffer = f
f_old = f_post_collision
boundary = wall
[]
[left]
type = LBMFixedFirstOrderBC
buffer=f
f=f
value='Ux'
perturb=true
boundary=left
[]
[right]
type = LBMMicroscopicZeroGradientBC
buffer=f
boundary=right
[]
[]
[]
[TensorSolver]
type = LBMStream
buffer = f
f_old = f_post_collision
root_compute=residual
[]
[Postprocessors]
[rho_avg]
type = TensorAveragePostprocessor
buffer = rho
execute_on = 'TIMESTEP_END'
[]
[speed_avg]
type = TensorAveragePostprocessor
buffer = speed
execute_on = 'TIMESTEP_END'
[]
[reynolds]
type = ComputeReynoldsNumber
buffer = speed
tau = tau
diameter = D
[]
[]
[Problem]
type = LatticeBoltzmannProblem
scalar_constant_names = 'rho0 Ux Uy tau dx D Cs'
scalar_constant_values = '1.0 0.01 0.0 0.506 0.001 40 0.15'
substeps = 100
print_debug_output=true
binary_media = binary_media
[]
[Executioner]
type = Transient
num_steps = 10000
[]
[TensorOutputs]
[xdmf2]
type = XDMFTensorOutput
buffer = 'rho u speed binary_media'
output_mode = 'Cell Cell Cell Cell'
enable_hdf5 = true
[]
[]
(test/tests/postprocessors/postprocessors.i)
[Domain]
dim = 2
nx = 40
ny = 40
xmax = 2
ymax = 3
mesh_mode = DUMMY
[]
[TensorBuffers]
[c]
[]
[c_bar]
[]
[]
[TensorComputes]
[Initialize]
[c]
type = ParsedCompute
buffer = c
extra_symbols = true
expression = -x+y+0.3
[]
[c_bar]
type = ForwardFFT
buffer = c_bar
input = c
[]
[u]
type = ConstantTensor
buffer = u
real = 0
[]
[]
[Solve]
[root]
[test]
type = ForwardFFT
buffer = u_bar
input = u
[]
[]
[]
[]
[TensorSolver]
type = ForwardEulerSolver
time_derivative_reciprocal = c_bar
buffer = u
reciprocal_buffer = u_bar
substeps = 10
[]
[Postprocessors]
[min_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MIN
execute_on = 'INITIAL TIMESTEP_END'
[]
[max_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MAX
execute_on = 'INITIAL TIMESTEP_END'
[]
[avg_c]
type = TensorAveragePostprocessor
buffer = c
execute_on = 'INITIAL TIMESTEP_END'
[]
[int_c]
type = TensorIntegralPostprocessor
buffer = c
execute_on = 'INITIAL TIMESTEP_END'
[]
[int_c_bar]
type = ReciprocalIntegral
buffer = c_bar
execute_on = 'INITIAL TIMESTEP_END'
[]
[count]
type = ComputeGroupExecutionCount
[]
[]
[Problem]
type = TensorProblem
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
csv = true
[]
(test/tests/tensor_compute/coupled_pf_mech_secant.i)
[Domain]
dim = 3
nx = 128
ny = 128
nz = 128
xmax = ${fparse pi*4}
ymax = ${fparse pi*4}
zmax = ${fparse pi*4}
mesh_mode = DUMMY
[]
[TensorBuffers]
# phase field
[c]
[]
[cbar]
[]
[mu]
[]
[mubar]
[]
[Mbarmubar]
[]
# mechanics
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[mumechbar]
[]
[mumech]
[]
# constant tensors
[Mbar]
[]
[kappabarbar]
[]
[]
[TensorOutputs]
[xdmf]
type = XDMFTensorOutput
buffer = 'c disp_x disp_y disp_z mu mumech'
output_mode = 'Node Node Node Node Cell Cell'
enable_hdf5 = true
[]
[]
[TensorComputes]
[Initialize]
[c]
type = RandomTensor
buffer = c
min = 0.44
max = 0.56
[]
[mu_init]
type = ConstantTensor
buffer = mu
[]
[mumech_init]
type = ConstantTensor
buffer = mumech
[]
[disp_x]
type = RandomTensor
buffer = disp_x
min = 0
max = 0
[]
[disp_y]
type = RandomTensor
buffer = disp_y
min = 0
max = 0
[]
[disp_z]
type = RandomTensor
buffer = disp_z
min = 0
max = 0
[]
[Mbar]
type = ReciprocalLaplacianFactor
factor = 0.2 # Mobility
buffer = Mbar
[]
[kappabarbar]
type = ReciprocalLaplacianSquareFactor
factor = -0.001 # kappa
buffer = kappabarbar
[]
[]
[Solve]
[mu]
# chemical potential (real space)
type = ParsedCompute
buffer = mu
expression = '0.1*c^2*(c-1)^2' # + c*sin(x/2)*0.005'
extra_symbols = true
derivatives = c
inputs = c
[]
[mubar]
# chemical potential (reciprocal space)
type = ForwardFFT
buffer = mubar
input = mu
[]
[mumechbar]
# mechanical chemical potential (reciprocal space)
type = FFTElasticChemicalPotential
buffer = mumechbar
cbar = cbar
displacements = 'disp_x disp_y disp_z'
lambda = 100
mu = 50
e0 = 0.02
[]
[mumech]
# chemical potential (reciprocal space)
type = InverseFFT
buffer = mumech
input = mumechbar
[]
[Mbarmubar]
type = ParsedCompute
buffer = Mbarmubar
expression = 'Mbar*(mubar+mumechbar)'
inputs = 'Mbar mubar mumechbar'
[]
[cbar]
type = ForwardFFT
buffer = cbar
input = c
[]
[qsmech]
type = FFTQuasistaticElasticity
displacements = 'disp_x disp_y disp_z'
cbar = cbar
lambda = 100
mu = 50
e0 = 0.02
[]
[]
[]
[TensorSolver]
type = SecantSolver
substeps = 1
max_iterations = 1000
# damping = 0.75
relative_tolerance = 1e-6
absolute_tolerance = 1e-6
buffer = c
dt_epsilon = 1e-7
reciprocal_buffer = cbar
linear_reciprocal = kappabarbar
nonlinear_reciprocal = Mbarmubar
verbose = true
[]
[Postprocessors]
[min_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[min_disp_x]
type = TensorExtremeValuePostprocessor
buffer = disp_x
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_disp_x]
type = TensorExtremeValuePostprocessor
buffer = disp_x
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[min_disp_y]
type = TensorExtremeValuePostprocessor
buffer = disp_y
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_disp_y]
type = TensorExtremeValuePostprocessor
buffer = disp_y
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[min_disp_z]
type = TensorExtremeValuePostprocessor
buffer = disp_z
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_disp_z]
type = TensorExtremeValuePostprocessor
buffer = disp_z
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[C]
type = TensorIntegralPostprocessor
buffer = c
execute_on = 'TIMESTEP_END'
[]
[cavg]
type = TensorAveragePostprocessor
buffer = c
execute_on = 'TIMESTEP_END'
[]
[]
[Problem]
type = TensorProblem
[]
[Executioner]
type = Transient
end_time = 100
[TimeStepper]
type = TensorSolveIterationAdaptiveDT
dt = 0.1
max_iterations = 500
min_iterations = 300
growth_factor = 1.1
cutback_factor = 0.9
[]
[]
[Outputs]
csv = true
perf_graph = true
execute_on = 'TIMESTEP_END'
[]
(examples/cahn_hilliard/cahnhilliard2.i)
#
# The same simple Cahn-Hilliard solve as cahnhilliard.i, but on a 3D grid
# and using the faster TensorOutputs system.
#
[Domain]
dim = 3
nx = 200
ny = 200
nz = 200
xmax = ${fparse pi*8}
ymax = ${fparse pi*8}
zmax = ${fparse pi*8}
# run on a CUDA device (adjust this to `cpu` if not available)
device_names = 'cuda'
# create a single element dummy mesh. Output will use the custom XDMF output
# in the `TensorOutputs` system.
mesh_mode = DUMMY
[]
[TensorBuffers]
[c]
[]
[cbar]
[]
[mu]
[]
[mubar]
[]
[Mbarmubar]
[]
# constant tensors
[Mbar]
[]
[kappabarbar]
[]
[]
[TensorOutputs]
# the TensorOutouts system supports asynchronous threaded output.
# for GOU calculations a copy of the solution fields is moved to the CPU,
# and while the output files are written the next time step is already
# starting to compute.
[xdmf]
type = XDMFTensorOutput
buffer = 'c mu'
enable_hdf5 = true
[]
[]
[TensorComputes]
[Initialize]
[c]
type = RandomTensor
buffer = c
min = 0.44
max = 0.56
[]
[Mbar]
type = ReciprocalLaplacianFactor
factor = 0.2 # Mobility
buffer = Mbar
[]
[kappabarbar]
type = ReciprocalLaplacianSquareFactor
factor = -0.001 # kappa
buffer = kappabarbar
[]
[]
[Solve]
[mu]
type = ParsedCompute
buffer = mu
expression = '0.1*c^2*(c-1)^2'
derivatives = c
inputs = c
[]
[mubar]
type = ForwardFFT
buffer = mubar
input = mu
[]
[Mbarmubar]
type = ParsedCompute
buffer = Mbarmubar
expression = 'Mbar*mubar'
inputs = 'Mbar mubar'
[]
[cbar]
type = ForwardFFT
buffer = cbar
input = c
[]
[]
[]
[TensorSolver]
type = AdamsBashforthMoulton
buffer = c
reciprocal_buffer = cbar
linear_reciprocal = kappabarbar
nonlinear_reciprocal = Mbarmubar
substeps = 1000
[]
[Postprocessors]
[min_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[C]
type = TensorIntegralPostprocessor
buffer = c
execute_on = 'TIMESTEP_END'
[]
[cavg]
type = TensorAveragePostprocessor
buffer = c
execute_on = 'TIMESTEP_END'
[]
[]
[Problem]
type = TensorProblem
[]
[Executioner]
type = Transient
num_steps = 100
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 1.8
dt = 0.1
[]
dtmax = 1000
[]
[Outputs]
csv = true
perf_graph = true
execute_on = 'TIMESTEP_END'
[]
(test/tests/tensor_compute/group.i)
[Domain]
dim = 3
nx = 128
ny = 128
nz = 128
xmax = ${fparse pi*4}
ymax = ${fparse pi*4}
zmax = ${fparse pi*4}
mesh_mode = DUMMY
[]
[TensorBuffers]
# phase field
[c]
[]
[cbar]
[]
[mu]
[]
[mubar]
[]
[Mbarmubar]
[]
# mechanics
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[mumechbar]
[]
[mumech]
[]
# constant tensors
[Mbar]
[]
[kappabarbar]
[]
[]
[TensorOutputs]
[xdmf]
type = XDMFTensorOutput
buffer = 'c disp_x disp_y disp_z mu mumech'
output_mode = 'Node Node Node Node Cell Cell'
enable_hdf5 = true
[]
[]
[TensorComputes]
[Initialize]
[c]
type = RandomTensor
buffer = c
min = 0.44
max = 0.56
[]
[disp_x]
type = RandomTensor
buffer = disp_x
min = 0
max = 0
[]
[disp_y]
type = RandomTensor
buffer = disp_y
min = 0
max = 0
[]
[disp_z]
type = RandomTensor
buffer = disp_z
min = 0
max = 0
[]
[Mbar]
type = ReciprocalLaplacianFactor
factor = 0.2 # Mobility
buffer = Mbar
[]
[kappabarbar]
type = ReciprocalLaplacianSquareFactor
factor = -0.001 # kappa
buffer = kappabarbar
[]
[]
[Solve]
[mu]
# chemical potential (real space)
type = ParsedCompute
buffer = mu
expression = '0.1*c^2*(c-1)^2' # + c*sin(x/2)*0.005'
extra_symbols = true
derivatives = c
inputs = c
[]
[mubar]
# chemical potential (reciprocal space)
type = ForwardFFT
buffer = mubar
input = mu
[]
[mumechbar]
# mechanical chemical potential (reciprocal space)
type = FFTElasticChemicalPotential
buffer = mumechbar
cbar = cbar
displacements = 'disp_x disp_y disp_z'
lambda = 100
mu = 50
e0 = 0.02
[]
[mumech]
# chemical potential (reciprocal space)
type = InverseFFT
buffer = mumech
input = mumechbar
[]
[Mbarmubar]
type = ParsedCompute
buffer = Mbarmubar
expression = 'Mbar*(mubar+mumechbar)'
inputs = 'Mbar mubar mumechbar'
[]
[cbar]
type = ForwardFFT
buffer = cbar
input = c
[]
[qsmech]
type = FFTQuasistaticElasticity
displacements = 'disp_x disp_y disp_z'
cbar = cbar
lambda = 100
mu = 50
e0 = 0.02
[]
[group]
type = ComputeGroup
computes = 'cbar mumech mu mubar'
[]
[]
[]
[TensorSolver]
type = AdamsBashforthMoulton
buffer = c
reciprocal_buffer = cbar
linear_reciprocal = kappabarbar
nonlinear_reciprocal = Mbarmubar
[]
[Postprocessors]
[min_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[min_disp_x]
type = TensorExtremeValuePostprocessor
buffer = disp_x
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_disp_x]
type = TensorExtremeValuePostprocessor
buffer = disp_x
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[min_disp_y]
type = TensorExtremeValuePostprocessor
buffer = disp_y
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_disp_y]
type = TensorExtremeValuePostprocessor
buffer = disp_y
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[min_disp_z]
type = TensorExtremeValuePostprocessor
buffer = disp_z
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_disp_z]
type = TensorExtremeValuePostprocessor
buffer = disp_z
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[C]
type = TensorIntegralPostprocessor
buffer = c
execute_on = 'TIMESTEP_END'
[]
[cavg]
type = TensorAveragePostprocessor
buffer = c
execute_on = 'TIMESTEP_END'
[]
[]
[Problem]
type = TensorProblem
spectral_solve_substeps = 1000
print_debug_output = true
[]
[Executioner]
type = Transient
num_steps = 100
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 1.8
dt = 0.1
[]
dtmax = 1000
[]
[Outputs]
csv = true
perf_graph = true
execute_on = 'TIMESTEP_END'
[]
(benchmarks/02_oswald_ripening/simple.i)
[Domain]
dim = 2
nx = 4
ny = 4
xmax = 1
ymax = 1
device_names = 'cuda:0'
mesh_mode = DOMAIN
[]
[TensorBuffers]
# variables
[n1]
[]
[n2]
[]
[n3]
[]
[n1_bar]
[]
[n2_bar]
[]
[n3_bar]
[]
[mu_n1]
[]
[mu_n2]
[]
[mu_n3]
[]
[mu_n1_bar]
[]
[mu_n2_bar]
[]
[mu_n3_bar]
[]
[Lbar] # zero
[]
[]
[TensorComputes]
[Initialize]
[Lbar]
type = ConstantReciprocalTensor
buffer = Lbar
real = 0
imaginary = 0
[]
[n1]
type = ConstantTensor
buffer = n1
real = 1
[]
[n2]
type = ConstantTensor
buffer = n2
real = 1
[]
[n3]
type = ConstantTensor
buffer = n3
real = 1
[]
[mu_n1]
type = ConstantTensor
buffer = mu_n1
real = 1
[]
[]
[Solve]
[mu_n2]
type = ParsedCompute
buffer = mu_n2
expression = 'n3'
inputs = n3
[]
[mu_n3]
type = ParsedCompute
buffer = mu_n3
expression = 'n3*n3'
inputs = n3
[]
[mu_n1_bar]
type = ForwardFFT
buffer = mu_n1_bar
input = mu_n1
[]
[mu_n2_bar]
type = ForwardFFT
buffer = mu_n2_bar
input = mu_n2
[]
[mu_n3_bar]
type = ForwardFFT
buffer = mu_n3_bar
input = mu_n3
[]
[n1_bar]
type = ForwardFFT
buffer = n1_bar
input = n1
[]
[n2_bar]
type = ForwardFFT
buffer = n2_bar
input = n2
[]
[n3_bar]
type = ForwardFFT
buffer = n3_bar
input = n3
[]
[]
[]
[TensorSolver]
# type = SecantSolver
type = BroydenSolver
substeps = 1
max_iterations = 10
damping = 0.5
buffer = 'n1 n2 n3'
tolerance = 1e-5
dt_epsilon = 1e-5
reciprocal_buffer = 'n1_bar n2_bar n3_bar'
linear_reciprocal = 'Lbar Lbar Lbar'
nonlinear_reciprocal = 'mu_n1_bar mu_n2_bar mu_n3_bar'
verbose = true
[]
[Postprocessors]
[n1]
type = TensorAveragePostprocessor
buffer = n1
execute_on = 'TIMESTEP_END'
[]
[n2]
type = TensorAveragePostprocessor
buffer = n2
execute_on = 'TIMESTEP_END'
[]
[n3]
type = TensorAveragePostprocessor
buffer = n3
execute_on = 'TIMESTEP_END'
[]
[]
[Problem]
type = TensorProblem
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1e-2
[]
[Outputs]
perf_graph = true
execute_on = 'TIMESTEP_END'
[]
(test/tests/tensor_compute/coupled_pf_mech.i)
[Domain]
dim = 3
nx = 128
ny = 128
nz = 128
xmax = ${fparse pi*4}
ymax = ${fparse pi*4}
zmax = ${fparse pi*4}
mesh_mode = DUMMY
[]
[TensorBuffers]
# phase field
[c]
[]
[cbar]
[]
[mu]
[]
[mubar]
[]
[Mbarmubar]
[]
# mechanics
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[mumechbar]
[]
[mumech]
[]
# constant tensors
[Mbar]
[]
[kappabarbar]
[]
[]
[TensorOutputs]
[xdmf]
type = XDMFTensorOutput
buffer = 'c disp_x disp_y disp_z mu mumech'
output_mode = 'Node Node Node Node Cell Cell'
enable_hdf5 = true
[]
[]
[TensorComputes]
[Initialize]
[c]
type = RandomTensor
buffer = c
min = 0.44
max = 0.56
[]
[disp_x]
type = RandomTensor
buffer = disp_x
min = 0
max = 0
[]
[disp_y]
type = RandomTensor
buffer = disp_y
min = 0
max = 0
[]
[disp_z]
type = RandomTensor
buffer = disp_z
min = 0
max = 0
[]
[Mbar]
type = ReciprocalLaplacianFactor
factor = 0.2 # Mobility
buffer = Mbar
[]
[kappabarbar]
type = ReciprocalLaplacianSquareFactor
factor = -0.001 # kappa
buffer = kappabarbar
[]
[]
[Solve]
[mu]
# chemical potential (real space)
type = ParsedCompute
buffer = mu
expression = '0.1*c^2*(c-1)^2' # + c*sin(x/2)*0.005'
extra_symbols = true
derivatives = c
inputs = c
[]
[mubar]
# chemical potential (reciprocal space)
type = ForwardFFT
buffer = mubar
input = mu
[]
[mumechbar]
# mechanical chemical potential (reciprocal space)
type = FFTElasticChemicalPotential
buffer = mumechbar
cbar = cbar
displacements = 'disp_x disp_y disp_z'
lambda = 100
mu = 50
e0 = 0.02
[]
[mumech]
# chemical potential (reciprocal space)
type = InverseFFT
buffer = mumech
input = mumechbar
[]
[Mbarmubar]
type = ParsedCompute
buffer = Mbarmubar
expression = 'Mbar*(mubar+mumechbar)'
inputs = 'Mbar mubar mumechbar'
[]
[cbar]
type = ForwardFFT
buffer = cbar
input = c
[]
[qsmech]
type = FFTQuasistaticElasticity
displacements = 'disp_x disp_y disp_z'
cbar = cbar
lambda = 100
mu = 50
e0 = 0.02
[]
[]
[]
[TensorTimeIntegrators]
[c]
type = FFTSemiImplicit
buffer = c
reciprocal_buffer = cbar
linear_reciprocal = kappabarbar
nonlinear_reciprocal = Mbarmubar
[]
[]
[Postprocessors]
[min_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[min_disp_x]
type = TensorExtremeValuePostprocessor
buffer = disp_x
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_disp_x]
type = TensorExtremeValuePostprocessor
buffer = disp_x
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[min_disp_y]
type = TensorExtremeValuePostprocessor
buffer = disp_y
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_disp_y]
type = TensorExtremeValuePostprocessor
buffer = disp_y
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[min_disp_z]
type = TensorExtremeValuePostprocessor
buffer = disp_z
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_disp_z]
type = TensorExtremeValuePostprocessor
buffer = disp_z
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[C]
type = TensorIntegralPostprocessor
buffer = c
execute_on = 'TIMESTEP_END'
[]
[cavg]
type = TensorAveragePostprocessor
buffer = c
execute_on = 'TIMESTEP_END'
[]
[]
[Problem]
type = TensorProblem
spectral_solve_substeps = 1000
print_debug_output = true
[]
[Executioner]
type = Transient
num_steps = 100
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 1.8
dt = 0.1
[]
dtmax = 1000
[]
[Outputs]
csv = true
perf_graph = true
execute_on = 'TIMESTEP_END'
[]
(examples/cahn_hilliard/cahnhilliard3.i)
[Domain]
dim = 3
nx = 100
ny = 100
nz = 100
xmax = ${fparse pi*4}
ymax = ${fparse pi*4}
zmax = ${fparse pi*4}
device_names = 'cuda'
mesh_mode = DUMMY
[]
[TensorBuffers]
[c]
[]
[cbar]
[]
[mu]
[]
[mubar]
[]
[Mbarmubar]
[]
# constant tensors
[Mbar]
[]
[kappabarbar]
[]
[]
[TensorOutputs]
[xdmf]
type = XDMFTensorOutput
buffer = 'c mu'
output_mode = 'Node Cell'
enable_hdf5 = true
[]
[]
[TensorComputes]
[Initialize]
[c]
type = RandomTensor
buffer = c
min = 0.44
max = 0.56
[]
[Mbar]
type = ReciprocalLaplacianFactor
factor = 0.2 # Mobility
buffer = Mbar
[]
[kappabarbar]
type = ReciprocalLaplacianSquareFactor
factor = -0.001 # kappa
buffer = kappabarbar
[]
[]
[Solve]
[mu]
type = ParsedCompute
buffer = mu
expression = '0.1*c^2*(c-1)^2'
derivatives = c
# expression = "0.4*c^3-0.6*c^2+0.2*c"
inputs = c
[]
[mubar]
type = ForwardFFT
buffer = mubar
input = mu
[]
[Mbarmubar]
type = ParsedCompute
buffer = Mbarmubar
expression = 'Mbar*mubar'
inputs = 'Mbar mubar'
[]
[cbar]
type = ForwardFFT
buffer = cbar
input = c
[]
[]
[]
[TensorTimeIntegrators]
[c]
type = FFTSemiImplicit
buffer = c
reciprocal_buffer = cbar
linear_reciprocal = kappabarbar
nonlinear_reciprocal = Mbarmubar
[]
[]
[Postprocessors]
[min_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MIN
execute_on = 'TIMESTEP_END'
[]
[max_c]
type = TensorExtremeValuePostprocessor
buffer = c
value_type = MAX
execute_on = 'TIMESTEP_END'
[]
[C]
type = TensorIntegralPostprocessor
buffer = c
execute_on = 'TIMESTEP_END'
[]
[cavg]
type = TensorAveragePostprocessor
buffer = c
execute_on = 'TIMESTEP_END'
[]
[]
[Problem]
type = TensorProblem
spectral_solve_substeps = 1000
[]
[Executioner]
type = Transient
num_steps = 20
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 1.8
dt = 0.1
[]
dtmax = 1000
[]
[Outputs]
csv = true
perf_graph = true
execute_on = 'TIMESTEP_END'
[]
(examples/phase_field_crystal/pfc_fcc_atomic_structure_3d.i)
# 3D FCC PFC test showing atomic-scale density fluctuations
# Based on PhysRevE.81.061601 two-mode FCC PFC model
# Grid parameters - 3D resolution
N = 64 # Grid points per dimension (64^3 = 262k points)
# PFC model parameters - LARGER epsilon for clearer atomic structure
psi_mean = -0.2 # Mean density
epsilon = 0.15 # Larger undercooling for stronger modulations
R1_param = 0.0 # Two-mode coupling (0 for max FCC stability)
Q1_param = ${fparse sqrt(4.0/3.0)} # FCC wave number ratio
# Domain size: want several unit cells
# The (111) wavelength is 2*pi/q0 = 2*pi*sqrt(3/4) ≈ 5.44 (dimensionless)
# Fit 8 wavelengths in each direction
Lx = ${fparse 8 * 2 * ${pi} / ${Q1_param}}
Ly = ${Lx}
Lz = ${Lx}
[Domain]
dim = 3
nx = ${N}
ny = ${N}
nz = ${N}
xmax = ${Lx}
ymax = ${Ly}
zmax = ${Lz}
[]
[TensorComputes]
[Initialize]
# Random perturbations to seed crystal growth
[psi]
type = RandomTensor
buffer = psi
max = ${fparse ${psi_mean} + 0.01}
min = ${fparse ${psi_mean} - 0.01}
seed = 12345
[]
# Linear operator for FCC
[linear]
type = FCCPFCLinear
buffer = 'linear'
eps = ${epsilon}
R1 = ${R1_param}
Q1 = ${Q1_param}
mobility = 1.0
[]
# Dealiasing for cubic nonlinearity
[smooth_operator]
type = DeAliasingTensor
buffer = smooth_operator
method = HOULI
[]
[]
[Solve]
# Nonlinear term
[nl_div_psi_cubed]
type = FCCPFCNonlinear
buffer = NL
psi = psi
dealiasing = smooth_operator
mobility = 1.0
[]
# FFT for spectral solver
[psi_hat]
type = ForwardFFT
buffer = psi_hat
input = psi
[]
[]
[]
[TensorSolver]
type = AdamsBashforthMoulton
buffer = 'psi'
linear_reciprocal = 'linear'
nonlinear_reciprocal = 'NL'
reciprocal_buffer = 'psi_hat'
corrector_order = 1
corrector_steps = 3
predictor_order = 1
substeps = 10000
[]
[Postprocessors]
[max_psi]
type = TensorExtremeValuePostprocessor
buffer = psi
value_type = MAX
execute_on = 'initial timestep_end'
[]
[min_psi]
type = TensorExtremeValuePostprocessor
buffer = psi
value_type = MIN
execute_on = 'initial timestep_end'
[]
[mean_psi]
type = TensorAveragePostprocessor
buffer = psi
execute_on = 'initial timestep_end'
[]
[]
[TensorOutputs]
[xdmf]
type = XDMFTensorOutput
buffer = 'psi'
enable_hdf5 = true
[]
[]
[Executioner]
type = Transient
num_steps = 200 # Reduced for 3D (much more expensive)
dt = 5
[]
[Outputs]
perf_graph = true
csv = true
[]
(examples/phase_field_crystal/pfc_fcc_atomic_structure.i)
# FCC PFC test designed to clearly show atomic-scale density fluctuations
# Using larger epsilon for stronger density modulations
# Based on PhysRevE.81.061601 two-mode FCC PFC model
# Grid parameters - fine resolution to resolve atomic peaks
N = 4 # Grid points per dimension
# PFC model parameters - LARGER epsilon for clearer atomic structure
psi_mean = -0.2 # Mean density
epsilon = 0.15 # Larger undercooling for stronger modulations
R1_param = 0.0 # Two-mode coupling (0 for max FCC stability)
Q1_param = ${fparse sqrt(4.0/3.0)} # FCC wave number ratio
# Domain size: want several unit cells but fine enough resolution
# The (111) wavelength is 2*pi/q0 = 2*pi*sqrt(3/4) ≈ 5.44 (dimensionless)
# Let's fit about 'N' wavelengths in each direction
Lx = ${fparse N * 2 * pi / ${Q1_param}}
Ly = ${Lx}
[Domain]
dim = 2
nx = ${fparse ${N} * 8 }
ny = ${fparse ${N} * 8 }
xmax = ${Lx}
ymax = ${Ly}
[]
[TensorComputes]
[Initialize]
# Random perturbations to seed crystal growth
[psi]
type = RandomTensor
buffer = psi
max = ${fparse ${psi_mean} + 0.01}
min = ${fparse ${psi_mean} - 0.01}
seed = 12345
[]
# Linear operator for FCC
[linear]
type = FCCPFCLinear
buffer = 'linear'
eps = ${epsilon}
R1 = ${R1_param}
Q1 = ${Q1_param}
mobility = 1.0
[]
# Dealiasing for cubic nonlinearity
[smooth_operator]
type = DeAliasingTensor
buffer = smooth_operator
method = HOULI
[]
[]
[Solve]
# Nonlinear term
[nl_div_psi_cubed]
type = FCCPFCNonlinear
buffer = NL
psi = psi
dealiasing = smooth_operator
mobility = 1.0
[]
# FFT for spectral solver
[psi_hat]
type = ForwardFFT
buffer = psi_hat
input = psi
[]
[]
[]
[TensorSolver]
type = AdamsBashforthMoulton
buffer = 'psi'
linear_reciprocal = 'linear'
nonlinear_reciprocal = 'NL'
reciprocal_buffer = 'psi_hat'
corrector_order = 1
corrector_steps = 3
predictor_order = 1
substeps = 10000
[]
[Postprocessors]
[max_psi]
type = TensorExtremeValuePostprocessor
buffer = psi
value_type = MAX
execute_on = 'initial timestep_end'
[]
[min_psi]
type = TensorExtremeValuePostprocessor
buffer = psi
value_type = MIN
execute_on = 'initial timestep_end'
[]
[mean_psi]
type = TensorAveragePostprocessor
buffer = psi
execute_on = 'initial timestep_end'
[]
[]
[TensorOutputs]
[xdmf]
type = XDMFTensorOutput
buffer = 'psi'
enable_hdf5 = true
[]
[]
[Executioner]
type = Transient
num_steps = 1000
dt = 20 # Larger timestep for faster evolution
[]
[Outputs]
perf_graph = true
csv = true
[]
(test/tests/tensor_compute/pfc_fcc.i)
# FCC PFC test designed to clearly show atomic-scale density fluctuations
# Using larger epsilon for stronger density modulations
# Based on PhysRevE.81.061601 two-mode FCC PFC model
# Grid parameters - fine resolution to resolve atomic peaks
N = 1 # Grid points per dimension
# PFC model parameters - LARGER epsilon for clearer atomic structure
psi_mean = -0.2 # Mean density
epsilon = 0.15 # Larger undercooling for stronger modulations
R1_param = 0.0 # Two-mode coupling (0 for max FCC stability)
Q1_param = ${fparse sqrt(4.0/3.0)} # FCC wave number ratio
# Domain size: want several unit cells but fine enough resolution
# The (111) wavelength is 2*pi/q0 = 2*pi*sqrt(3/4) ≈ 5.44 (dimensionless)
# Let's fit about 'N' wavelengths in each direction
Lx = ${fparse N * 2 * pi / ${Q1_param}}
Ly = ${Lx}
[Domain]
dim = 2
nx = ${fparse ${N} * 8 }
ny = ${fparse ${N} * 8 }
xmax = ${Lx}
ymax = ${Ly}
[]
[TensorComputes]
[Initialize]
# Random perturbations to seed crystal growth
[psi]
type = RandomTensor
buffer = psi
max = ${fparse ${psi_mean} + 0.01}
min = ${fparse ${psi_mean} - 0.01}
seed = 12345
[]
# Linear operator for FCC
[linear]
type = FCCPFCLinear
buffer = 'linear'
eps = ${epsilon}
R1 = ${R1_param}
Q1 = ${Q1_param}
mobility = 1.0
[]
# Dealiasing for cubic nonlinearity
[smooth_operator]
type = DeAliasingTensor
buffer = smooth_operator
method = HOULI
[]
[]
[Solve]
# Nonlinear term
[nl_div_psi_cubed]
type = FCCPFCNonlinear
buffer = NL
psi = psi
dealiasing = smooth_operator
mobility = 1.0
[]
# FFT for spectral solver
[psi_hat]
type = ForwardFFT
buffer = psi_hat
input = psi
[]
[]
[]
[TensorSolver]
type = AdamsBashforthMoulton
buffer = 'psi'
linear_reciprocal = 'linear'
nonlinear_reciprocal = 'NL'
reciprocal_buffer = 'psi_hat'
corrector_order = 1
corrector_steps = 3
predictor_order = 1
substeps = 1000
[]
[Postprocessors]
[max_psi]
type = TensorExtremeValuePostprocessor
buffer = psi
value_type = MAX
execute_on = 'initial timestep_end'
[]
[min_psi]
type = TensorExtremeValuePostprocessor
buffer = psi
value_type = MIN
execute_on = 'initial timestep_end'
[]
[mean_psi]
type = TensorAveragePostprocessor
buffer = psi
execute_on = 'initial timestep_end'
[]
[]
[TensorOutputs]
[xdmf]
type = XDMFTensorOutput
buffer = 'psi'
enable_hdf5 = true
[]
[]
[Executioner]
type = Transient
num_steps = 100
dt = 0.2 # Larger timestep for faster evolution
[]
[Outputs]
perf_graph = true
csv = true
[]
(include/postprocessors/TensorIntegralPostprocessor.h)
/**********************************************************************/
/* DO NOT MODIFY THIS HEADER */
/* Marlin, a Fourier spectral solver for MOOSE */
/* */
/* Copyright 2024 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/**********************************************************************/
#pragma once
#include "TensorAveragePostprocessor.h"
/**
* Compute the integral of a Tensor buffer
*/
class TensorIntegralPostprocessor : public TensorAveragePostprocessor
{
public:
static InputParameters validParams();
TensorIntegralPostprocessor(const InputParameters & parameters);
virtual void finalize() override;
virtual PostprocessorValue getValue() const override;
protected:
Real _integral;
};