18 #include "libmesh/node.h" 19 #include "libmesh/elem.h" 28 params.
addClassDescription(
"Creates an AD material property for a variable transferred from the " 29 "boundary of a 2D mesh onto a 1D mesh.");
32 params.
addRequiredParam<std::string>(
"paired_variable",
"The variable to get the value of.");
35 "The name of the material property that will be " 36 "declared that will represent the transferred variable.");
44 _nl_sys(_subproblem.systemBaseNonlinear(0)),
45 _serialized_solution(_nl_sys.currentSolution()),
47 _subproblem.getVariable(_tid, getParam<
std::string>(
"paired_variable"),
Moose::
VAR_SOLVER)
49 _mesh_alignment(*getParam<
MeshAlignment *>(
"_mesh_alignment")),
50 _prop(declareADProperty<
Real>(getParam<MaterialPropertyName>(
"property_name"))),
58 std::vector<ADReal> nodal_values;
65 const Node *
const coupled_node =
_mesh.
nodePtr(coupled_node_id);
75 _prop[qp] += nodal_values[i] *
_phi[i][qp];
const QBase *const & _qrule
virtual void computeProperties() override
ADMaterialProperty< Real > & _prop
Material property for the transferred variable.
Builds mapping between two aligned subdomains/boundaries.
const dof_id_type & getCoupledNodeID(const dof_id_type &node_id) const
Gets the coupled node ID for a given node ID.
registerMooseObject("ThermalHydraulicsApp", MeshAlignmentVariableTransferMaterial)
const SystemBase & _nl_sys
Nonlinear system.
static InputParameters validParams()
static InputParameters validParams()
const NumericVector< Number > *const & _serialized_solution
Solution vector.
virtual const Node * nodePtr(const dof_id_type i) const
unsigned int number() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MeshAlignment & _mesh_alignment
Mesh alignment object.
MeshAlignmentVariableTransferMaterial(const InputParameters ¶meters)
const VariablePhiValue & _phi
Basis function for transferred variable.
IntRange< T > make_range(T beg, T end)
unsigned int _paired_variable
Variable number of the variable to transfer.
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N >> &derivs, libMesh::dof_id_type index, Real value)
Creates an AD material property for a variable transferred from the boundary of a 2D mesh onto a 1D m...
const Elem *const & _current_elem