https://mooseframework.inl.gov
ComputeJacobianForScalingThread.C
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 
11 #include "MooseError.h"
12 #include "NonlinearSystemBase.h"
13 
14 #include "libmesh/elem.h"
15 
16 using namespace libMesh;
17 
19  const std::set<TagID> & tags)
20  : ComputeFullJacobianThread(fe_problem, tags)
21 {
22 }
23 
24 // Splitting Constructor
28 {
29 }
30 
31 void
33  bool bypass_threading /*= false*/)
34 {
35  try
36  {
37  try
38  {
39  ParallelUniqueId puid;
40  _tid = bypass_threading ? 0 : puid.id;
41 
42  pre();
43 
46  typename ConstElemRange::const_iterator el = range.begin();
47  for (el = range.begin(); el != range.end(); ++el)
48  {
49  if (!keepGoing())
50  break;
51 
52  const Elem * elem = *el;
53 
54  preElement(elem);
55 
57  _subdomain = elem->subdomain_id();
60 
61  onElement(elem);
62 
63  postElement(elem);
64  } // range
65 
66  post();
67  }
68  catch (libMesh::LogicError & e)
69  {
70  mooseException("We caught a libMesh error in ComputeJacobianForScalingThread: ", e.what());
71  }
72  catch (MetaPhysicL::LogicError & e)
73  {
75  }
76  }
77  catch (MooseException & e)
78  {
80  }
81 }
82 
83 void
85 {
88  else
90 }
virtual void postElement(const Elem *) override
Called after the element assembly is done (including surface assembling)
ComputeJacobianForScalingThread(FEProblemBase &fe_problem, const std::set< TagID > &tags)
void translateMetaPhysicLError(const MetaPhysicL::LogicError &)
emit a relatively clear error message when we catch a MetaPhysicL logic error
Definition: MooseError.C:112
virtual void pre()
Called before the element range loop.
virtual void preElement(const Elem *elem) override
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const SubdomainID INVALID_BLOCK_ID
Definition: MooseTypes.C:20
virtual void computeOnElement()
NonlinearSystemBase & _nl
bool offDiagonalsInAutoScaling() const
const_iterator end() const
tbb::split split
Provides a way for users to bail out of the current solve.
subdomain_id_type subdomain_id() const
vec_type::const_iterator const_iterator
const_iterator begin() const
virtual void caughtMooseException(MooseException &e) override
SubdomainID _subdomain
The subdomain for the current element.
void operator()(const libMesh::ConstElemRange &range, bool bypass_threading=false) final
virtual void onElement(const Elem *elem) override
Assembly of the element (not including surface assembly)
SubdomainID _old_subdomain
The subdomain for the last element.
virtual void computeOnElement() override
virtual void post() override
Called after the element range loop.
SubdomainID _neighbor_subdomain
The subdomain for the current neighbor.
virtual void subdomainChanged() override
Called every time the current subdomain changes (i.e.