23 "Check that boundary conditions are defined correctly for finite volume problems.");
42 const std::vector<MooseVariableFEBase *> & variables =
43 _problem->getNonlinearSystemBase(i).getVariables(0);
45 for (
auto & var : variables)
50 unsigned int var_num = var->number();
51 std::vector<FVFluxBC *> flux_bcs;
52 std::vector<FVDirichletBCBase *> dirichlet_bcs;
54 .template condition<AttribSystem>(
"FVFluxBC")
55 .
template condition<AttribVar>(var_num)
56 .template condition<AttribThread>(0)
57 .
template condition<AttribSysNum>(var->sys().number())
61 .template condition<AttribSystem>(
"FVDirichletBC")
62 .
template condition<AttribVar>(var_num)
63 .template condition<AttribThread>(0)
64 .
template condition<AttribSysNum>(var->sys().number())
65 .queryInto(dirichlet_bcs);
67 std::set<BoundaryID> all_flux_side_ids;
68 for (
auto & fbc : flux_bcs)
70 const std::set<BoundaryID> & t = fbc->boundaryIDs();
71 all_flux_side_ids.insert(t.begin(), t.end());
74 std::set<BoundaryID> all_dirichlet_side_ids;
75 for (
auto & dbc : dirichlet_bcs)
77 const std::set<BoundaryID> & temp = dbc->boundaryIDs();
80 if (all_dirichlet_side_ids.find(t) != all_dirichlet_side_ids.end())
82 "Sideset ", t,
" defines at least two DirichletBCs for variable ", var->name());
83 all_dirichlet_side_ids.insert(temp.begin(), temp.end());
87 for (
auto & t : all_flux_side_ids)
88 if (all_dirichlet_side_ids.find(t) != all_dirichlet_side_ids.end())
90 "Sideset ", t,
" defines a FluxBC and a DirichletBC for variable ", var->name());
static InputParameters validParams()
static InputParameters validParams()
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
TheWarehouse is a container for MooseObjects that allows querying/filtering over various customizeabl...
const std::string & _current_task
The current action (even though we have separate instances for each action)
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
CheckFVBCAction(const InputParameters ¶ms)
registerMooseAction("MooseApp", CheckFVBCAction, "check_integrity")