20 if (attflag ==
'-')
errol;
180 val[0] = val[1] = val[2] = 2;
181 val[3] = val[4] = val[5] = 0;
200 default:
if (hinge > 0)
errol;
211 if (superelems[i]->give_elemAttribs()->give_conDOFs(
this))
217 if (superelems[i]->give_elemAttribs()->give_conDOFs(
this) == NULL && superelems[i]->give_elemAttribs()->give_dpn() == dpnfn)
226 dpne = superelems[i]->give_elemAttribs()->give_dpn();
227 if ( dpne !=
DPN_DxyzR___ && ( dpne !=
DPN_DxyzRxyz || (! superelems[i]->give_elemAttribs()->give_conDOFs(
this)->is_full_hinge()) ) )
252 if (superedges[i]->give_nno() == nn)
253 if ( superedges[i]->give_points()->has_these_members(nn, nods) )
254 return superedges[i];
276 default:
_errorr(
"unsupported dimension");
288 default:
_errorr(
"unsupported dimension");
299 default:
_errorr(
"unsupported dimension");
310 default:
_errorr(
"unsupported dimension");
325 for (i=0; i<superedges(); i++) const_cast<Edge* >(
superedges[i])->switch_node_pointer (
this, master, duplcheck);
326 for (i=0; i<superfaces(); i++) const_cast<Face* >(
superfaces[i])->switch_node_pointer (
this, master, duplcheck);
332 ((
Problem*)
Pd)->switch_node_pointer (
this, master);
406 ((
Element*)superelems[i])->set_fullhinge_at(
this);
416 fprintf (stream,
"vertex %3ld xyz ", this->
ID+1);
419 for (
int i=0; i<3; i++) fprintf (stream,
" %21.14e", this->
give_coord(i));
422 fprintf (stream,
" property %ld", this->
ID+1);
428 if (endline) fprintf (stream,
"\n");
495 _errorr (
"Mishmash in domains");
535 else {
cdom = -dom;
lid =
new long[ 1 ];
lid[ 0 ] = li; }
546 if (nd<1 && dom==NULL) {
lid =
new long[1];
lid[0] = ((
Mesh*)
Msh())->NumNodes_plus(-nd); }
549 for (
int i=0; i<nd; i++)
lid[dom[i]] = ((
Mesh*)
Msh())->NumNodes_plus(dom[i]);
563 long parentdim, trash, prop;
573 default:
_errorr(
"unsupported fem file format");
577 if (!shared)
_errorr (
"The node has to be shared");
580 if (dom==1 && li<4) {
585 else _errorr (
"The node has to be shared, cdom<=0");
596 if (superelems[i]->give_dimension() == 3)
607 if (this->
give_lid(did) != -1)
return;
618 lid[did] = ((
Mesh*)
Msh())->NumNodes_plus(did);
631 if (level[0] > 50000)
return true;
637 for (
long j=0; j<superelems[i]->give_nno(); j++)
638 if ( ((
Node*)superelems[i]->give_point(j))->find_parent_subdom (sdid,nn,level) ) {
665 elw = ((
FElement*)superelems[i])->give_ssstate (&eldata, SST, rvtype, type, step,
this);
668 data->
addtms(eldata, elw);
681 else if (prop <= model->give_Nels())
mdl_masterel = dynamic_cast<const Gelement *>(model->
give_Elem(prop-1));
702 for (; dim<=3; dim++) {
703 for (i=0; i<(*superelems)(); i++) {
704 if ( dim != (*superelems)[i]->give_dimension() )
continue;
706 dofbc2 = ((
const Gelement*)(*superelems)[i])->give_gelemAttribs()->give_dofbc();
708 if (dofbc==NULL) { dofbc = dofbc2; supid = (*superelems)[i]->
give_ID(); }
711 _errorr5(
"Different boundary conditions at elements %ld and %ld meet at %s %ld", supid+1, (*superelems)[i]->give_ID()+1, name,
id+1);
729 long parenttype, trash, prop;
786 long i, auxl, et, prop;
788 for (i=0; i<auxl; i++) {
794 default:
_errorr(
"unsupported fem file format");
812 fgets (LINE, 1023, stream); str=LINE;
817 for (
int i=0; i<ndofs; i++) {
818 fgets (LINE, 1023, stream); str=LINE;
830 for (
int i=0; i<ndofs; i++) {
832 fgets (LINE, 1023, stream); str=LINE;
865 fgets (LINE, 1023, stream); str=LINE;
871 for (
int i=0; i<ndofs; i++) {
872 sprintf(r,
"r_%d=",i+1);
882 fgets (LINE, 1023, stream); str=LINE;
888 for (
int i=0; i<nmed; i++) {
889 sprintf(r,
"r_%d=",i+1);
901 fgets (LINE, 1023, stream); str=LINE;
907 for (
int i=0; i<ndofs; i++) {
908 sprintf(r,
"R_%d=",i+1);
912 if ((*values)[i] > 1.e-12)
errol;
913 else (*values)[i] = 0.0;
929 if (flag ==
'a' || flag ==
's') {
934 fprintf (stream,
" coords 3");
935 for (i=0; i<3; i++) fprintf (stream,
" %16.9e", this->
give_coord(i));
943 if (flag ==
'a' || flag ==
'e') {
946 fprintf (stream,
" Shared partitions %4ld", this->
give_cdom()-1);
948 if (this->
give_lid(i)!=-1 && i!=did)
949 fprintf (stream,
" %4ld",i);
954 fprintf (stream,
"%6ld", this->
give_ID()+1);
957 for (i=0; i<3; i++) fprintf (stream,
" %13.6e", this->
give_coord(i));
963 fprintf (stream,
"N,%6ld", this->
give_ID()+1);
966 for (i=0; i<3; i++) fprintf (stream,
", %13.6e", this->
give_coord(i));
970 fprintf (stream,
"%ld", this->
give_ID()+1);
972 for (i=0; i<3; i++) fprintf (stream,
" %16.10e", this->
give_coord(i));
976 fprintf (stream,
" %ld", nprop);
990 fprintf (stream,
"%8ld", this->
give_ID()+1);
992 for (i=0; i<3; i++) fprintf (stream,
" %13.6e", this->
give_coord(i));
996 if (nprop == 0)
_errorr2(
"There is no property at node %ld, required by JKTK file format", this->
give_ID()+1);
997 fprintf (stream,
" %ld", nprop);
1011 fprintf (stream,
"\n");
1018 if (
Msh()->give_rslts_nsteps() == 0)
_errorr(
"allocate results with nsteps == 0, mayby replace -IN_VTKaddata by -IN_VTKaddataRSLT");
1037 long nsteps =
Msh()->
give_rslts_nsteps();
if (nsteps == 0)
_errorr(
"allocate results with nsteps == 0, mayby replace -IN_VTKaddata by -IN_VTKaddataRSLT");
1106 else if (
lid[did] == -1)
continue;
1122 else if (
lid[did] == -1)
continue;
1134 ((
HNAttribs*)
attributes)->initialize_atelemet (mc, dimMC, ordMC, countMN, nodes, natcoord);
1147 fprintf (stream,
" gid %ld cdom %3ld lid",
ID+
Msh()->give_Nn(),
cdom);
1148 if (
cdom<1) fprintf (stream,
" %ld",
lid[0]);
1149 else for (
long i=0; i<
NumDomains(); i++) fprintf (stream,
" %ld",
lid[i]);
1176 else if (
lid[did] == -1)
continue;
const GPA< const Element > * give_superelems(void) const
long NumDomains(void) const
const Face * give_Face(long i) const
bool is_parallel_with(const VectoR *that, double relZero) const
virtual const char * give_node_name(void) const
return name of node used in input file for static soft
void setup_full_alloc_DOFvals(Dvctr *answer, const Dvctr *values) const
void set_master_component(long prop, const Model *model, int parenttype)
virtual ~Point()
DESTRUCTOR.
void print_one_row_HN(FILE *stream, long hid) const
*** READ ***
void print_row_VTX(char *str) const
bool give_PDBO(ProbDescBoolOpt pdbo) const
void checkEqualityWith(const PointAttribs *slave) const
virtual void checkConsistency(void) const
Checks data consistency.
const Facedge * mdl_masteref
Parent model entity - master Edge or Face.
int give_hinge(void) const
void allocate_resultsN(void)
void add_domain(long gid, const char *&str, femFileFormat fff, bool shared, long dom, long li)
initialize shared node on next domain
bool is_on_3d_element(void) const
any parent element is 3-dimensional
const GPA< const Edge > * give_superedges(void) const
double give_ssstate(Dvctr *data, SStype SST, RVType rvtype, char type, long step)
give stress-strain state averaged to node
PointAttribs * give_NdAt_with_prop(long prop) const
bool is_identical_to(const Elem3D *p, double zero) const
void make_invisible(Point *master, bool duplcheck)
GPA< const Edge > superedges
CONNECTIVITY - full connectivity initiated only when Geom->connectivity_is_assembled() == true...
const Gelement * mdl_masterel
Parent model entity - master Element.
virtual void finitialize(void)
finalize preprocessing
#define SP_scan_expected_word_exit(_1, _2, _3, _4)
const Edge * give_superedge(long i) const
void integrate_duplicated_point(Point *slave)
void add_me_to_domain(long did)
adds existing node (nemusi se allocovat) to domain == rozsiri se lid[]
long give_property(void) const
long give_Nels(void) const
bool is_supported(void) const
long give_rslts_nsteps(void) const
virtual void finitialize(void)
finalize preprocessing
int give_dimension(void) const
return type of element geometry, is identical with class derived from FElement
#define SP_scan_expected_number_exit(_1, _2, _3)
const Dvctr * give_resultsE_dv(long regid, long step, ResultTypesAtElem rt) const
void check_masters_at_domain(long did) const
void deallocateCheckUno(ArgType *p, bool check=true)
virtual void print_row(FILE *stream, femFileFormat fff, bool endline=true, long did=0) const
*** PRINT ***
void check_connectivity(void) const
bool is_shared(void) const
ATRIBUTES.
void add_resultN(Xvctr *rslt, long step, ResultTypesAtNode rt)
const LCS_pure * give_mdl_lcs(void)
funkce je udelana na rycholo, pro jine nez polygon rovinny bude hazet hovadiny
virtual long give_size(void) const
unknows in transport, N=ndofs
const Mesh * Msh(void) const
PointAttribs * pointAttribs()
long give_cdom(void) const
long ID
(global) identification number == position in list of members; zero-based numbering.
virtual ~Node()
DESTRUCTOR.
void connectivity_assembling(bool re=false)
Function assembles connectivity between element and its nodes, edges and faces (which are allocated i...
Point * duplmaster
DUPLICITY there is no chain as on element.
GPA< const Face > superfaces
Vertex(const Geometry *owner, long gid, const PoinT *coo, char attflag='!')
CONSTRUCTOR.
void switch_node_pointer_in_all_components(Point *slave, Point *master, bool duplcheck)
switch node pointer from oldnode/slave to newnode/master on this and all components (edges...
const PointDOFsBCPM * give_DOFbc(void) const
bool is_identical_with(const PointDOFsAttributes *src) const
long give_numsuperface(void) const
Attributes * attributes
ATTRIBUTES.
void attributes_allocation(char attflag, const Attributes *masterat)
*** *** *** *** CLASS POINT *** *** *** ***
virtual ~Vertex()
DESTRUCTOR.
Array **** resultsE
INTERPOLATED RESULTS 1d array of pointers to 2d array of pointers to Dvctr.
void give_displcmnt_in_all_steps(Dvctr *data, int indx) const
void initialize_hn(const PoinT *cartcoord, const Cell *mc, long dimMC, long ordMC, long countMN, const Node **nodes, const PoinT *natcoord)
initialize hanging node
void set_property(int dim, long val)
void initialize_domli(bool shared, long dom, long li)
bool Parallel(void) const
*** FEMesh ***
const Element * give_superelem(long i) const
long give_lid(long dom) const
vraci lid of node pro domenu dom, pokud node v domene nelezi, vraci -1
const PointDOFsBCPM * give_uniq_dofbc(int dim, const GPA< const Element > *superelems, const char *name, long id)
Structs Elem3D, PoinT and VectoR; classes Array, Array1d, Xscal, Dscal, Xvctr, Lvctr, Dvctr, Xmtrx, Lmtrx and Dmtrx.
Dvctr * resize_ignore_vals(long newsize)
void give_vector(VectoR *v) const
virtual void print_row(FILE *stream, femFileFormat fff, long did) const
print row to solver input file
virtual void initialize(void)
initiate/sets data
void read_input(const char *&str, femFileFormat fff)
*** READ ***
PointAttribs * give_pointAttribs(void)
bool find_parent_subdom(long sdid, long *nn, long *level)
const Face * give_superface(long i) const
void add_property(int dim, long val)
int give_att(int i) const
const Edge * give_edge(long i) const
const Problem * Pd
Pointer to owner = parent problem.
Point(const Geometry *owner, long gid, const PoinT *coo, char attflag)
CONSTRUCTOR.
void reset_dofbc_support_all_rot_dofs(void)
const Dmtrx * give_resultsE_dm(long regid, long step, ResultTypesAtElem rt) const
void initialize_parallel(long nd, long *dom)
initialize atributes cdom and lid
const Dscal * give_resultsN_ds(long step, ResultTypesAtNode rt) const
virtual void checkConsistency(void) const
Checks data consistency.
void add_resultE(Dvctr *rslt, long regid, long step, ResultTypesAtElem rt)
const Edge * give_Edge(long i) const
void read_output_OOFEM(FILE *stream, long step, ResultTypesAtNode rt)
ElemAttribs * give_elemAttribs(void)
bool scan_xyz(FILE *stream)
const Geometry * Geom
Pointer to owner == parent geometry.
void delete_connectivity(void)
remove superiors
Lvctr * resize_ignore_vals(long newsize)
resize, ignore values
virtual void initialize(void)
initiate/sets data
GPA - Generic Pointer Array, template class manages 1d array of pointers to objects of type T...
virtual void print_row(FILE *stream, femFileFormat fff, bool endline=true, long did=0) const
print node row output for solver
const Face * give_superface(long i) const
Derived class for management of boundary conditions and physical meanings of DOFs (Degrees Of Freedom...
void add(long val)
add value to size++ position
Attributes * give_attributes(void)
SStype
type of stress/strain state of element; especially results depends on this variable => described at M...
const HNAttribs * give_HNattrb(void) const
long give_numsuperface(void) const
int EntityType_type2dim_jktkT3d(long val)
Conversion from "entity type by t3d and jktk" to "dimension".
void reset_property(int dim, long val)
virtual void switch_node_pointer(Point *slave, Point *master, bool duplcheck)
switch node pointer form slave to master
DOFsPerNode give_DOFspnod(void) const
ResultTypesAtElem
Result type at element.
void setup_full_alloc_DOFvals_at(Dvctr *d, ResultTypesAtNode rt, long step) const
const Facedge * give_same_dimension_facedge(void) const
Returns edge/face/volume of same dimension as receiver (Beam returns edge, etc.)
virtual void initialize(void)
initiate/sets data
void set_resultE(const Dmtrx *rslt, long regid, long step, ResultTypesAtElem rt)
const Element * give_Elem(long i) const
#define _errorr5(_1, _2, _3, _4, _5)
bool SP_scan_number(const char *&src, int &dest)
... number of type int/long/double
virtual bool invisible_duplicated(char flag='a')
make invisible if duplicated
void read_output_SIFEL(FILE *stream, long step, ResultTypesAtNode rt)
*** *** *** *** CLASS COMPONENT *** *** *** ***
Local coordinate system defined by 2 vectors.
const Vertex * mdl_masterex
Parent model entity - master Vertex.
void allocate_resultsE(long regid)
#define SP_scan_expected_word3_exit(_1, _2, _3, _4, _5, _6)
virtual void initialize(void)
initiate/sets data
DOFsPerNode give_DOFspnod(void) const
return DOFspnod inherited from Problem, or NULL if
#define _errorr4(_1, _2, _3, _4)
void mg_connectivity_assembling(void)
ResultTypesAtNode
Result type at node.
void set_resultN(long s, const double *rslt, long step, ResultTypesAtNode rt)
virtual classID give_classid() const
Returns classID - class identification.
void addtms(const Dvctr &src, double tms)
const GPA< const Element > * give_superelems(void) const
RVType
Result variable type.
virtual void initialize(void)
initiate/sets data
const CrossSection * give_cs(void) const
void set_dofbc_copy_of(const PointDOFsBCPM *src)
long give_nRegions(void) const
long give_lid_id(long dom) const
vraci lid of node, pro non-Parallel vraci id
GPA< const Element > superelems
virtual void checkConsistency(void) const
Checks data consistency.
void print_row_VTK(FILE *stream) const
*** READ ***
PoinT * copy(const PoinT *p)
int EntityType_dim2type_jktkT3d(int val)
Conversion from "dimension" to "entity type by t3d and jktk".
Array1d *** resultsN
NATIVE RESULTS 2d array of pointers to Xvctr.
virtual void checkConsistency(void) const
Checks data consistency.
virtual void initialize(void)
initiate/sets data
virtual bool initialize_from(const char *&str, femFileFormat ff, bool all=true)
initialize form input string
void initialize_masters_at_domains(void)
add masters to HN domains
const Point * give_Pjnt(long i) const
const Dvctr * give_resultsN_dv(long step, ResultTypesAtNode rt) const
const GPA< const Face > * give_superfaces(void) const
Node(const Geometry *owner, long gid, const PoinT *coo, char attflag='n')
CONSTRUCTOR.
virtual void checkConsistency(void) const
Checks data consistency.
int give_nDOFs(void) const
void fill_all_by(ArgType *p, long a, ArgType value)
*** *** *** *** FILL TEMPLATES *** *** *** ***
double give_coord(int i) const
long give_numsuperelem(void) const