33 #ifndef __TRANSFER_BASE_H_
34 #define __TRANSFER_BASE_H_
56 typedef std::vector<const RFC_Pane_transfer*>
72 template <
class _SDF>
86 template <
class _SDF>
88 Real *tol,
int *iter,
int doa,
bool verb);
102 template <
class _SDF>
104 const int order,
bool verb);
109 template <
class _SDF>
135 template <
class _SDF>
177 template <
class _SDF>
195 template <
class _Data,
class _Po
ints,
class _Loads,
class Tag>
200 const _Points &pnts_s,
201 const _Points &pnts_t,
214 template <
class _Data>
216 const _Data &data_s,
const Vector_3 *grads_s,
219 for (
unsigned int k=0;
k<data_s.dimension(); ++
k) {
221 for (
unsigned int j=0;
j<e_s.size_of_nodes(); ++
j) {
222 load_prime[
k] += data_s[
j][
k] * grads_s[
j];
227 template <
class _Data>
229 const _Data &data_s,
const Vector_3 *grads_s,
232 for (
unsigned int k=0;
k<data_s.dimension(); ++
k) {
264 template <
class _Value>
268 const Generic_element::Nat_coor &nc,
270 { e.interpolate( values, nc, &v); }
272 template <
class _Value>
276 const Generic_element::Nat_coor &nc,
291 std::vector<const RFC_Pane_transfer*>
src_ps;
351 #endif // __TRANSFER_BASE_H_
void loadtransfer(const _SDF &vS, Nodal_data &vT, const Real alpha, const int order, bool verb)
Computes the load vector.
void dot2(const Nodal_data_const &x1, const Nodal_data_const &y1, const Nodal_data_const &x2, const Nodal_data_const &y2, Array_n prod) const
Real square(const Array_n_const &x) const
void compute_load_vector_wra(const RFC_Pane_transfer *p_src, RFC_Pane_transfer *p_dst, const _SDF &sDF, ENE &ene_src, ENE &ene_trg, int sfid_src, int sfid_trg, const Real alpha, Nodal_data &rhs, Nodal_data &diag, int doa, bool lump)
Computes the element-wise load vector, and also computes mass matrix if diag has a nonnegative ID...
void invert(Nodal_data &x)
void transfer_2n(const _SDF &sDF, Nodal_data &tDF, const Real alpha, Real *tol, int *iter, int doa, bool verb)
template function for transfering from nodes/faces to nodes.
RFC_Pane_transfer & pane(const int pid)
An adaptor for enumerating node IDs of an element.
const RFC_Pane_transfer * get_src_pane(int i)
void int int REAL REAL * y
Element_var_const make_field(const Nodal_data_const &d, const RFC_Pane_transfer *pn, const ENE &ene)
Construct a element-wise accessor from nodal data and pointers.
Element_var_const make_field(const Nodal_data_const &d, const RFC_Pane_transfer *pn, int)
bool is_nodal(const Array_n_const &) const
std::vector< RFC_Pane_transfer * > trg_ps
Adpator for element-wise data container.
void integrate_subface(const RFC_Pane_transfer *p_src, RFC_Pane_transfer *p_trg, const _SDF &sDF, ENE &ene_src, ENE &ene_trg, int sfid_src, int sfid_trg, const Real alpha, Facial_data &tDF, Facial_data &tBF, int doa)
bool is_nodal(const Element_var &) const
Value_const get_value(const RFC_Pane_transfer *p, int v) const
void saxpy(const Real &a, const Nodal_data_const &x, const Real &b, Nodal_data &y)
bool is_nodal(Tag_facial) const
void compute_load_prime(const Generic_element &e_s, const _Data &data_s, const Vector_3 *grads_s, Vector_3 *load_prime, Tag_nodal)
SURF::Generic_element_2 Generic_element
Transfer_base(RFC_Window_transfer *s, RFC_Window_transfer *t)
Field< Nodal_data, ENE > Element_var
std::vector< const RFC_Pane_transfer * > src_ps
int id() const
Get the local id of the element within the pane.
void panes(std::vector< Pane * > &ps)
Get a vector of local panes contained in the window.
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
void element_load_vector(const _Data &data_s, const Generic_element &e_s, const Generic_element &e_t, const _Points &pnts_s, const _Points &pnts_t, const Point_2 *ncs_s, const Point_2 *ncs_t, const Real alpha, const int sne, const Tag &tag, _Loads loads, _Loads diag, Real *emm, int doa, bool lump)
Computes the element-wise load vector, and also computes mass matrix if emm is not NULL...
void interpolate(const Generic_element &e, const Array_n_const value, const Generic_element::Nat_coor &nc, _Value &v)
#define RFC_END_NAME_SPACE
void scale(const Real &a, Nodal_data &x)
void int int int REAL REAL REAL * z
Element_var make_field(Nodal_data &d, RFC_Pane_transfer *pn, const ENE &ene)
void compute_load_prime(const Generic_element &e_s, const _Data &data_s, const Vector_3 *grads_s, Vector_3 *load_prime, Tag_facial)
Field< const Nodal_coor_const, ENE > Element_coor_const
RFC_Window_transfer & trg
RFC_Pane_transfer * _trg_pane
#define RFC_BEGIN_NAME_SPACE
Field< const Nodal_data_const, ENE > Element_var_const
#define RFC_assertion_msg
void transfer_2f(const _SDF &sDF, Facial_data &tDF, const Real alpha, int doa, bool verb)
template function for transfering from nodes/faces to faces.
int pcg(Nodal_data &x, Nodal_data &b, Nodal_data &p, Nodal_data &q, Nodal_data &r, Nodal_data &s, Nodal_data &z, Nodal_data &di, Real *tol, int *max_iter)
const Array_n_const make_field(const Facial_data_const &d, const RFC_Pane_transfer *pn, int i)
bool is_nodal(Tag_nodal) const
void interpolate(const Generic_element &e, const Element_var_const values, const Generic_element::Nat_coor &nc, _Value &v)
Element_node_enumerator ENE
std::vector< const RFC_Pane_transfer * >::const_iterator Pane_const_iterator
const RFC_Pane_transfer * _src_pane
bool is_nodal(const Element_var_const &) const
void init_load_vector(const _SDF &vS, const Real alpha, Nodal_data &ld, Nodal_data &diag, int doa, bool lump)
Initialize load vector and the diagonal of the mass matrix.
void integrate(const RFC_Window_transfer &win, const Nodal_data_const &sDF, Array_n &intergral, const int doa)
void copy_vec(const Nodal_data_const &x, Nodal_data &y)
std::vector< RFC_Pane_transfer * >::const_iterator Pane_iterator_const
void precondition_Jacobi(const Nodal_data_const &rhs, const Nodal_data_const &diag, Nodal_data &x)
Diagonal (Jacobi) preconditioner.
const Array_n_const make_field(const Facial_data_const &d, const RFC_Pane_transfer *pn, const ENE &ene)
Real dot(const Nodal_data_const &x, const Nodal_data_const &y) const
void interpolate_fe(const _SDF &sDF, Nodal_data &tDF, bool verb)
Perform finite-element interpolation (non-conservative), assuming source data has been replicated...
Some basic geometric data types.
RFC_Pane_transfer * get_trg_pane(int i)
RFC_Window_transfer & src
void multiply_mass_mat_and_x(const Nodal_data_const &x, Nodal_data &y)
void minmax(const RFC_Window_transfer &win, const Facial_data_const &sDF, Array_n &min_v, Array_n &max_v)
Real norm2(const Nodal_data_const &x) const
std::vector< RFC_Pane_transfer * >::iterator Pane_iterator