https://mooseframework.inl.gov
NumberArrayOps.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 "MooseConfig.h"
13 #include "MooseError.h"
14 #include "metaphysicl/dualnumberarray.h"
15 
16 namespace Moose
17 {
18 template <std::size_t N>
19 inline void
20 derivInsert(NumberArray<N, Real> & derivs, dof_id_type index, Real value)
21 {
22  mooseAssert(index < MOOSE_AD_MAX_DOFS_PER_ELEM,
23  "The requested derivative index "
24  << index << " is not less than " << MOOSE_AD_MAX_DOFS_PER_ELEM
25  << ". You can run `configure --with-derivative-size=<n>` to request a larger "
26  "derivative container.");
27  derivs[index] = value;
28 }
29 }
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N >> &derivs, libMesh::dof_id_type index, Real value)
Definition: ADReal.h:21
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
uint8_t dof_id_type