OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
fullsolveddomain.C
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; eitherc
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #include "../sm/Quasicontinuum/fullsolveddomain.h"
36 
37 #include "nummet.h"
38 #include "timestep.h"
39 #include "element.h"
40 #include "sparsemtrx.h"
41 #include "verbose.h"
42 #include "classfactory.h"
43 #include "datastream.h"
44 #include "contextioerr.h"
45 #include "classfactory.h"
46 
47 #include "node.h"
48 
49 namespace oofem {
50 //REGISTER_Quasicontinuum(QCFullsolveddomain);
51 
53 
54 // Constructor.
55 {}
56 
58 // Destructor
59 { }
60 
63 {
64  IRResultType result; // Required by IR_GIVE_FIELD macro
65 
70  // check input format
71 #ifdef DEBUG
73  OOFEM_ERROR("invalid format of FullSolvedDomainRadius");
74  }
75  if ( FullSolvedDomainBox.giveSize() != 0 && FullSolvedDomainBox.giveSize() % 6 != 0 ) {
76  OOFEM_ERROR("invalid format of FullSolvedDomainBox");
77  }
78 #endif
79 
80  return IRRT_OK;
81 }
82 
83 void
85 {
86  // place for adaptivity... //km??
87 }
88 
89 
90 bool
92 {
93  FloatArray *coordinates = n->giveCoordinates();
94  // is tested node in FullSolvedDomainNodes
95  if ( FullSolvedDomainNodes.giveSize() != 0 ) {
96  for ( int i = 1; i <= FullSolvedDomainNodes.giveSize(); i++ ) {
97  if ( n->giveGlobalNumber() == FullSolvedDomainElements.at(i) ) {
98  return true;
99  }
100  }
101  }
102 
103  // is tested node in FullSolvedDomainElements
104  if ( FullSolvedDomainElements.giveSize() != 0 ) {
105  for ( int i = 1; i <= FullSolvedDomainElements.giveSize(); i++ ) {
106  //if (km??? test zda lezi v i+1 elementu s cislem FullSolvedDomainElements.at(i))
107  // return true;
108  //}
109  }
110  }
111 
112  // is tested node in FullSolvedDomainRadius
113  if ( FullSolvedDomainRadius.giveSize() != 0 ) {
114  for ( int i = 0; i <= FullSolvedDomainRadius.giveSize() / 4 - 1; i++ ) {
115  FloatArray vector;
116  vector.resize(3);
117  vector.at(1) = coordinates->at(1) - FullSolvedDomainRadius.at(4 * i + 1);
118  vector.at(2) = coordinates->at(2) - FullSolvedDomainRadius.at(4 * i + 2);
119  vector.at(3) = coordinates->at(3) - FullSolvedDomainRadius.at(4 * i + 3);
120 
121 
122  if ( vector.computeNorm() <= FullSolvedDomainRadius.at(4 * i + 4) ) {
123  return true;
124  }
125  }
126  }
127 
128  return false;
129 }
130 } // end namespace oofem
int giveGlobalNumber() const
Definition: dofmanager.h:501
virtual IRResultType initializeFrom(InputRecord *ir)
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
#define _IFT_FullSolvedDomain_radius
#define OOFEM_ERROR(...)
Definition: error.h:61
#define _IFT_FullSolvedDomain_elements
Initializes the variable VERBOSE, in order to get a few intermediate messages on screen: beginning an...
Class representing vector of real numbers.
Definition: floatarray.h:82
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
#define _IFT_FullSolvedDomain_nodes
virtual bool isNodeInside(Node *n)
double computeNorm() const
Computes the norm (or length) of the vector.
Definition: floatarray.C:840
Class representing the general Input Record.
Definition: inputrecord.h:101
#define _IFT_FullSolvedDomain_box
virtual FloatArray * giveCoordinates()
Definition: node.h:114
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
the oofem namespace is to define a context or scope in which all oofem names are defined.
Class implementing node in finite element mesh.
Definition: node.h:87
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:28 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011