SIFEL/GEFEL/gadaptivity.cpp File Reference

#include <math.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "gadaptivity.h"
#include "gtopology.h"
#include "vector.h"
#include "matrix.h"
#include "basefun.h"
#include "mathem.h"

Go to the source code of this file.

Functions

long adjelem2edge (gtopology *gt, long node1, long node2, long eid)
long edge_position (gtopology *gt, long node1, long node2)
void fprintf_d_1D (FILE *stream, double *p, long p_n, char s[], long c)
void fprintf_ivector (FILE *stream, ivector &v, char s[], long c)
void fprintf_l_1D (FILE *stream, long *p, long p_n, char s[], long c)
void fprintf_l_2D (FILE *stream, long **p, long p_n, long p_m, char s[], long c)
void fprintf_matrix (FILE *stream, matrix &mx, char s[])
void fprintf_vector (FILE *stream, vector &v, char s[], long c)
void give_der_star (vector &bf, vector *rderfull, ivector &nodes, vector &der_star, long nn)
void ntnmtov (matrix &ntnm, vector &ntnv)
long opposite_node (gtopology *gt, long *nod, long eid)
void print_confile (const char *file, long nnod, long nel, double **auxxyzv, long **auxnod, long dim)
void print_contoures (gtopology *gt, char *file, double **midpoints, double *valel)
void print_valel (FILE *stream, gtopology *gt, const char *path, const char *file, char *caption, double *valel, char flag)
long surface_position (gtopology *gt, long node1, long node2, long node3)

Function Documentation

long adjelem2edge ( gtopology gt,
long  node1,
long  node2,
long  eid 
)

created 21.10.2003, Ladislav Svoboda, termit@cml.fsv.cvut.cz

Definition at line 1063 of file gadaptivity.cpp.

References gtopology::adjelnod, and gtopology::nadjelnod.

long edge_position ( gtopology gt,
long  node1,
long  node2 
)

Function detects count of elements containing linear edge defined by two nodes. Array gt->adjelnod has to be in ascending order. count == 1 => the edge is on the boundary of domain count == 2 => the edge is inside of domain

Parameters:
gt - gtopology of domain
node1,node2 - nodes of the edge
Returns:
- count of elements containing the edge

created 19.8.2002, Ladislav Svoboda, termit@cml.fsv.cvut.cz

Definition at line 1016 of file gadaptivity.cpp.

References gtopology::adjelnod, and gtopology::nadjelnod.

Referenced by least_square::insidenod_assembling(), and patch_averaging::insidenod_assembling().

void fprintf_d_1D ( FILE *  stream,
double *  p,
long  p_n,
char  s[],
long  c 
)

Definition at line 964 of file gadaptivity.cpp.

void fprintf_ivector ( FILE *  stream,
ivector v,
char  s[],
long  c 
)

Definition at line 952 of file gadaptivity.cpp.

References ivector::n.

void fprintf_l_1D ( FILE *  stream,
long *  p,
long  p_n,
char  s[],
long  c 
)

Definition at line 976 of file gadaptivity.cpp.

void fprintf_l_2D ( FILE *  stream,
long **  p,
long  p_n,
long  p_m,
char  s[],
long  c 
)

Definition at line 988 of file gadaptivity.cpp.

void fprintf_matrix ( FILE *  stream,
matrix mx,
char  s[] 
)

Definition at line 926 of file gadaptivity.cpp.

References matrix::m, and matrix::n.

void fprintf_vector ( FILE *  stream,
vector v,
char  s[],
long  c 
)

Definition at line 940 of file gadaptivity.cpp.

References vector::n.

Referenced by z2_smoothing::run().

void give_der_star ( vector bf,
vector rderfull,
ivector nodes,
vector der_star,
long  nn 
)

Function interpolates values (stress or strain = derivatives) from nodes of element into selected point on element.

Parameters:
bf - approximation functions on element
rderfull - 1Darray of values in nodes; dimmension is ncomp*gt->nn after this manner {(val[0]; ... ;val[gt->nn])[0] ; ... ; (val[0]; ... ;val[gt->nn])[ncomp]}
nodes - 1Darray of node numbers of element
nn - total number of nodes on domain
der_star - empty(returned) vector, dimension is ncomp

created 19.8.2002, Ladislav Svoboda, termit@cml.fsv.cvut.cz

Definition at line 736 of file gadaptivity.cpp.

References fillv(), vector::n, and ivector::n.

Referenced by trlineart::compute_error(), quadlineart::compute_error(), planeelemqt::compute_error(), planeelemqq::compute_error(), planeelemlt::compute_error(), planeelemlq::compute_error(), and lintet::compute_error().

void ntnmtov ( matrix ntnm,
vector ntnv 
)

Definition at line 751 of file gadaptivity.cpp.

References vector::n.

Referenced by z2_smoothing::compute_ainv().

long opposite_node ( gtopology gt,
long *  nod,
long  eid 
)
void print_confile ( const char *  file,
long  nnod,
long  nel,
double **  auxxyzv,
long **  auxnod,
long  dim 
)

Definition at line 884 of file gadaptivity.cpp.

Referenced by print_contoures().

void print_contoures ( gtopology gt,
char *  file,
double **  midpoints,
double *  valel 
)
void print_valel ( FILE *  stream,
gtopology gt,
const char *  path,
const char *  file,
char *  caption,
double *  valel,
char  flag 
)

created 19.8.2002, Ladislav Svoboda, termit@cml.fsv.cvut.cz

long common_numbers (long n1,long *p1,long n2,long *p2) { long c=0; register int i,j;

for (i=0;i<n1;i++) for (j=0;j<n2;j++) if (p1[i]==p2[j]){ c++; break; }

return c; } function compiles data(from array 'valel') for printing file.dx(.ex)

Parameters:
gt - gtopology
path - path
file - name of "dx"("ex") file; if file=NULL file is generated automatically from 'caption'
caption - name=caption of 'value'
valel - array of 'values' on elements, one element = one value, => dimension is gt->ne
flag - type of file - "d" = file.dx(for OpenDx) , "e" = file.ex(for Elixir)

created 20.11.2002, Ladislav Svoboda, termit@cml.fsv.cvut.cz

Definition at line 1133 of file gadaptivity.cpp.

References gtopology::adjacelem(), gtopology::adjelnod, gtopology::nadjelnod, gtopology::nn, and print_ex().

Referenced by adaptivity::compute_error(), and adaptivityt::run().

long surface_position ( gtopology gt,
long  node1,
long  node2,
long  node3 
)

Function detects count of elements containing linear surface defined by three nodes. Array gt->adjelnod has to be in ascending order. count == 1 => the surface is on the boundary of domain count == 2 => the surface is inside of domain

Parameters:
gt - gtopology of domain
node1,node2,node3 - nodes of the surface
Returns:
- count of elements containing the surface

created 19.8.2002, Ladislav Svoboda, termit@cml.fsv.cvut.cz

Definition at line 1043 of file gadaptivity.cpp.

References gtopology::adjelnod, and gtopology::nadjelnod.

Referenced by least_square::insidenod_assembling(), and patch_averaging::insidenod_assembling().


Generated by  doxygen 1.6.2