Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI_unspecified1d.cc
Go to the documentation of this file.
1/*
2# <<BEGIN-copyright>>
3# Copyright 2019, Lawrence Livermore National Security, LLC.
4# This file is part of the gidiplus package (https://github.com/LLNL/gidiplus).
5# gidiplus is licensed under the MIT license (see https://opensource.org/licenses/MIT).
6# SPDX-License-Identifier: MIT
7# <<END-copyright>>
8*/
9
10#include <stdlib.h>
11
12#include "GIDI.hpp"
13
14namespace GIDI {
15
16namespace Functions {
17
18/*! \class Unspecified1d
19 * Class for the GNDS <**unspecified**> node.
20 */
21
22/* *********************************************************************************************************//**
23 *
24 * @param a_construction [in] Used to pass user options to the constructor.
25 * @param a_node [in] The **HAPI::Node** to be parsed and used to construct the XYs2d.
26 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
27 * @param a_parent [in] The parent GIDI::Suite.
28 ***********************************************************************************************************/
29
30Unspecified1d::Unspecified1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent ) :
31 Function1dForm( a_construction, a_node, a_setupInfo, FormType::unspecified1d, a_parent ) {
32
33}
34
35/* *********************************************************************************************************//**
36 ***********************************************************************************************************/
37
41
42/* *********************************************************************************************************//**
43 * Returns the domain minimum for the instance.
44 *
45 * @return The domain minimum for the instance.
46 ***********************************************************************************************************/
47
48double Unspecified1d::domainMin( ) const {
49
50 return( 0.0 ); // FIXME
51}
52
53/* *********************************************************************************************************//**
54 * Returns the domain maximum for the instance.
55 *
56 * @return The domain maximum for the instance.
57 ***********************************************************************************************************/
58
59double Unspecified1d::domainMax( ) const {
60
61 return( 1.0 ); // FIXME
62}
63
64/* *********************************************************************************************************//**
65 * Returns the value of the function evaluated at the specified projectile's energy.
66 * Currently not implemented.
67 *
68 * @param a_x1 [in] The projectile's energy.
69 * @return The value of the function evaluated at *a_x1*.
70 ***********************************************************************************************************/
71
72double Unspecified1d::evaluate( LUPI_maybeUnused double a_x1 ) const {
73
74 throw Exception( "Unspecified1d::evaluate: not implemented." );
75}
76
77/* *********************************************************************************************************//**
78 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
79 *
80 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
81 * @param a_indent [in] The amount to indent *this* node.
82 * @param a_embedded [in] If *true*, *this* function is embedded in a higher dimensional function.
83 * @param a_inRegions [in] If *true*, *this* is in a Regions1d container.
84 ***********************************************************************************************************/
85
86void Unspecified1d::toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const {
87
88 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
89 std::string attributes;
90
91 if( a_embedded ) {
93 else {
94 if( a_inRegions ) {
95 attributes = a_writeInfo.addAttribute( GIDI_indexChars, intToString( index( ) ) ); }
96 else {
97 if( label( ) != "" ) attributes = a_writeInfo.addAttribute( GIDI_labelChars, label( ) );
98 }
99 }
100
101 a_writeInfo.addNodeStarter( a_indent, moniker( ), attributes );
102
103 axes( ).toXMLList( a_writeInfo, indent2 );
104 a_writeInfo.addNodeEnder( moniker( ) );
105}
106
107} // End namespace Functions.
108
109} // End namespace GIDI.
#define GIDI_outerDomainValueChars
Definition GIDI.hpp:436
#define GIDI_labelChars
Definition GIDI.hpp:438
#define GIDI_indexChars
Definition GIDI.hpp:437
#define LUPI_maybeUnused
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent="") const
Definition GIDI_axes.cc:113
std::string const & label() const
Definition GIDI.hpp:658
Function1dForm(std::string const &a_moniker, FormType a_type, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue)
Definition GIDI_form.cc:348
Axes const & axes() const
Definition GIDI.hpp:1012
double outerDomainValue() const
Definition GIDI.hpp:1010
double evaluate(double a_x1) const
void toXMLList_func(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions) const
Unspecified1d(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
std::string const & moniker() const
Definition GUPI.hpp:102
void addNodeEnder(std::string const &a_moniker)
Definition GUPI.hpp:59
std::string incrementalIndent(std::string const &indent)
Definition GUPI.hpp:52
void addNodeStarter(std::string const &indent, std::string const &a_moniker, std::string const &a_attributes="")
Definition GUPI.hpp:55
std::string addAttribute(std::string const &a_name, std::string const &a_value) const
Definition GUPI.hpp:60
Definition GIDI.hpp:32
FormType
Definition GIDI.hpp:118
std::string intToString(int a_value)
Definition GIDI_misc.cc:415
std::string doubleToShortestString(double a_value, int a_significantDigits=15, int a_favorEFormBy=0)
Definition LUPI_misc.cc:349