32 #ifndef CORE_BASIS_TRICUBICHMT_H
33 #define CORE_BASIS_TRICUBICHMT_H 1
73 template<
class VECTOR>
74 inline void get_weights(
const VECTOR& coords,
double *w)
const
77 template<
class VECTOR>
82 template <
class ElemData,
class VECTOR>
88 return (T)(w[0] * cd.node0()
89 +w[1] * this->
derivs_[cd.node0_index()][0]
90 +w[2] * this->
derivs_[cd.node0_index()][1]
91 +w[3] * this->
derivs_[cd.node0_index()][2]
93 +w[5] * this->
derivs_[cd.node1_index()][0]
94 +w[6] * this->
derivs_[cd.node1_index()][1]
95 +w[7] * this->
derivs_[cd.node1_index()][2]
97 +w[9] * this->
derivs_[cd.node2_index()][0]
98 +w[10] * this->
derivs_[cd.node2_index()][1]
99 +w[11] * this->
derivs_[cd.node2_index()][2]);
103 template <
class ElemData,
class VECTOR1,
class VECTOR2>
104 void derivate(
const VECTOR1 &coords,
const ElemData &cd,
105 VECTOR2 &derivs)
const
111 derivs[0]=
static_cast<typename VECTOR2::value_type
>(w[0] * cd.node0()
112 +w[1] * this->
derivs_[cd.node0_index()][0]
113 +w[2] * this->
derivs_[cd.node0_index()][1]
114 +w[3] * this->
derivs_[cd.node0_index()][2]
116 +w[5] * this->
derivs_[cd.node1_index()][0]
117 +w[6] * this->
derivs_[cd.node1_index()][1]
118 +w[7] * this->
derivs_[cd.node1_index()][2]
120 +w[9] * this->
derivs_[cd.node2_index()][0]
121 +w[10] * this->
derivs_[cd.node2_index()][1]
122 +w[11] * this->
derivs_[cd.node2_index()][2]);
124 derivs[1]=
static_cast<typename VECTOR2::value_type
>(w[12] * cd.node0()
125 +w[13] * this->
derivs_[cd.node0_index()][0]
126 +w[14] * this->
derivs_[cd.node0_index()][1]
127 +w[15] * this->
derivs_[cd.node0_index()][2]
129 +w[17] * this->
derivs_[cd.node1_index()][0]
130 +w[18] * this->
derivs_[cd.node1_index()][1]
131 +w[19] * this->
derivs_[cd.node1_index()][2]
133 +w[21] * this->
derivs_[cd.node2_index()][0]
134 +w[22] * this->
derivs_[cd.node2_index()][1]
135 +w[23] * this->
derivs_[cd.node2_index()][2]);
139 template <
class ElemData,
class VECTOR>
141 const ElemData &cd)
const
144 return CL.
get_coords(
this, coords, value, cd);
148 template <
class ElemData>
151 return get_arc2d_length<CrvGaussian2<double> >(
this, edge, cd);
155 template <
class ElemData>
156 double get_area(
const unsigned face,
const ElemData &cd)
const
158 return get_area2<TriGaussian3<double> >(
this, face, cd);
162 template <
class ElemData>
169 static const std::string
type_name(
int n = -1);
183 ASSERT((n >= -1) && n <= 1);
191 static const std::string nm(
"TriCubicHmt");
209 std::string(__FILE__),
223 Pio(stream, this->derivs_);
void get_cubic_derivate_weights(const VECTOR &coords, double *w) const
get derivative weight factors at parametric coordinate
Definition: TriElementWeights.h:116
TriCubicHmt()
Definition: TriCubicHmt.h:68
bool get_coords(const ElemBasis *pEB, VECTOR &coords, const T &value, const ElemData &cd) const
find value in interpolation for given value
Definition: TriLinearLgn.h:194
Definition: Persistent.h:89
Class for creating geometrical approximations of Tri meshes.
Definition: TriLinearLgn.h:109
Definition: TriCubicHmt.h:58
T interpolate(const VECTOR &coords, const ElemData &cd) const
get value at parametric coordinate
Definition: TriCubicHmt.h:83
Definition: TypeDescription.h:45
std::vector< const TypeDescription * > td_vec
Definition: TypeDescription.h:56
virtual void io(Piostream &str)
Definition: TriCubicHmt.h:219
#define ASSERT(condition)
Definition: Assert.h:110
virtual int begin_class(const std::string &name, int current_version)
Definition: Persistent.cc:143
double get_area(const unsigned face, const ElemData &cd) const
get area
Definition: TriCubicHmt.h:156
TriCubicHmtUnitElement()
Definition: TriCubicHmt.h:48
const string find_type_name(float *)
Definition: TypeName.cc:63
Class for describing unit geometry of TriCubicHmt.
Definition: TriCubicHmt.h:45
const int TRICUBICHMT_VERSION
Definition: TriCubicHmt.h:216
virtual ~TriCubicHmtUnitElement()
Definition: TriCubicHmt.h:49
const char * name[]
Definition: BoostGraphExampleTests.cc:87
double get_volume(const ElemData &) const
get volume
Definition: TriCubicHmt.h:163
void get_derivate_weights(const VECTOR &coords, double *w) const
Definition: TriCubicHmt.h:78
void get_cubic_weights(const VECTOR &coords, double *w) const
Definition: TriElementWeights.h:95
static const std::string type_name(int n=-1)
Definition: TriCubicHmt.h:181
void derivate(const VECTOR1 &coords, const ElemData &cd, VECTOR2 &derivs) const
get first derivative at parametric coordinate
Definition: TriCubicHmt.h:104
static const std::string make_template_id(const std::string &templateName, const std::string &templateParam)
Definition: TypeName.h:62
virtual ~TriCubicHmt()
Definition: TriCubicHmt.h:69
static int polynomial_order()
Definition: TriCubicHmt.h:71
Class for describing unit geometry of TriLinearLgn.
Definition: TriLinearLgn.h:46
Definition: TriElementWeights.h:36
void Pio(Piostream &stream, Array1< T > &array)
Definition: Array1.h:65
std::vector< std::vector< T > > derivs_
Definition: Basis.h:160
virtual void end_class()
Definition: Persistent.cc:178
double get_arc_length(const unsigned edge, const ElemData &cd) const
get arc length for edge
Definition: TriCubicHmt.h:149
void get_weights(const VECTOR &coords, double *w) const
Definition: TriCubicHmt.h:74
Definition: TriSamplingSchemes.h:43
int n
Definition: eab.py:9
Class with weights and coordinates for 3rd order Gaussian integration.
Definition: TriLinearLgn.h:292
T value_type
Definition: TriCubicHmt.h:66
bool get_coords(VECTOR &coords, const T &value, const ElemData &cd) const
get the parametric coordinate for value within the element.
Definition: TriCubicHmt.h:140
Definition: TriLinearLgn.h:185
Definition: TypeDescription.h:49
static int dofs()
Definition: TriCubicHmt.h:51
const TypeDescription * get_type_description(Core::Basis::ConstantBasis< T > *)
Definition: Constant.h:209