Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #include "WeightedGapAux.h" 11 : 12 : registerMooseObject("MooseApp", WeightedGapAux); 13 : 14 : InputParameters 15 14415 : WeightedGapAux::validParams() 16 : { 17 14415 : InputParameters params = MortarNodalAuxKernel::validParams(); 18 14415 : params.addClassDescription( 19 : "Returns the specified variable as an auxiliary variable with the same value."); 20 14415 : params.set<bool>("interpolate_normals") = false; 21 14415 : return params; 22 0 : } 23 : 24 78 : WeightedGapAux::WeightedGapAux(const InputParameters & parameters) 25 78 : : MortarNodalAuxKernel(parameters), _weighted_gap(0), _qp_gap_nodal(0) 26 : { 27 78 : } 28 : 29 : Real 30 1132 : WeightedGapAux::computeValue() 31 : { 32 1132 : _weighted_gap = 0; 33 3848 : for (_qp = 0; _qp < _qrule_msm->n_points(); _qp++) 34 : { 35 2716 : computeQpProperties(); 36 9192 : for (_i = 0; _i < _test_lower.size(); ++_i) 37 6476 : computeQpIProperties(); 38 : } 39 : 40 1132 : return _weighted_gap; 41 : } 42 : 43 : void 44 2716 : WeightedGapAux::computeQpProperties() 45 : { 46 2716 : const auto gap_vec = _phys_points_primary[_qp] - _phys_points_secondary[_qp]; 47 : 48 2716 : _qp_gap_nodal = gap_vec * (_JxW_msm[_qp] * _coord_msm[_qp]); 49 : 50 2716 : _msm_volume += _JxW_msm[_qp] * _coord_msm[_qp]; 51 2716 : } 52 : 53 : void 54 6476 : WeightedGapAux::computeQpIProperties() 55 : { 56 6476 : _weighted_gap += _test_lower[_i][_qp] * _qp_gap_nodal * _normals[_i]; 57 6476 : }