https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ChainedADReal.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 "ChainedReal.h"
13#include "ADRealForward.h"
14
15typedef DualNumber<ADReal, ADReal> ChainedADReal;
16
22namespace MetaPhysicL
23{
24#define CompareTypes_default_Types(typenames, typename1, typename2, enabletype) \
25 CompareTypes_default_Type(Plus, typenames, typename1, typename2, enabletype); \
26 CompareTypes_default_Type(Minus, typenames, typename1, typename2, enabletype); \
27 CompareTypes_default_Type(Multiplies, typenames, typename1, typename2, enabletype); \
28 CompareTypes_default_Type(Divides, typenames, typename1, typename2, enabletype); \
29 CompareTypes_default_Type(And, typenames, typename1, typename2, enabletype); \
30 CompareTypes_default_Type(Or, typenames, typename1, typename2, enabletype)
31
32#define CompareTypes_super(a, b, super) \
33 template <bool reverse_order, typename Enable> \
34 struct CompareTypes<a, b, reverse_order, Enable> \
35 { \
36 typedef super supertype; \
37 }; \
38 CompareTypes_default_Types(, a, b, void)
39
41
42#undef CompareTypes_default_Types
43#undef CompareTypes_super
44}
DualNumber< Real, DNDerivativeType, true > ADReal
DualNumber< ADReal, ADReal > ChainedADReal
We need to instantiate the following CompareTypes to tell the compiler that ADReal is a subtype of Ch...
CompareTypes_super(ADReal, ChainedADReal, ChainedADReal)