Line data Source code
1 : /********************************************************************/ 2 : /* SOFTWARE COPYRIGHT NOTIFICATION */ 3 : /* Cardinal */ 4 : /* */ 5 : /* (c) 2021 UChicago Argonne, LLC */ 6 : /* ALL RIGHTS RESERVED */ 7 : /* */ 8 : /* Prepared by UChicago Argonne, LLC */ 9 : /* Under Contract No. DE-AC02-06CH11357 */ 10 : /* With the U. S. Department of Energy */ 11 : /* */ 12 : /* Prepared by Battelle Energy Alliance, LLC */ 13 : /* Under Contract No. DE-AC07-05ID14517 */ 14 : /* With the U. S. Department of Energy */ 15 : /* */ 16 : /* See LICENSE for full restrictions */ 17 : /********************************************************************/ 18 : 19 : #ifdef ENABLE_NEK_COUPLING 20 : 21 : #include "NekBase.h" 22 : 23 : InputParameters 24 14484 : NekBase::validParams() 25 : { 26 14484 : InputParameters params = emptyInputParameters(); 27 14484 : return params; 28 : } 29 : 30 4831 : NekBase::NekBase(const MooseObject * moose_object, const InputParameters & parameters) 31 4831 : : _nek_problem(dynamic_cast<NekRSProblem *>(&moose_object->getMooseApp().feProblem())) 32 : { 33 4831 : if (!_nek_problem) 34 : { 35 : std::string extra_help = 36 2 : moose_object->getMooseApp().feProblem().type() == "FEProblem" ? " (the default)" : ""; 37 1 : mooseError( 38 1 : moose_object->type() + 39 1 : " can only be used with NekRS-wrapped cases! You need to change the problem type from '" + 40 2 : moose_object->getMooseApp().feProblem().type() + "'" + extra_help + " to NekRSProblem."); 41 : } 42 : 43 : // NekRSProblem enforces that we then use NekRSMesh, so we don't need to check that 44 : // this pointer isn't NULL 45 4830 : _nek_mesh = dynamic_cast<const NekRSMesh *>(&moose_object->getMooseApp().feProblem().mesh()); 46 : 47 9660 : if (moose_object->isParamSetByUser("use_displaced_mesh")) 48 : mooseWarning("'use_displaced_mesh' is unused, because this postprocessor acts directly\n" 49 : "on the NekRS internal mesh"); 50 4830 : } 51 : 52 : #endif