https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FVRelationshipManagerInterface.h
Go to the documentation of this file.
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#pragma once
11
12#include "InputParameters.h"
13#include "MooseError.h"
14
21{
22public:
24
33 static void setRMParamsAdvection(const InputParameters & obj_params,
34 InputParameters & rm_params,
35 const unsigned short conditional_extended_layers);
36
45 static void setRMParamsDiffusion(const InputParameters & obj_params,
46 InputParameters & rm_params,
47 const unsigned short conditional_extended_layers);
48
50
51private:
58 static void setRMParams(const InputParameters & obj_params,
59 InputParameters & rm_params,
60 const unsigned short ghost_layers);
61
67 template <typename T>
68 static void parameterError(const InputParameters & obj_params,
69 const std::string & parameter_name,
70 const std::string & function_name,
71 const std::string & description);
72};
73
74template <typename T>
75void
77 const std::string & parameter_name,
78 const std::string & function_name,
79 const std::string & description)
80{
81 if (!obj_params.have_parameter<T>(parameter_name))
83 obj_params.blockFullpath(),
84 " The following parameter ",
85 parameter_name,
86 " was not found! This is required for setting the correct amount of ghosting in parallel "
87 "runs. This error is typically caused by utilizing incompatible relationship manager "
88 "callback functions in different objects. An example can be using ",
89 function_name,
90 " in a(n)",
91 description,
92 " object.");
93}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
This class is responsible for adding relationship managers that describe geometric,...
static void setRMParamsDiffusion(const InputParameters &obj_params, InputParameters &rm_params, const unsigned short conditional_extended_layers)
Helper function to set the relationship manager parameters for diffusion-related kernels.
static void parameterError(const InputParameters &obj_params, const std::string &parameter_name, const std::string &function_name, const std::string &description)
Throw an error with an acceptable context.
static void setRMParamsAdvection(const InputParameters &obj_params, InputParameters &rm_params, const unsigned short conditional_extended_layers)
Helper function to set the relationship manager parameters for advection-related kernels.
static void setRMParams(const InputParameters &obj_params, InputParameters &rm_params, const unsigned short ghost_layers)
Helper function to set the relationship manager parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
std::string blockFullpath() const
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.