BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_MaterialFactory.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California,
4 * through Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef CL_MATERIALFACTORY_HPP
13#define CL_MATERIALFACTORY_HPP
14
15#include "cl_Material.hpp"
16#include "cl_BhCurve.hpp"
17#include "cl_JcFunction.hpp"
18#include "cl_Input_Section.hpp"
19
20namespace belfem
21{
22//------------------------------------------------------------------------------
23
74 {
75
76 Map < string ,Material * > mMaterialsMap ; //the material map, with labels as keys
77//------------------------------------------------------------------------------
78 public:
79//------------------------------------------------------------------------------
80
84 MaterialFactory() = default;
85
89 MaterialFactory( const input::Section * aSection );
90
94 ~MaterialFactory() = default;
95
96//------------------------------------------------------------------------------
97
128 Material *
129 create_material( const string & aLabel,
130 const real aRRR = BELFEM_QUIET_NAN,
131 const bool aBuildTables = true );
132
133//------------------------------------------------------------------------------
134
135 void
136 print_material_list( std::ostream & aStream );
137
138//------------------------------------------------------------------------------
139
193 Material *
194 create_material( const string & aLibraryPath, const string & aLabel );
195
196//------------------------------------------------------------------------------
197
198 Map <string, Material *> &
199 materials();
200
201//------------------------------------------------------------------------------
202
233 create_bh_curve( const string & aPath, const string & aLabel );
234
235//------------------------------------------------------------------------------
236
274 create_jc_function( const real aJc0, const real aB, const real aBc, const real aK );
275
276//------------------------------------------------------------------------------
277
318 create_jc_function( const string & aPath, const string & aLabel );
319
320//------------------------------------------------------------------------------
321
344 void
346 const input::Section * aSection,
347 const string & aLabel,
348 const string & aShape,
349 const Cell< string > & aKeys,
350 const Cell< string > & aSections );
351
352//------------------------------------------------------------------------------
353 };
354
355 inline Map <string, Material *> &
357 {
358 return mMaterialsMap ;
359 }
360
361//------------------------------------------------------------------------------
362}
363#endif //CL_MATERIALFACTORY_HPP
Base class hierarchy for critical current density (Jc) and n-value functions.
void check_unused_input(const input::Section *aSection, const string &aLabel, const string &aShape, const Cell< string > &aKeys, const Cell< string > &aSections)
refuse any key or subsection the resolved material shape does not read
Definition cl_MaterialFactory.cpp:418
Map< string, Material * > & materials()
Definition cl_MaterialFactory.hpp:356
MaterialFactory()=default
Default constructor.
Material * create_material(const string &aLabel, const real aRRR=BELFEM_QUIET_NAN, const bool aBuildTables=true)
Create a material by label.
Definition cl_MaterialFactory.cpp:491
material::BhCurve * create_bh_curve(const string &aPath, const string &aLabel)
Create a B-H curve from file for ferromagnetic materials.
Definition cl_MaterialFactory.cpp:592
void print_material_list(std::ostream &aStream)
Definition cl_MaterialFactory.cpp:533
~MaterialFactory()=default
Default destructor.
material::JcFunction * create_jc_function(const real aJc0, const real aB, const real aBc, const real aK)
Create a Jc function using the modified Kim analytical model.
Definition cl_MaterialFactory.cpp:601
Base class for all materials in BELFEM.
Definition cl_Material.hpp:279
One hierarchical section of a configuration file.
Definition cl_Input_Section.hpp:34
B-H curve for ferromagnetic materials.
Definition cl_BhCurve.hpp:61
Base class for critical current density (Jc) and n-value functions.
Definition cl_JcFunction.hpp:138
USER GUIDES:
Definition cl_Capacitor.cpp:16
double real
Definition typedefs.hpp:36
#define BELFEM_QUIET_NAN
Definition typedefs.hpp:87