https://mooseframework.inl.gov
FlagElementsThread.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 "ThreadedElementLoop.h"
13 
14 #include "libmesh/elem_range.h"
15 
16 class AuxiliarySystem;
17 class Adaptivity;
18 class DisplacedProblem;
19 
20 class FlagElementsThread : public ThreadedElementLoop<ConstElemRange>
21 {
22 public:
23  FlagElementsThread(FEProblemBase & fe_problem,
24  std::vector<Number> & serialized_solution,
25  unsigned int max_h_level,
26  const std::string & marker_name,
27  bool is_serialized_solution);
28 
29  // Splitting Constructor
31 
32  virtual void onElement(const Elem * elem) override;
33 
34  // Must override this in order to avoid calling the base class method which reads the refinement
35  // flags, causing read-write data races
36  bool shouldComputeInternalSide(const Elem &, const Elem &) const override { return false; }
37 
38  void join(const FlagElementsThread & /*y*/);
39 
40 protected:
42  std::shared_ptr<DisplacedProblem> _displaced_problem;
44  unsigned int _system_number;
47  unsigned int _field_var_number;
48  std::vector<Number> & _serialized_solution;
49  unsigned int _max_h_level;
51 };
Base class for assembly-like calculations.
FEProblemBase & _fe_problem
unsigned int _max_h_level
unsigned int _system_number
MooseVariableFEBase & _field_var
void join(const FlagElementsThread &)
This class provides an interface for common operations on field variables of both FE and FV types wit...
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.
Adaptivity & _adaptivity
FlagElementsThread(FEProblemBase &fe_problem, std::vector< Number > &serialized_solution, unsigned int max_h_level, const std::string &marker_name, bool is_serialized_solution)
tbb::split split
std::shared_ptr< DisplacedProblem > _displaced_problem
Takes care of everything related to mesh adaptivity.
Definition: Adaptivity.h:49
unsigned int _field_var_number
std::vector< Number > & _serialized_solution
AuxiliarySystem & _aux_sys
bool shouldComputeInternalSide(const Elem &, const Elem &) const override
Whether to compute the internal side for the provided element-neighbor pair.
A system that holds auxiliary variables.