32 #ifndef CORE_BASIS_PRISMCUBICHMT_H
33 #define CORE_BASIS_PRISMCUBICHMT_H 1
71 template<
class VECTOR>
72 inline void get_weights(
const VECTOR& coords,
double *w)
const
75 template<
class VECTOR>
80 template <
class ElemData,
class VECTOR>
88 w[1] * this->
derivs_[cd.node0_index()][0] +
89 w[2] * this->
derivs_[cd.node0_index()][1] +
90 w[3] * this->
derivs_[cd.node0_index()][2] +
92 w[5] * this->
derivs_[cd.node1_index()][0] +
93 w[6] * this->
derivs_[cd.node1_index()][1] +
94 w[7] * this->
derivs_[cd.node1_index()][2] +
96 w[9] * this->
derivs_[cd.node2_index()][0] +
97 w[10] * this->
derivs_[cd.node2_index()][1] +
98 w[11] * this->
derivs_[cd.node2_index()][2] +
100 w[13] * this->
derivs_[cd.node3_index()][0] +
101 w[14] * this->
derivs_[cd.node3_index()][1] +
102 w[15] * this->
derivs_[cd.node3_index()][2] +
104 w[17] * this->
derivs_[cd.node4_index()][0] +
105 w[18] * this->
derivs_[cd.node4_index()][1] +
106 w[19] * this->
derivs_[cd.node4_index()][2] +
108 w[21] * this->
derivs_[cd.node5_index()][0] +
109 w[22] * this->
derivs_[cd.node5_index()][1] +
110 w[23] * this->
derivs_[cd.node5_index()][2]);
114 template <
class ElemData,
class VECTOR1,
class VECTOR2>
115 void derivate(
const VECTOR1 &coords,
const ElemData &cd,
116 VECTOR2 &derivs)
const
123 derivs[0]=
static_cast<typename VECTOR2::value_type
>(
125 w[1] * this->
derivs_[cd.node0_index()][0] +
126 w[2] * this->
derivs_[cd.node0_index()][1] +
127 w[3] * this->
derivs_[cd.node0_index()][2] +
129 w[5] * this->
derivs_[cd.node1_index()][0] +
130 w[6] * this->
derivs_[cd.node1_index()][1] +
131 w[7] * this->
derivs_[cd.node1_index()][2] +
133 w[9] * this->
derivs_[cd.node2_index()][0] +
134 w[10] * this->
derivs_[cd.node2_index()][1] +
135 w[11] * this->
derivs_[cd.node2_index()][2] +
137 w[13] * this->
derivs_[cd.node3_index()][0] +
138 w[14] * this->
derivs_[cd.node3_index()][1] +
139 w[15] * this->
derivs_[cd.node3_index()][2] +
141 w[17] * this->
derivs_[cd.node4_index()][0] +
142 w[18] * this->
derivs_[cd.node4_index()][1] +
143 w[19] * this->
derivs_[cd.node4_index()][2] +
145 w[21] * this->
derivs_[cd.node5_index()][0] +
146 w[22] * this->
derivs_[cd.node5_index()][1] +
147 w[23] * this->
derivs_[cd.node5_index()][2]);
149 derivs[1]=
static_cast<typename VECTOR2::value_type
>(
151 w[25] * this->
derivs_[cd.node0_index()][0] +
152 w[26] * this->
derivs_[cd.node0_index()][1] +
153 w[27] * this->
derivs_[cd.node0_index()][2] +
155 w[29] * this->
derivs_[cd.node1_index()][0] +
156 w[30] * this->
derivs_[cd.node1_index()][1] +
157 w[31] * this->
derivs_[cd.node1_index()][2] +
159 w[33] * this->
derivs_[cd.node2_index()][0] +
160 w[34] * this->
derivs_[cd.node2_index()][1] +
161 w[35] * this->
derivs_[cd.node2_index()][2] +
163 w[37] * this->
derivs_[cd.node3_index()][0] +
164 w[38] * this->
derivs_[cd.node3_index()][1] +
165 w[39] * this->
derivs_[cd.node3_index()][2] +
167 w[41] * this->
derivs_[cd.node4_index()][0] +
168 w[42] * this->
derivs_[cd.node4_index()][1] +
169 w[43] * this->
derivs_[cd.node4_index()][2] +
171 w[45] * this->
derivs_[cd.node5_index()][0] +
172 w[46] * this->
derivs_[cd.node5_index()][1] +
173 w[47] * this->
derivs_[cd.node5_index()][2]);
175 derivs[2]=
static_cast<typename VECTOR2::value_type
>(
177 w[49] * this->
derivs_[cd.node0_index()][0] +
178 w[50] * this->
derivs_[cd.node0_index()][1] +
179 w[51] * this->
derivs_[cd.node0_index()][2] +
181 w[53] * this->
derivs_[cd.node1_index()][0] +
182 w[54] * this->
derivs_[cd.node1_index()][1] +
183 w[55] * this->
derivs_[cd.node1_index()][2] +
185 w[57] * this->
derivs_[cd.node2_index()][0] +
186 w[58] * this->
derivs_[cd.node2_index()][1] +
187 w[59] * this->
derivs_[cd.node2_index()][2] +
189 w[61] * this->
derivs_[cd.node3_index()][0] +
190 w[62] * this->
derivs_[cd.node3_index()][1] +
191 w[63] * this->
derivs_[cd.node3_index()][2] +
193 w[65] * this->
derivs_[cd.node4_index()][0] +
194 w[66] * this->
derivs_[cd.node4_index()][1] +
195 w[67] * this->
derivs_[cd.node4_index()][2] +
197 w[69] * this->
derivs_[cd.node5_index()][0] +
198 w[70] * this->
derivs_[cd.node5_index()][1] +
199 w[71] * this->
derivs_[cd.node5_index()][2]);
204 template <
class ElemData,
class VECTOR>
206 const ElemData &cd)
const
210 return CL.
get_coords(
this, coords, value, cd);
214 template <
class ElemData>
217 return get_arc3d_length<CrvGaussian2<double> >(
this, edge, cd);
221 template <
class ElemData>
222 double get_area(
const unsigned face,
const ElemData &cd)
const
225 return get_area3<TriGaussian3<double> >(
this, face, cd);
227 return get_area3<QuadGaussian3<double> >(
this, face, cd);
231 template <
class ElemData>
237 static const std::string
type_name(
int n = -1);
249 ASSERT((n >= -1) && n <= 1);
257 static const std::string nm(
"PrismCubicHmt");
277 std::string(__FILE__),
291 Pio(stream, this->derivs_);
static int dofs()
return degrees of freedom
Definition: PrismCubicHmt.h:48
Class for creating geometrical approximations of Prism meshes.
Definition: PrismLinearLgn.h:114
void derivate(const VECTOR1 &coords, const ElemData &cd, VECTOR2 &derivs) const
get first derivative at parametric coordinate
Definition: PrismCubicHmt.h:115
virtual ~PrismCubicHmt()
Definition: PrismCubicHmt.h:67
const int PRISMCUBICHMT_VERSION
Definition: PrismCubicHmt.h:284
Class for describing unit geometry of PrismLinearLgn.
Definition: PrismLinearLgn.h:50
T interpolate(const VECTOR &coords, const ElemData &cd) const
get value at parametric coordinate
Definition: PrismCubicHmt.h:81
Definition: Persistent.h:89
Definition: PrismLinearLgn.h:217
PrismCubicHmtUnitElement()
Definition: PrismCubicHmt.h:44
bool get_coords(const ElemBasis *pEB, VECTOR &coords, const T &value, const ElemData &cd) const
Definition: PrismLinearLgn.h:225
Class with weights and coordinates for 2nd order Gaussian integration.
Definition: PrismLinearLgn.h:317
Definition: TypeDescription.h:45
std::vector< const TypeDescription * > td_vec
Definition: TypeDescription.h:56
T value_type
Definition: PrismCubicHmt.h:64
virtual ~PrismCubicHmtUnitElement()
Definition: PrismCubicHmt.h:45
void get_cubic_weights(const VECTOR &coords, double *w) const
Definition: PrismElementWeights.h:152
#define ASSERT(condition)
Definition: Assert.h:110
virtual int begin_class(const std::string &name, int current_version)
Definition: Persistent.cc:143
const string find_type_name(float *)
Definition: TypeName.cc:63
static SCISHARE int unit_faces[5][4]
References to vertices of unit face.
Definition: PrismLinearLgn.h:57
void get_weights(const VECTOR &coords, double *w) const
Definition: PrismCubicHmt.h:72
const char * name[]
Definition: BoostGraphExampleTests.cc:87
Definition: PrismCubicHmt.h:56
PrismCubicHmt()
Definition: PrismCubicHmt.h:66
void get_derivate_weights(const VECTOR &coords, double *w) const
Definition: PrismCubicHmt.h:76
double get_area(const unsigned face, const ElemData &cd) const
get area
Definition: PrismCubicHmt.h:222
Definition: PrismElementWeights.h:36
Definition: PrismSamplingSchemes.h:42
static const std::string make_template_id(const std::string &templateName, const std::string &templateParam)
Definition: TypeName.h:62
double get_arc_length(const unsigned edge, const ElemData &cd) const
get arc length for edge
Definition: PrismCubicHmt.h:215
double get_volume(const ElemData &cd) const
get volume
Definition: PrismCubicHmt.h:232
void Pio(Piostream &stream, Array1< T > &array)
Definition: Array1.h:65
std::vector< std::vector< T > > derivs_
Definition: Basis.h:160
Class for describing unit geometry of PrismCubicHmt.
Definition: PrismCubicHmt.h:42
virtual void end_class()
Definition: Persistent.cc:178
void get_cubic_derivate_weights(const VECTOR &coords, double *w) const
get derivative weight factors at parametric coordinate
Definition: PrismElementWeights.h:189
virtual void io(Piostream &str)
Definition: PrismCubicHmt.h:287
static const std::string type_name(int n=-1)
Definition: PrismCubicHmt.h:247
int n
Definition: eab.py:9
static int polynomial_order()
Definition: PrismCubicHmt.h:69
double get_volume3(const ElemBasis *pEB, const ElemData &cd)
Definition: Locate.h:179
bool get_coords(VECTOR &coords, const T &value, const ElemData &cd) const
Definition: PrismCubicHmt.h:205
Definition: TypeDescription.h:49
const TypeDescription * get_type_description(Core::Basis::ConstantBasis< T > *)
Definition: Constant.h:209