#include <adaptivity.h>
Public Member Functions | |
adaptivity (void) | |
CONSTRUCTOR. | |
long | give_adaptflag (void) const |
void | printinit (FILE *out) |
print values to input file | |
void | readinit (XFILE *in) |
read values from input file | |
long | run (long of, int width, long nincr) |
main function | |
~adaptivity (void) | |
DESTRUCTOR. | |
Private Member Functions | |
void | check_consistency (void) const |
check consistency | |
void | compute_error (void) |
compute error... | |
void | compute_refsizel_lin (const double *sizel, const double *ei2, double e2, double u2) |
void | prepare_ni (int w, long i) |
void | print_test (void) const |
void | spr (void) |
average derivatives to nodes | |
Private Attributes | |
double | adapt_accuracy |
accuracy | |
long | answer |
answer of this class ; 1(0) == remeshing is (is not) recommended | |
double | corr |
correction | |
long | dim |
characteristics of the problem | |
vector | elem_error_pct |
percentual error at elements | |
char * | filename |
long | ncomp |
base functions order | |
long | ne |
number of nodes | |
char * | ni |
second suffix of enter file, it contains actual number of iteration | |
long | nn |
number of refined components [stress or strain in mefel] | |
long | ord |
dimension | |
long | otherflags |
char * | path |
decomposed input file name | |
long | printflags |
vector * | refined_ders_in_nodes |
vector | refsizel |
absolute new/refined size of elements | |
vector | refsizelrel |
relative new/refined size of elements [only for better visualization] | |
char * | suffix |
long | tad |
number of elements |
Definition at line 7 of file adaptivity.h.
adaptivity | ( | void | ) |
CONSTRUCTOR.
Definition at line 33 of file adaptivity.cpp.
References probdesc::adaptivityflag, answer, corr, filename, Mp, ni, otherflags, path, printflags, refined_ders_in_nodes, suffix, and tad.
~adaptivity | ( | void | ) |
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 190 of file adaptivity.cpp.
References Cct, cctel, mechtop::give_elem_type(), lineartet, Ltet, Mt, lintet::nb, planeelemqq::nb, planeelemqt::nb, planeelemlq::nb, planeelemlt::nb, lintet::ncomp, ncomp, planeelemqq::ncomp, planeelemqt::ncomp, planeelemlq::ncomp, planeelemlt::ncomp, ne, lintet::nip, planeelemqq::nip, planeelemqt::nip, planeelemlq::nip, planeelemlt::nip, Pelq, Pelt, Peqq, Peqt, planeelementlq, planeelementlt, planeelementqq, planeelementqt, and print_err().
Referenced by run().
void compute_error | ( | void | ) | [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
*** print of background mesh file ***
Definition at line 292 of file adaptivity.cpp.
References vector::a, adapt_accuracy, allocv(), answer, lintet::compute_error(), planeelemqq::compute_error(), planeelemqt::compute_error(), planeelemlq::compute_error(), planeelemlt::compute_error(), compute_refsizel_lin(), elem_error_pct, filename, mechtop::give_elem_type(), Gtm, lineartet, Ltet, Mespr, Mt, ne, otherflags, Out, path, Pelq, Pelt, Peqq, Peqt, planeelementlq, planeelementlt, planeelementqq, planeelementqt, print_err(), print_valel(), printflags, refined_ders_in_nodes, refsizel, suffix, tad, and volume.
Referenced by run().
void compute_refsizel_lin | ( | const double * | sizel, | |
const double * | ei2, | |||
double | e2, | |||
double | u2 | |||
) | [private] |
Function computes new=required characteristic size of elements.
sizel | - array of old characteristic sizes of element | |
created 3.6.2002, Ladislav Svoboda, termit@cml.fsv.cvut.cz |
Definition at line 352 of file adaptivity.cpp.
References adapt_accuracy, allocv(), corr, ne, ord, refsizel, and refsizelrel.
Referenced by compute_error().
long give_adaptflag | ( | void | ) | const [inline] |
Definition at line 66 of file adaptivity.h.
References printflags.
Referenced by z2_smoothing::z2_smoothing().
void prepare_ni | ( | int | w, | |
long | i | |||
) | [private] |
void print_test | ( | void | ) | const [private] |
created 3.6.2002, Ladislav Svoboda, termit@cml.fsv.cvut.cz
Definition at line 389 of file adaptivity.cpp.
References mechtop::elements, intpoints::eqother, filename, mechmat::ip, element::ipp, lhsrhs::lhs, lineartet, Lsrs, Mb, Mm, Mt, ncomp, Ndofm, mechtop::ne, ne, mechbclc::nlc, nn, path, planeelementlq, planeelementlt, planeelementqq, planeelementqt, planeelementsubqt, refined_ders_in_nodes, refsizel, intpoints::strain, element::te, and mechmat::tnip.
Referenced by run().
void printinit | ( | FILE * | out | ) |
print values to input file
Definition at line 68 of file adaptivity.cpp.
References adapt_accuracy, corr, printflags, and tad.
Referenced by probdesc::print().
void readinit | ( | XFILE * | in | ) |
read values from input file
Definition at line 57 of file adaptivity.cpp.
References adapt_accuracy, probdesc::adaptivityflag, corr, filename, filename_decomposition(), XFILE::fname, Mp, path, print_err(), printflags, suffix, and xfscanf().
Referenced by probdesc::read().
long run | ( | long | of, | |
int | width, | |||
long | nincr | |||
) |
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
Definition at line 82 of file adaptivity.cpp.
References allocv(), answer, gelement::auxinf, check_consistency(), compute_error(), dim, gtopology::gelements, mechtop::give_degree(), mechtop::give_dimension(), mechtop::give_ncomp(), mechtop::give_nne(), Gtm, long(), Mespr, Mt, ncomp, mechtop::ne, ne, mechtop::nn, nn, ord, otherflags, prepare_ni(), print_err(), print_test(), printflags, refined_ders_in_nodes, z2_smoothing::run(), sec(), spr(), and tad.
Referenced by arclength(), arclengthadapt(), nonlinear_solver_adaptiv(), par_solve_linear_statics(), and solve_linear_statics().
void spr | ( | void | ) | [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
Definition at line 238 of file adaptivity.cpp.
References matrix::a, vector::a, allocm(), dim, lintet::elchar(), planeelemqq::elchar(), planeelemqt::elchar(), planeelemlq::elchar(), mechtop::elements, mechmat::givestrain(), mechmat::givestress(), Gtm, element::ipp, lineartet, Ltet, Mm, Mt, vector::n, ncomp, ne, otherflags, Out, Pelq, Peqq, Peqt, planeelementlq, planeelementlt, planeelementqq, planeelementqt, print_err(), refined_ders_in_nodes, patch_averaging::solve(), and element::te.
Referenced by run().
double adapt_accuracy [private] |
accuracy
Definition at line 41 of file adaptivity.h.
Referenced by compute_error(), compute_refsizel_lin(), printinit(), and readinit().
long answer [private] |
answer of this class ; 1(0) == remeshing is (is not) recommended
Definition at line 63 of file adaptivity.h.
Referenced by adaptivity(), compute_error(), and run().
double corr [private] |
correction
Definition at line 38 of file adaptivity.h.
Referenced by adaptivity(), compute_refsizel_lin(), printinit(), and readinit().
long dim [private] |
characteristics of the problem
Definition at line 11 of file adaptivity.h.
vector elem_error_pct [private] |
percentual error at elements
Definition at line 55 of file adaptivity.h.
Referenced by compute_error().
char* filename [private] |
Definition at line 45 of file adaptivity.h.
Referenced by adaptivity(), compute_error(), prepare_ni(), print_test(), readinit(), and ~adaptivity().
long ncomp [private] |
base functions order
Definition at line 13 of file adaptivity.h.
Referenced by check_consistency(), print_test(), run(), and spr().
long ne [private] |
number of nodes
Definition at line 15 of file adaptivity.h.
Referenced by check_consistency(), compute_error(), compute_refsizel_lin(), print_test(), run(), and spr().
char* ni [private] |
second suffix of enter file, it contains actual number of iteration
Definition at line 49 of file adaptivity.h.
Referenced by adaptivity(), prepare_ni(), and ~adaptivity().
long nn [private] |
number of refined components [stress or strain in mefel]
Definition at line 14 of file adaptivity.h.
Referenced by print_test(), and run().
long ord [private] |
dimension
Definition at line 12 of file adaptivity.h.
Referenced by compute_refsizel_lin(), and run().
long otherflags [private] |
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 35 of file adaptivity.h.
Referenced by adaptivity(), compute_error(), run(), and spr().
char* path [private] |
decomposed input file name
Definition at line 44 of file adaptivity.h.
Referenced by adaptivity(), compute_error(), print_test(), readinit(), and ~adaptivity().
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 26 of file adaptivity.h.
Referenced by adaptivity(), compute_error(), give_adaptflag(), printinit(), readinit(), and run().
vector* refined_ders_in_nodes [private] |
*** COMPUTED VALUES IN ARRAYS *** array of refined derivatives (stress or strain) in nodes
Definition at line 53 of file adaptivity.h.
Referenced by adaptivity(), compute_error(), print_test(), run(), and spr().
absolute new/refined size of elements
Definition at line 57 of file adaptivity.h.
Referenced by compute_error(), compute_refsizel_lin(), and print_test().
vector refsizelrel [private] |
relative new/refined size of elements [only for better visualization]
Definition at line 59 of file adaptivity.h.
Referenced by compute_refsizel_lin().
char* suffix [private] |
Definition at line 46 of file adaptivity.h.
Referenced by adaptivity(), compute_error(), prepare_ni(), readinit(), and ~adaptivity().
long tad [private] |
number of elements
type of error smoothing ; 1 = spr_smoothing , 2 = z2_smoothing
Definition at line 18 of file adaptivity.h.
Referenced by adaptivity(), compute_error(), printinit(), and run().