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 "MooseError.h"
13 #include "metaphysicl/dualnumberarray.h"
14 
15 namespace Moose
16 {
17 template <std::size_t N>
18 inline void
19 derivInsert(NumberArray<N, Real> & derivs, dof_id_type index, Real value)
20 {
21  mooseAssert(index < MOOSE_AD_MAX_DOFS_PER_ELEM,
22  "The requested derivative index "
23  << index << " is not less than " << MOOSE_AD_MAX_DOFS_PER_ELEM
24  << ". You can run `configure --with-derivative-size=<n>` to request a larger "
25  "derivative container.");
26  derivs[index] = value;
27 }
28 }
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