20 #include "libmesh/threads.h" 26 std::vector<Number> & serialized_solution,
27 unsigned int max_h_level,
28 const std::string & marker_name,
29 bool is_serialized_solution)
31 _fe_problem(fe_problem),
32 _displaced_problem(_fe_problem.getDisplacedProblem()),
33 _aux_sys(fe_problem.getAuxiliarySystem()),
34 _system_number(_aux_sys.number()),
35 _adaptivity(_fe_problem.adaptivity()),
36 _field_var(_fe_problem.getVariable(
38 _field_var_number(_field_var.number()),
39 _serialized_solution(serialized_solution),
40 _max_h_level(max_h_level),
41 _is_serialized_solution(is_serialized_solution)
48 _fe_problem(x._fe_problem),
49 _displaced_problem(x._displaced_problem),
51 _system_number(x._system_number),
52 _adaptivity(x._adaptivity),
53 _field_var(x._field_var),
54 _field_var_number(x._field_var_number),
55 _serialized_solution(x._serialized_solution),
56 _max_h_level(x._max_h_level),
57 _is_serialized_solution(x._is_serialized_solution)
64 mooseAssert(elem->active(),
"This thread should only act on active elements");
85 dof_value = current_local_solution(dof_number);
92 if (
std::abs(marker_value - dof_value) > TOLERANCE * TOLERANCE)
93 mooseError(
"Invalid Marker value detected: ", dof_value);
104 const_cast<Elem *
>(elem)->set_refinement_flag((Elem::RefinementState)marker_value);
109 ->set_refinement_flag((Elem::RefinementState)marker_value);
MetaPhysicL::DualNumber< V, D, asd > abs(const MetaPhysicL::DualNumber< V, D, asd > &a)
Base class for assembly-like calculations.
unsigned int _max_h_level
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
unsigned int _system_number
MooseVariableFEBase & _field_var
const NumericVector< Number > *const & currentSolution() const override
The solution vector that is currently being operated on.
MarkerValue
This mirrors the main refinement flag values in libMesh in Elem::RefinementState but adds "dont_mark"...
void join(const FlagElementsThread &)
virtual void onElement(const Elem *elem) override
Assembly of the element (not including surface assembly)
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
VarKindType
Framework-wide stuff.
FlagElementsThread(FEProblemBase &fe_problem, std::vector< Number > &serialized_solution, unsigned int max_h_level, const std::string &marker_name, bool is_serialized_solution)
std::shared_ptr< DisplacedProblem > _displaced_problem
unsigned int _field_var_number
std::vector< Number > & _serialized_solution
AuxiliarySystem & _aux_sys
bool activeOnSubdomain(SubdomainID subdomain) const
Is the variable active on the subdomain?
bool _is_serialized_solution
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...