adaptivityt Class Reference

#include <adaptivityt.h>

List of all members.

Public Member Functions

 adaptivityt (void)
 CONSTRUCTOR.
int give_dim (void) const
const char * give_filename (void) const
const char * give_ni (void) const
int give_niwidth (void) const
int give_ntm (void) const
const double * give_r (void) const
const double * give_rdr (void) const
int give_step (void) const
void initialize (long s)
 intialize atributes
void printinit (FILE *out)
 print values to input file
void readinit (XFILE *in)
 read values from input file
long run (long of, bool ial)
 main function
void statedata_backup (void)
void statedata_restore (void)
void statedata_transfer (adaptivityt *Adat_old, gtopology *Gtt_old)
 ~adaptivityt (void)
 DESTRUCTOR.

Public Attributes

long answer
 istep
long istep
 time controler
timecontrtctrl
 derivatives of unknowns in --""-- ; --""--

Private Member Functions

void check_consistency (void) const
 check consistency
void compute_error (int mattid)
 compute error...
void compute_refsizel_lin (int mattid, const double *sizel, const double *ei2, double e2, double u2)
void prepare_ni (void)
void print_addat_vtk () const
 print additional data in vtk format
void set_step (long s)
 setup step and ni
void spr (int mattid)
 average derivatives to nodes

Private Attributes

double adapt_accuracy
 accuracy
double corr
 correction
long dim
 characteristics of the problem
vectorelem_error_pct
 percentual error at elements, dimension [ntm, ne]
double enlarg
 max enlargement, reduction
char * filename
bool interadaloop
 internal adaptive loop
long ncomp
 base functions order
long ne
 number of nodes
char * ni
int niwidth
 second suffix of enter file, it contains actual number of iteration
long nn
 number of refined components [stress or strain in mefel]
long ntm
 number of elements
long ord
 dimension
char * path
 decomposed input file name
long printflags
double * r
 *** BACK UP FOR INTERNAL LOOP ***
double * rdr
 unknowns in ALL nodes of global problem; values in array are stored (r[node_1][x] ... r[node_nn][x] , r[node_1][y] ... r[node_nn][y])
double reduct
vectorrefined_ders_in_nodes
vectorrefsizelabs
 absolute new/refined size of elements, dimension [ntm, ne]
vectorrefsizelrel
 relative new/refined size of elements [only for better visualization], dimension [ntm, ne]
long step
 step in adaptive loop
char * suffix
long tad
 number of transported matters

Detailed Description

Definition at line 9 of file adaptivityt.h.


Constructor & Destructor Documentation

adaptivityt ( void   ) 
~adaptivityt ( void   ) 

DESTRUCTOR.

Definition at line 33 of file adaptivityt.cpp.

References filename, ni, path, r, rdr, suffix, and tctrl.


Member Function Documentation

void check_consistency ( void   )  const [private]

check consistency

Function checks consistency of the problem.

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

Definition at line 233 of file adaptivityt.cpp.

References dim, transtop::give_degree(), transtop::give_dimension(), transtop::give_elem_type(), transtop::give_ndofn(), quadlineart::intordkm, trlineart::intordkm, Lqt, Ltt, quadlineart::ncomp, trlineart::ncomp, ne, nn, ntm, ord, print_err(), quadlint, trlint, and Tt.

Referenced by initialize().

void compute_error ( int  mattid  )  [private]

compute error...

Function computes error of FEM solution from difference between apriximate derivative fied(from FEM solution) and much more exact derivative fied(from array refined_ders_in_nodes). Considering 'printflags' printing of any files and information is performed.

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

percentual global error

Definition at line 318 of file adaptivityt.cpp.

References vector::a, adapt_accuracy, allocv(), answer, quadlineart::compute_error(), trlineart::compute_error(), compute_refsizel_lin(), elem_error_pct, transtop::give_elem_type(), Lqt, Ltt, Mesprt, ne, print_err(), quadlint, refined_ders_in_nodes, trlint, Tt, and volume.

Referenced by run().

void compute_refsizel_lin ( int  mattid,
const double *  sizel,
const double *  ei2,
double  e2,
double  u2 
) [private]

Function computes new=required characteristic size of elements.

Parameters:
sizel - array of old characteristic sizes of element
 created 3.6.2002, Ladislav Svoboda, termit@cml.fsv.cvut.cz

Definition at line 366 of file adaptivityt.cpp.

References adapt_accuracy, allocv(), corr, enlarg, ne, ord, reduct, refsizelabs, and refsizelrel.

Referenced by compute_error().

int give_dim ( void   )  const [inline]

Definition at line 96 of file adaptivityt.h.

References dim.

const char* give_filename ( void   )  const [inline]

Definition at line 100 of file adaptivityt.h.

References filename.

Referenced by newmeshgen(), and solve_trfel_adaptivity_problem().

const char* give_ni ( void   )  const [inline]

Definition at line 101 of file adaptivityt.h.

References ni.

Referenced by newmeshgen().

int give_niwidth ( void   )  const [inline]

Definition at line 98 of file adaptivityt.h.

References niwidth.

Referenced by newmeshgen(), and solve_trfel_adaptivity_problem().

int give_ntm ( void   )  const [inline]

Definition at line 97 of file adaptivityt.h.

References ntm.

const double* give_r ( void   )  const [inline]

Definition at line 102 of file adaptivityt.h.

References r.

Referenced by solve_trfel_adaptivity_problem().

const double* give_rdr ( void   )  const [inline]

Definition at line 103 of file adaptivityt.h.

References rdr.

Referenced by solve_trfel_adaptivity_problem().

int give_step ( void   )  const [inline]

Definition at line 99 of file adaptivityt.h.

References step.

Referenced by linear_nonstat_solv_vform(), nonstat_solver_dform_init(), and nonstat_solver_init().

void initialize ( long  s  ) 
void prepare_ni ( void   )  [private]

termitovo speciality

Definition at line 207 of file adaptivityt.cpp.

References filename, interadaloop, set_step(), step, and suffix.

Referenced by initialize().

void print_addat_vtk (  )  const [private]

print additional data in vtk format

refined derivatives

percentual error at element

refined size of element

Definition at line 400 of file adaptivityt.cpp.

References elem_error_pct, filename, ncomp, ne, ni, nn, ntm, path, refined_ders_in_nodes, and refsizelrel.

Referenced by run().

void printinit ( FILE *  out  ) 

print values to input file

Definition at line 65 of file adaptivityt.cpp.

References adapt_accuracy, enlarg, reduct, and tad.

Referenced by probdesct::print().

void readinit ( XFILE in  ) 

read values from input file

Definition at line 54 of file adaptivityt.cpp.

References adapt_accuracy, probdesct::adaptivityflag, enlarg, filename, filename_decomposition(), XFILE::fname, path, print_err(), reduct, suffix, Tp, and xfscanf().

Referenced by probdesct::read().

long run ( long  of,
bool  ial 
)

main function

This is main function of class adaptivity, it runs in three steps: 1. preparing strain 2. computing of refined derivative (strain or stress, determined by otherflag) by spr_smoothing or z2_smoothing 3. computing of error of FEM solution (case 3 = computing of accurate error)

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

strainy jsou pocitany standardne nekde vejs, kduz se pocitaji nejaky forces

ALLOCATION

MAIN

POST PROC

*** print of background mesh file ***

Definition at line 104 of file adaptivityt.cpp.

References allocv(), answer, compute_error(), compute_ipgrads(), dim, elem_error_pct, filename, Gtt, initialize(), interadaloop, long(), Mesprt, ncomp, ne, ni, nn, ntm, Outt, path, print_addat_vtk(), print_err(), print_valel(), printflags, refined_ders_in_nodes, refsizelabs, refsizelrel, sec(), spr(), and tad.

Referenced by linear_nonstat_solv_vform(), nonstat_solv_dform_comp(), nonstat_solv_vform_comp(), nonstat_solver_dform_init(), nonstat_solver_init(), Ctlinterface::solve(), and solve_stationary_problem().

void set_step ( long  s  )  [private]

setup step and ni

Definition at line 45 of file adaptivityt.cpp.

References ni, niwidth, and step.

Referenced by prepare_ni().

void spr ( int  mattid  )  [private]

average derivatives to nodes

Function fills up array refined_ders_in_nodes by derivatives(strain or stresses - it depends on otherflags) in nodes. It fills up array 'spder' by strain or stresses in sampling points and calls spr_smoothing to compute refined derivatives in nodes.

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

diky tomuto muzu vse brat z prvniho bloku

Definition at line 269 of file adaptivityt.cpp.

References matrix::a, vector::a, allocm(), dim, transtop::elements, transmat::givegrad(), Gtt, elementt::ipp, vector::n, ncomp, ne, Outt, print_err(), quadlint, refined_ders_in_nodes, probdesct::savemode, patch_averaging::solve(), elementt::te, Tm, Tp, trlint, and Tt.

Referenced by run().

void statedata_backup ( void   ) 
void statedata_restore ( void   ) 
void statedata_transfer ( adaptivityt Adat_old,
gtopology Gtt_old 
)

transfer of r and rdr

transfer of tctrl

transfer of step

Definition at line 989 of file adaptivityt.cpp.

References dim, findout_parentel_nod(), Gtt, istep, gtopology::nn, ntm, print_err(), r, rdr, tctrl, and transfvalues_nod().

Referenced by solve_trfel_adaptivity_problem().


Member Data Documentation

double adapt_accuracy [private]

accuracy

Definition at line 25 of file adaptivityt.h.

Referenced by adaptivityt(), compute_error(), compute_refsizel_lin(), printinit(), and readinit().

long answer

istep

answer of this class ; 1(0) == remeshing is (is not) recommended

Definition at line 88 of file adaptivityt.h.

Referenced by adaptivityt(), compute_error(), initialize(), linear_nonstat_solv_vform(), nonstat_solver_dform_init(), nonstat_solver_init(), run(), and solve_trfel_adaptivity_problem().

double corr [private]

correction

sum of other flags: 1 - linear (0) X nonlinear(1) compute_refsizel 2 - spr compute with strain(0) X stress(1) 4 - (strain X stress) is own(0) X another(2) 8 - zienkiewiczuv zpusob nelin pocitani(8) X ostatni(0) 2 - strain is own(0) X another(1) 4 - stress is own(0) X another(2)

Definition at line 49 of file adaptivityt.h.

Referenced by adaptivityt(), and compute_refsizel_lin().

long dim [private]

characteristics of the problem

Definition at line 13 of file adaptivityt.h.

Referenced by adaptivityt(), check_consistency(), give_dim(), initialize(), run(), spr(), and statedata_transfer().

vector* elem_error_pct [private]

percentual error at elements, dimension [ntm, ne]

Definition at line 71 of file adaptivityt.h.

Referenced by adaptivityt(), compute_error(), print_addat_vtk(), and run().

double enlarg [private]

max enlargement, reduction

Definition at line 28 of file adaptivityt.h.

Referenced by compute_refsizel_lin(), printinit(), and readinit().

char* filename [private]
bool interadaloop [private]

internal adaptive loop

Definition at line 57 of file adaptivityt.h.

Referenced by adaptivityt(), prepare_ni(), and run().

long istep
long ncomp [private]

base functions order

Definition at line 15 of file adaptivityt.h.

Referenced by adaptivityt(), initialize(), print_addat_vtk(), run(), and spr().

long ne [private]
char* ni [private]

Definition at line 63 of file adaptivityt.h.

Referenced by adaptivityt(), give_ni(), print_addat_vtk(), run(), set_step(), and ~adaptivityt().

int niwidth [private]

second suffix of enter file, it contains actual number of iteration

Definition at line 62 of file adaptivityt.h.

Referenced by adaptivityt(), give_niwidth(), and set_step().

long nn [private]

number of refined components [stress or strain in mefel]

Definition at line 16 of file adaptivityt.h.

Referenced by adaptivityt(), check_consistency(), initialize(), print_addat_vtk(), and run().

long ntm [private]
long ord [private]

dimension

Definition at line 14 of file adaptivityt.h.

Referenced by adaptivityt(), check_consistency(), compute_refsizel_lin(), and initialize().

char* path [private]

decomposed input file name

Definition at line 52 of file adaptivityt.h.

Referenced by adaptivityt(), print_addat_vtk(), readinit(), run(), and ~adaptivityt().

long printflags [private]

sum of printing flags: 1 - print stdout - printing of solving information on standard output 2 - print bgm - printing of file.bgm necessary for new mesh generation by T3d generator, file contains required element sizes on points(of old mesh) 4 - print 8 - print 16 - print test - printing of file.test for testing

Definition at line 37 of file adaptivityt.h.

Referenced by adaptivityt(), and run().

double* r [private]

*** BACK UP FOR INTERNAL LOOP ***

Definition at line 79 of file adaptivityt.h.

Referenced by adaptivityt(), give_r(), statedata_backup(), statedata_restore(), statedata_transfer(), and ~adaptivityt().

double* rdr [private]

unknowns in ALL nodes of global problem; values in array are stored (r[node_1][x] ... r[node_nn][x] , r[node_1][y] ... r[node_nn][y])

Definition at line 80 of file adaptivityt.h.

Referenced by adaptivityt(), give_rdr(), statedata_backup(), statedata_restore(), statedata_transfer(), and ~adaptivityt().

double reduct [private]

Definition at line 29 of file adaptivityt.h.

Referenced by compute_refsizel_lin(), printinit(), and readinit().

*** COMPUTED VALUES IN ARRAYS *** array of refined derivatives (gradients of fluxes) in nodes, dimension [nn, ncomp]

Definition at line 68 of file adaptivityt.h.

Referenced by adaptivityt(), compute_error(), print_addat_vtk(), run(), and spr().

vector* refsizelabs [private]

absolute new/refined size of elements, dimension [ntm, ne]

Definition at line 75 of file adaptivityt.h.

Referenced by adaptivityt(), compute_refsizel_lin(), and run().

vector* refsizelrel [private]

relative new/refined size of elements [only for better visualization], dimension [ntm, ne]

Definition at line 73 of file adaptivityt.h.

Referenced by adaptivityt(), compute_refsizel_lin(), print_addat_vtk(), and run().

long step [private]

step in adaptive loop

Definition at line 59 of file adaptivityt.h.

Referenced by adaptivityt(), give_step(), initialize(), prepare_ni(), and set_step().

char* suffix [private]

Definition at line 54 of file adaptivityt.h.

Referenced by adaptivityt(), prepare_ni(), readinit(), and ~adaptivityt().

long tad [private]

number of transported matters

type of error smoothing ; 1 = spr_smoothing , 2 = z2_smoothing

Definition at line 22 of file adaptivityt.h.

Referenced by adaptivityt(), printinit(), and run().

derivatives of unknowns in --""-- ; --""--

Definition at line 82 of file adaptivityt.h.

Referenced by adaptivityt(), solve_trfel_adaptivity_problem(), statedata_backup(), statedata_transfer(), and ~adaptivityt().


The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2