CG  Version 25
GridMaterialProperties.h
Go to the documentation of this file.
1 #ifndef GRID_MATERIAL_PROPERTIES
2 #define GRID_MATERIAL_PROPERTIES
3 
4 // =======================================================================================
5 // This class holds variable material properties for a component grid.
6 //
7 // The material properties such as lambda, mu, Cp, k, mu etc. can be
8 // stored in different formats:
9 // (1) constantMaterialProperties: the material properties are constant on the grid
10 // (2) piecewiseConstantMaterialProperties : the material properties are constant
11 // over regions, which means they can be stored in a more compact fashion.
12 // (3) variableMaterialProperties : the material properties vary from grid
13 // point to grid point.
14 //
15 // Notes:
16 // We could have multiple instances of this class if we wish to store some material
17 // parameters as piecewise-constant and some as variable.
18 // ======================================================================================
19 
20 #include "Overture.h"
21 #define KK_DEBUG
22 #include "DBase.hh"
23 using namespace DBase;
24 
25 
27 {
28 
29 public:
30 
32 {
33  constantMaterialProperties=0,
36 };
37 
38 
41 
42 // Return the material format for this grid.
43 MaterialFormatEnum getMaterialFormat() const;
44 
45 // Set the material format
46 void
47 setMaterialFormat(const MaterialFormatEnum materialFormat );
48 
49 // Set the number of properties that we will store in the material property arrays.
50 void
51 setNumberOfMaterialProperties( const int numberOfMaterialProperties );
52 
53 // Return the number of material properties that we will store in the material property arrays.
54 int
55 getNumberOfMaterialProperties() const;
56 
57 // Set the name of material property "m".
58 void
59 setMaterialName( const int m, const aString & materialName );
60 
61 // Get the name of material property "m".
62 const aString &
63 getMaterialName( const int m ) const;
64 
65 // Return the index array, materialIndex(i1,i2,i3) that holds the material index at a grid point (i1,i2,i3)
66 IntegerArray &
67 getMaterialIndexArray();
68 
69 // Return the array that holds the different material values by index (for piecewise constant materials)
70 RealArray &
71 getMaterialValuesArray();
72 
73 RealArray &
74 getVariableMaterialValuesArray();
75 
76 
77 protected:
78 
79 // This database contains the parameters and data for material properties.
80 DataBase dbase;
81 
82 
83 };
84 
85 
86 
87 #endif
88