GammaLib  1.7.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GModelSpatialRadialProfileDMBurkert.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GModelSpatialRadialProfileDMBurkert.cpp - Burkert radial profile class *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2016-2018 by Nathan Kelley-Hoskins *
5  * ----------------------------------------------------------------------- *
6  * *
7  * This program is free software: you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation, either version 3 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
19  * *
20  ***************************************************************************/
21 /**
22  * @file GModelSpatialRadialProfileDMBurkert.cpp
23  * @brief Radial DM Burkert profile model class implementation
24  * @author Nathan Kelley-Hoskins
25  */
26 
27 /* __ Includes ___________________________________________________________ */
28 #ifdef HAVE_CONFIG_H
29 #include <config.h>
30 #endif
31 #include "GException.hpp"
32 #include "GTools.hpp"
33 #include "GMath.hpp"
34 #include "GXmlElement.hpp"
37 
38 /* __ Constants __________________________________________________________ */
39 
40 /* __ Globals ____________________________________________________________ */
42 const GModelSpatialRegistry g_radial_disk_registry(&g_radial_disk_seed);
43 
44 /* __ Method name definitions ____________________________________________ */
45 #define G_READ "GModelSpatialRadialProfileDMBurkert::read(GXmlElement&)"
46 #define G_WRITE "GModelSpatialRadialProfileDMBurkert::write(GXmlElement&)"
47 
48 /* __ Macros _____________________________________________________________ */
49 
50 /* __ Coding definitions _________________________________________________ */
51 
52 /* __ Debug definitions __________________________________________________ */
53 
54 
55 /*==========================================================================
56  = =
57  = Constructors/destructors =
58  = =
59  ==========================================================================*/
60 
61 /***********************************************************************//**
62  * @brief Void constructor
63  *
64  * Constructs empty radial DMBurkert profile
65  ***************************************************************************/
68 {
69  // Initialise members
70  init_members();
71 
72  // Return
73  return;
74 }
75 
76 
77 /***********************************************************************//**
78  * @brief XML constructor
79  *
80  * @param[in] xml XML element.
81  *
82  * Constructs radial DMBurkert profile model by extracting information from
83  * an XML element. See the read() method for more information about the
84  * expected structure of the XML element.
85  ***************************************************************************/
88 {
89  // Initialise members
90  init_members();
91 
92  // Read information from XML element
93  read(xml);
94 
95  // Return
96  return;
97 }
98 
99 
100 /***********************************************************************//**
101  * @brief Copy constructor
102  *
103  * @param[in] model Radial DMBurkert profile model.
104  *
105  * Copies radial DMBurkert profile model from another radial profile model.
106  ***************************************************************************/
109 {
110  // Initialise members
111  init_members();
112 
113  // Copy members
114  copy_members(model);
115 
116  // Return
117  return;
118 }
119 
120 
121 /***********************************************************************//**
122  * @brief Destructor
123  *
124  * Destructs radial DMBurkert profile model.
125  ***************************************************************************/
127 {
128  // Free members
129  free_members();
130 
131  // Return
132  return;
133 }
134 
135 
136 /*==========================================================================
137  = =
138  = Operators =
139  = =
140  ==========================================================================*/
141 
142 /***********************************************************************//**
143  * @brief Assignment operator
144  *
145  * @param[in] model Radial DMBurkert profile model.
146  * @return Radial DMBurkert profile model.
147  *
148  * Assigns radial DMBurkert profile model.
149  ***************************************************************************/
151 {
152  // Execute only if object is not identical
153  if (this != &model) {
154 
155  // Copy base class members
157 
158  // Free members
159  free_members();
160 
161  // Initialise members
162  init_members();
163 
164  // Copy members
165  copy_members(model);
166 
167  } // endif: object was not identical
168 
169  // Return
170  return *this;
171 }
172 
173 
174 /*==========================================================================
175  = =
176  = Public methods =
177  = =
178  ==========================================================================*/
179 
180 /***********************************************************************//**
181  * @brief Clear radial DMBurkert profile model
182  *
183  * Clears radial DMBurkert profile model.
184  ***************************************************************************/
186 {
187  // Free class members
188  free_members();
192 
193  // Initialise members
197  init_members();
198 
199  // Return
200  return;
201 }
202 
203 
204 /***********************************************************************//**
205  * @brief Clone radial DMBurkert profile model
206  *
207  * @return Pointer to deep copy of radial DMBurkert profile model.
208  *
209  * Returns a deep copy of the radial DMBurkert profile model.
210  ***************************************************************************/
212 {
213  // Clone radial disk model
214  return new GModelSpatialRadialProfileDMBurkert(*this);
215 }
216 
217 /***********************************************************************//**
218  * @brief Return minimum model radius (in radians)
219  *
220  * @return Minimum model radius (in radians).
221  ***************************************************************************/
223 {
224 
225  // update precomputation cache
226  update();
227 
228  // Return value
229  return m_theta_min.value();
230 }
231 
232 /***********************************************************************//**
233  * @brief Return maximum model radius (in radians)
234  *
235  * @return Maximum model radius (in radians).
236  ***************************************************************************/
238 {
239  // Update
240  update();
241 
242  // initialize value
243  double theta = 0.0;
244 
245  // If Earth is within the significant radius, then we must integrate
246  // the entire profile ...
248  theta = gammalib::pi;
249  }
250 
251  // ... otherwise, if the halo is far enough away (further than the
252  // significant radius) then we just need to deal with the angles within
253  // the sphere of the significant radius
254  else {
256  }
257 
258  // Always chose the lesser of mass_radius theta and theta_max
260  if (theta > theta_max) {
261  theta = theta_max;
262  }
263 
264  // Return value
265  return theta;
266 }
267 
268 
269 /***********************************************************************//**
270  * @brief Read model from XML element
271  *
272  * @param[in] xml XML element.
273  *
274  * Reads the DMBurkert radial profile model information from an XML element.
275  * The XML element shall have the format
276  *
277  * <spatialModel type="DMBurkertProfile">
278  * <parameter name="RA" scale=.. value=.. min=.. max=.. free=../>
279  * <parameter name="DEC" scale=.. value=.. min=.. max=.. free=../>
280  * <parameter name="ScaleRadius" scale=.. value=.. min=.. max=.. free=../>
281  * <parameter name="ScaleDensity" scale=.. value=.. min=.. max=.. free=../>
282  * <parameter name="HaloDistance" scale=.. value=.. min=.. max=.. free=../>
283  * <parameter name="ThetaMin" scale=.. value=.. min=.. max=.. free=../>
284  * <parameter name="ThetaMax" scale=.. value=.. min=.. max=.. free=../>
285  * <parameter name="CoreRadius" scale=.. value=.. min=.. max=.. free=../>
286  * </spatialModel>
287  *
288  ***************************************************************************/
290 {
291  // Read DMBurkert location
293 
294  const GXmlElement* par1 = gammalib::xml_get_par(G_READ, xml, "ScaleRadius");
295  m_scale_radius.read(*par1);
296 
297  const GXmlElement* par2 = gammalib::xml_get_par(G_READ, xml, "ScaleDensity");
298  m_scale_density.read(*par2);
299 
300  const GXmlElement* par3 = gammalib::xml_get_par(G_READ, xml, "HaloDistance");
301  m_halo_distance.read(*par3);
302 
303  const GXmlElement* par4 = gammalib::xml_get_par(G_READ, xml, "ThetaMin");
304  m_theta_min.read(*par4);
305 
306  const GXmlElement* par5 = gammalib::xml_get_par(G_READ, xml, "ThetaMax");
307  m_theta_max.read(*par5);
308 
309  const GXmlElement* par6 = gammalib::xml_get_par(G_READ, xml, "CoreRadius");
310  m_core_radius.read(*par6);
311 
312  // Return
313  return;
314 }
315 
316 
317 /***********************************************************************//**
318  * @brief Write model into XML element
319  *
320  * @param[in] xml XML element into which model information is written.
321  *
322  * Writes the DMBurkert radial profile model information into an XML element.
323  * The XML element will have the format
324  *
325  * <spatialModel type="DMBurkertProfile">
326  * <parameter name="RA" scale=.. value=.. min=.. max=.. free=../>
327  * <parameter name="DEC" scale=.. value=.. min=.. max=.. free=../>
328  * <parameter name="ScaleRadius" scale=.. value=.. min=.. max=.. free=../>
329  * <parameter name="ScaleDensity" scale=.. value=.. min=.. max=.. free=../>
330  * <parameter name="HaloDistance" scale=.. value=.. min=.. max=.. free=../>
331  * <parameter name="ThetaMin" scale=.. value=.. min=.. max=.. free=../>
332  * <parameter name="ThetaMax" scale=.. value=.. min=.. max=.. free=../>
333  * <parameter name="CoreRadius" scale=.. value=.. min=.. max=.. free=../>
334  * </spatialModel>
335  ***************************************************************************/
337 {
338  // Write DMBurkert location
340 
341  // Write Scale Radius parameter
342  GXmlElement* par1 = gammalib::xml_need_par(G_WRITE, xml, "ScaleRadius");
343  m_scale_radius.write(*par1);
344 
345  // Write Scale Radius parameter
346  GXmlElement* par2 = gammalib::xml_need_par(G_WRITE, xml, "ScaleDensity");
347  m_scale_density.write(*par2);
348 
349  // Write Halo Distance parameter
350  GXmlElement* par3 = gammalib::xml_need_par(G_WRITE, xml, "HaloDistance");
351  m_halo_distance.write(*par3);
352 
353  // Write Halo Distance parameter
354  GXmlElement* par4 = gammalib::xml_need_par(G_WRITE, xml, "ThetaMin");
355  m_theta_min.write(*par4);
356 
357  // Write Halo Distance parameter
358  GXmlElement* par5 = gammalib::xml_need_par(G_WRITE, xml, "ThetaMax");
359  m_theta_max.write(*par5);
360 
361  // Write Core Radius parameter
362  GXmlElement* par6 = gammalib::xml_need_par(G_WRITE, xml, "CoreRadius");
363  m_core_radius.write(*par6);
364 
365  // Return
366  return;
367 }
368 
369 
370 /***********************************************************************//**
371  * @brief Print information
372  *
373  * @param[in] chatter Chattiness.
374  * @return String containing model information.
375  ***************************************************************************/
376 std::string GModelSpatialRadialProfileDMBurkert::print(const GChatter& chatter) const
377 {
378  // Initialise result string
379  std::string result;
380 
381  // Continue only if chatter is not silent
382  if (chatter != SILENT) {
383 
384  // Append header
385  result.append("=== GModelSpatialRadialProfileDMBurkert ===");
386 
387  // Append parameters
388  result.append("\n"+gammalib::parformat("Number of parameters"));
389  result.append(gammalib::str(size()));
390  for (int i = 0; i < size(); ++i) {
391  result.append("\n"+m_pars[i]->print(chatter));
392  }
393 
394  } // endif: chatter was not silent
395 
396  // Return result
397  return result;
398 }
399 
400 
401 /*==========================================================================
402  = =
403  = Private methods =
404  = =
405  ==========================================================================*/
406 
407 /***********************************************************************//**
408  * @brief Initialise class members
409  ***************************************************************************/
411 {
412 
413  // Initialise scale radius
415  m_scale_radius.name("ScaleRadius");
416  m_scale_radius.unit("kpc");
417  m_scale_radius.value(21.5); // default to GC scale radius
418  m_scale_radius.min(1.0e-6); // arbitrarily chosen :/
420  m_scale_radius.scale(1.0);
422  m_scale_radius.has_grad(false); // Radial components never have gradients
423 
424  // Initialise scale density
426  m_scale_density.name("ScaleDensity");
427  m_scale_density.unit("GeV/cm^3");
428  m_scale_density.value(0.2); // GeV/cm3, default to GC scale density
429  m_scale_density.min(1.0e-6);
431  m_scale_density.scale(1.0);
433  m_scale_density.has_grad(false); // Radial components never have gradients
434 
435  // Initialise halo distance
437  m_halo_distance.name("HaloDistance");
438  m_halo_distance.unit("kpc");
439  m_halo_distance.value(7.94); // default to GC halo distance
440  m_halo_distance.min(1.0e-6); // arbitrarily chosen
442  m_halo_distance.scale(1.0);
444  m_halo_distance.has_grad(false); // Radial components never have gradients
445 
446  // Initialise theta max
447  m_theta_min.clear();
448  m_theta_min.name("ThetaMin");
449  m_theta_min.unit("degrees");
450  m_theta_min.value(1.0e-6);
451  m_theta_min.min(1.0e-10); // arbitrarily chosen
452  m_theta_min.fix(); // should always be fixed!
453  m_theta_min.scale(1.0);
454  m_theta_min.gradient(0.0);
455  m_theta_min.has_grad(false); // Radial components never have gradients
456 
457  // Initialise theta max
458  m_theta_max.clear();
459  m_theta_max.name("ThetaMax");
460  m_theta_max.unit("degrees");
461  m_theta_max.value(180.0); // can only go from halo center to opposite halo center
462  m_theta_max.min(1.0e-6); // arbitrarily chosen
463  m_theta_max.fix(); // should always be fixed!
464  m_theta_max.scale(1.0);
465  m_theta_max.gradient(0.0);
466  m_theta_max.has_grad(false); // Radial components never have gradients
467 
468  // Initialise core radius
470  m_core_radius.name("CoreRadius");
471  m_core_radius.unit("kpc");
472  m_core_radius.value(0.5); // example: galactic center core
473  m_core_radius.min(0.0);
474  m_core_radius.fix();
475  m_core_radius.scale(1.0);
476  m_core_radius.gradient(0.0);
477  m_core_radius.has_grad(false); // Radial components never have gradients
478 
479  // Set parameter pointer(s)
480  m_pars.push_back(&m_scale_radius);
481  m_pars.push_back(&m_halo_distance);
482  m_pars.push_back(&m_theta_max);
483  m_pars.push_back(&m_theta_min);
484  m_pars.push_back(&m_core_radius);
485 
486  // Initialize precomputation cache. Note that zero values flag
487  // uninitialised, as a zero radius is not meaningful
488  m_last_scale_radius = 0.0;
489  m_last_scale_density = 0.0;
490  m_mass_radius = 0.0;
492 
493  // Return
494  return;
495 }
496 
497 
498 /***********************************************************************//**
499  * @brief Copy class members
500  *
501  * @param[in] model Radial DMBurkert model.
502  *
503  * Copies class members from another radial profile model.
504  ***************************************************************************/
506 {
507  // Copy members. We do not have to push back the members on the parameter
508  // stack as this should have been done by init_members() that was called
509  // before. Otherwise we would have sigma twice on the stack.
513  m_theta_min = model.m_theta_min;
514  m_theta_max = model.m_theta_max;
516 
517  // copy cache values
522 
523  // Return
524  return;
525 }
526 
527 
528 /***********************************************************************//**
529  * @brief Delete class members
530  ***************************************************************************/
532 {
533  // Return
534  return;
535 }
536 
537 
538 /***********************************************************************//**
539  * @brief Radial profile
540  *
541  * @param[in] theta Angular distance from DMBurkert centre (radians).
542  * @return Profile value.
543  ***************************************************************************/
544 double GModelSpatialRadialProfileDMBurkert::profile_value(const double& theta) const
545 {
546  // Update precompuation cache
547  update();
548 
549  // Initialize integral value
550  double value = 0.0;
551 
552  // Set up integration limits
553  double los_min = m_halo_distance.value() - m_mass_radius;
554  double los_max = m_halo_distance.value() + m_mass_radius;
555 
556  // Handle case where observer is within halo mass radius
557  if (los_min < 0.0) {
558  los_min = 0.0;
559  }
560 
561  // Set up integral
564  theta,
565  m_core_radius.value());
566  GIntegral integral(&integrand);
567 
568  // Compute value
569  value = integral.romberg(los_min, los_max) * m_scale_density_squared;
570 
571  // Return value
572  return value;
573 }
574 
575 
576 /***********************************************************************//**
577  * @brief Kernel for halo density profile squared
578  *
579  * @param[in] los Distance from observer to point in space (meters).
580  * @return Halo density.
581  *
582  * Computes the value of an einasto halo density profile squared,
583  * at distance l from observer, at angle \f[\theta\f] from the halo center:
584  *
585  * \f[
586  * f(\theta, l) = \frac{r_{scale}^3}{ \left( r + r_{scale} \right)
587  * \left( r^2 + r_{scale}^2 \right)}
588  * \f]
589  *
590  * where
591  *
592  * \f[
593  * r = \sqrt{l^2+d^2-2ldCos(\theta)}
594  * \f]
595  *
596  * This profile is detailed in:
597  * Burkert, 1995
598  * "The Structure Of Dark Matter Halos In Dwarf Galaxies"
599  * The Astrophysical Journal, 447: L25–L28
600  * http://iopscience.iop.org/article/10.1086/309560/pdf
601  * Equation 2
602  *
603  ***************************************************************************/
605 {
606  // Calculate the scale distance r, the ( distance from integration point
607  // to the halo center ) divided by ( the halo scale radius )
608 
609  // first calculate the distance of the integration point from the halo
610  // center via the law of cosines
611  double r = los * los;
613  r -= 2.0 * los * m_halo_distance * std::cos(m_theta);
614  r = std::sqrt(r);
615 
616  // If we have a core radius specified, all halo values inside this core
617  // radius should be the same as at the core radius itself.
618  if (r < m_core_radius) {
619  r = m_core_radius;
620  }
621 
622  // Now that we've found out how far we are from the halo center,
623  // feed this radius to the burkert formula
624  double bot = (m_scale_radius + r);
625  bot *= (m_scale_radius*m_scale_radius) + (r*r);
627  f /= bot;
628 
629  // Squared, for annihilating DM, would just be f if it was decaying dm
630  f = f * f;
631 
632  // Return function value
633  return f;
634 }
635 
636 
637 /***********************************************************************//**
638  * @brief Update precomputation cache
639  *
640  * Computes the mass_radius calculation, determining the radius around
641  * the halo that contains 99.99% of the mass. For an Burket halo profile,
642  * this is just 80.0 * scale_radius.
643  ***************************************************************************/
645 {
646  // Update if scale radius has changed
649 
650  // Store last values
653 
654  // perform precomputations
655  // set the mass radius to 80*scale_radius, meaning
656  // 99.99% of the mass is contained within the mass radius,
657  // and integration only needs to worry about whats inside this radius.
658  m_mass_radius = 80.0 * scale_radius();
660 
661  }
662 
663  // Return
664  return;
665 }
666 
667 
668 /***********************************************************************//**
669  * @brief Calculate Halo Mass Density
670  *
671  * @param[in] radius Distance from halo centre (kpc).
672  * @return Halo mass density.
673  *
674  * Calculates the halo's mass density at a given radial distance from the
675  * halo centre.
676  ***************************************************************************/
677 double GModelSpatialRadialProfileDMBurkert::mass_density(const double& radius) const
678 {
679  // Initialize halo kernel with stored values. We use theta=0 to effectivly
680  // sample the halo radially
681  halo_kernel_los halo_shape(m_scale_radius.value(),
683  0.0,
684  m_core_radius.value());
685 
686  // eval produces a unitless density^2, so we must take its square root
687  double density = std::sqrt(halo_shape.eval(m_halo_distance.value() + radius));
688 
689  // Multiply in the missing scale density
690  density *= m_scale_density.value();
691 
692  // Return halo mass density
693  return density;
694 }
695 
696 
697 /***********************************************************************//**
698  * @brief Calculate J-factor
699  *
700  * @param[in] angle Angle from halo center (radians).
701  * @return J-factor.
702  *
703  * Calculates the halo's J-factor at an angle from the halo center.
704  ***************************************************************************/
705 double GModelSpatialRadialProfileDMBurkert::jfactor(const double& angle) const
706 {
707  // Integration settings
708  double minradian = 0.0;
709  int npoints = 200;
710 
711  // Initialize other variables
712  double jfactor = 0.0 ;
713  double dr = (angle - minradian) / npoints ;
714  double r = 0.0;
715 
716  // Loop over different radii in the profile
717  for (int i = 0; i < npoints; ++i) {
718 
719  // integration: Int[ profile(r) * r * dr ]
720  r = minradian + (i * dr);
721  jfactor += profile_value(r) * r * dr;
722 
723  }
724 
725  // J-Factor = 2 * pi * Int[ profile(r) * r * dr , {r,minradian,angle} ]
726  jfactor *= gammalib::twopi;
727 
728  // Return J-factor
729  return jfactor;
730 }
virtual void write(GXmlElement &xml) const
Write model into XML element.
const std::string & name(void) const
Return parameter name.
double mass_density(const double &radius) const
Calculate Halo Mass Density.
XML element node class interface definition.
const double pi
Definition: GMath.hpp:35
double gradient(void) const
Return parameter gradient.
int size(void) const
Return number of parameters.
void write(GXmlElement &xml) const
Set or update parameter attributes in XML element.
Definition: GModelPar.cpp:353
GVector cos(const GVector &vector)
Computes cosine of vector elements.
Definition: GVector.cpp:1100
XML element node class.
Definition: GXmlElement.hpp:47
const GModelSpatialRadialDisk g_radial_disk_seed
double scale_radius(void) const
Return scale radius.
Gammalib tools definition.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print information.
virtual GModelSpatialRadialProfileDMBurkert & operator=(const GModelSpatialRadialProfileDMBurkert &model)
Assignment operator.
GIntegral class interface definition.
Definition: GIntegral.hpp:45
Interface definition for the spatial model registry class.
double min(void) const
Return parameter minimum boundary.
GModelPar m_scale_density
Scale density of halo profile.
void init_members(void)
Initialise class members.
void init_members(void)
Initialise class members.
const double & scale(void) const
Return parameter scale.
virtual double theta_max(void) const
Return maximum model radius (in radians)
const double deg2rad
Definition: GMath.hpp:43
GVector sqrt(const GVector &vector)
Computes square root of vector elements.
Definition: GVector.cpp:1268
bool has_grad(void) const
Signal if parameter gradient is computed analytically.
void free_members(void)
Delete class members.
void free_members(void)
Delete class members.
void free(void)
Free a parameter.
std::vector< GModelPar * > m_pars
Parameter pointers.
void fix(void)
Fix a parameter.
GXmlElement * xml_need_par(const std::string &origin, GXmlElement &xml, const std::string &name)
Return pointer to parameter with given name in XML element.
Definition: GTools.cpp:1513
virtual void read(const GXmlElement &xml)
Read model from XML element.
void clear(void)
Clear parameter.
Spatial model registry class definition.
GChatter
Definition: GTypemaps.hpp:33
virtual GModelSpatialRadialProfileDMBurkert * clone(void) const
Clone radial DMBurkert profile model.
GModelPar m_halo_distance
Distance from Earth to halo center.
double eval(const double &los)
Kernel for halo density profile squared.
double jfactor(const double &angle) const
Calculate J-factor.
virtual void write(GXmlElement &xml) const
Write model into XML element.
void update(void) const
Update precomputation cache.
void free_members(void)
Delete class members.
virtual double theta_min(void) const
Return minimum model radius (in radians)
Dark Matter Burkert profile model class interface definition.
void read(const GXmlElement &xml)
Extract parameter attributes from XML element.
Definition: GModelPar.cpp:229
double value(void) const
Return parameter value.
virtual GModelSpatialRadialProfile & operator=(const GModelSpatialRadialProfile &model)
Assignment operator.
const std::string & unit(void) const
Return parameter unit.
double scale_density(void) const
Return scale density.
Exception handler interface definition.
virtual void clear(void)
Clear radial DMBurkert profile model.
void init_members(void)
Initialise class members.
const double twopi
Definition: GMath.hpp:36
virtual double profile_value(const double &theta) const
Radial profile.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
Definition: GTools.cpp:1022
GModelPar m_scale_radius
Scale radius of halo profile.
GVector atan(const GVector &vector)
Computes arctan of vector elements.
Definition: GVector.cpp:1058
const GXmlElement * xml_get_par(const std::string &origin, const GXmlElement &xml, const std::string &name)
Return pointer to parameter with given name in XML element.
Definition: GTools.cpp:1562
void copy_members(const GModelSpatialRadialProfileDMBurkert &model)
Copy class members.
virtual void read(const GXmlElement &xml)
Read model from XML element.
Mathematical function definitions.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.
Definition: GTools.cpp:413