https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
15namespace Moose
16{
17template <std::size_t N>
18inline void
19derivInsert(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}
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N > > &derivs, libMesh::dof_id_type index, Real value)
Definition ADReal.h:21