https://mooseframework.inl.gov
UELThread.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 #include "AbaqusUserElement.h"
14 #include "libmesh/elem_range.h"
15 #include "AuxiliarySystem.h"
16 
17 class UELThread : public ThreadedElementLoop<ConstElemRange>
18 {
19 public:
20  UELThread(FEProblemBase & fe_problem, AbaqusUserElement & uel_uo);
21 
22  // Splitting Constructor
23  UELThread(UELThread & x, Threads::split split);
24 
25  void join(const UELThread &) {}
26 
27 protected:
28  virtual void subdomainChanged() override final;
29  virtual void onElement(const Elem * elem) override final;
30 
31 private:
34 
37 
41  std::vector<Real> _all_dof_values;
42  std::vector<Real> _all_dof_increments;
43  std::vector<Real> _all_udot_dof_values;
45 
46  // vectors for aux variables
51  std::vector<Real> _aux_var_values_to_uel;
52 
53  DenseVector<Real> _local_re;
54  DenseMatrix<Real> _local_ke;
55 
56  const std::vector<const MooseVariableFieldBase *> & _variables;
57 
58  const std::vector<const MooseVariableFieldBase *> & _aux_variables;
59 
62 
64  const AbaqusUserElement::uel_t & _uel;
65 
67  std::array<int, 5> _lflags;
68  std::vector<Real> _coords;
69 
71  std::vector<Real> _statev_copy;
72 };
UELThread(FEProblemBase &fe_problem, AbaqusUserElement &uel_uo)
Definition: UELThread.C:13
void join(const UELThread &)
Definition: UELThread.h:25
virtual void subdomainChanged() override final
Definition: UELThread.C:46
std::vector< Real > _all_udotdot_dof_values
Definition: UELThread.h:44
std::vector< Real > _statev_copy
state variable copy
Definition: UELThread.h:71
std::vector< dof_id_type > _var_dof_indices
dof indices of all coupled variables
Definition: UELThread.h:39
std::vector< Real > _all_aux_var_dof_increments
Definition: UELThread.h:49
std::vector< Real > _aux_var_values_to_uel
Definition: UELThread.h:51
std::vector< dof_id_type > _aux_var_dof_indices
Definition: UELThread.h:47
std::vector< Real > _coords
Definition: UELThread.h:68
std::vector< Real > _all_udot_dof_values
Definition: UELThread.h:43
std::vector< Real > _all_dof_increments
Definition: UELThread.h:42
DenseMatrix< Real > _local_ke
Definition: UELThread.h:54
DenseVector< Real > _local_re
Definition: UELThread.h:53
const std::vector< double > x
std::vector< dof_id_type > _all_dof_indices
Definition: UELThread.h:40
std::vector< Real > _all_aux_var_dof_values
Definition: UELThread.h:50
AbaqusUserElement & _uel_uo
reference to the userobject (to access parameters)
Definition: UELThread.h:61
This user-object is a testbed for implementing a custom element.
tbb::split split
const AbaqusUserElement::uel_t & _uel
have a reference to the UEL plugin here
Definition: UELThread.h:64
NonlinearSystemBase & _sys
Current nonlinear system.
Definition: UELThread.h:33
const std::vector< const MooseVariableFieldBase * > & _aux_variables
Definition: UELThread.h:58
std::vector< Real > _all_dof_values
Definition: UELThread.h:41
std::vector< dof_id_type > _all_aux_var_dof_indices
Definition: UELThread.h:48
AuxiliarySystem * _aux_sys
Auxiliary system object.
Definition: UELThread.h:36
const std::vector< const MooseVariableFieldBase * > & _variables
Definition: UELThread.h:56
virtual void onElement(const Elem *elem) override final
Fortran array memory layout: (1,1), (2,1) (3,1) (1,2) (2,2) (3,2) (1,3) (2,3) (3,3) C++ array memory ...
Definition: UELThread.C:56
std::array< int, 5 > _lflags
parameters for the UEL plugin
Definition: UELThread.h:67
uint8_t dof_id_type