OOFEM 3.0
Loading...
Searching...
No Matches
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 - 2025 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
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
49namespace oofem {
50//REGISTER_Quasicontinuum(QCFullsolveddomain);
51
52QCFullsolveddomain :: QCFullsolveddomain()
53
54// Constructor.
55{}
56
57QCFullsolveddomain :: ~QCFullsolveddomain()
58// Destructor
59{ }
60
61void
62QCFullsolveddomain :: initializeFrom(InputRecord &ir)
63{
68 // check input format
69#ifdef DEBUG
70 if ( FullSolvedDomainRadius.giveSize() != 0 && FullSolvedDomainRadius.giveSize() % 4 != 0 ) {
71 OOFEM_ERROR("invalid format of FullSolvedDomainRadius");
72 }
73 if ( FullSolvedDomainBox.giveSize() != 0 && FullSolvedDomainBox.giveSize() % 6 != 0 ) {
74 OOFEM_ERROR("invalid format of FullSolvedDomainBox");
75 }
76#endif
77}
78
79void
80QCFullsolveddomain :: updateYourself()
81{
82 // place for adaptivity... //km??
83}
84
85
86bool
87QCFullsolveddomain :: isNodeInside(Node *n)
88{
89 const auto &coordinates = n->giveCoordinates();
90 // is tested node in FullSolvedDomainNodes
91 if ( FullSolvedDomainNodes.giveSize() != 0 ) {
92 for ( int i = 1; i <= FullSolvedDomainNodes.giveSize(); i++ ) {
93 if ( n->giveGlobalNumber() == FullSolvedDomainElements.at(i) ) {
94 return true;
95 }
96 }
97 }
98
99 // is tested node in FullSolvedDomainElements
100 if ( FullSolvedDomainElements.giveSize() != 0 ) {
101 for ( int i = 1; i <= FullSolvedDomainElements.giveSize(); i++ ) {
102 //if (km??? test zda lezi v i+1 elementu s cislem FullSolvedDomainElements.at(i))
103 // return true;
104 //}
105 }
106 }
107
108 // is tested node in FullSolvedDomainRadius
109 if ( FullSolvedDomainRadius.giveSize() != 0 ) {
110 for ( int i = 0; i <= FullSolvedDomainRadius.giveSize() / 4 - 1; i++ ) {
111 FloatArray vector(3);
112 vector.at(1) = coordinates.at(1) - FullSolvedDomainRadius.at(4 * i + 1);
113 vector.at(2) = coordinates.at(2) - FullSolvedDomainRadius.at(4 * i + 2);
114 vector.at(3) = coordinates.at(3) - FullSolvedDomainRadius.at(4 * i + 3);
115
116
117 if ( vector.computeNorm() <= FullSolvedDomainRadius.at(4 * i + 4) ) {
118 return true;
119 }
120 }
121 }
122
123 return false;
124}
125} // end namespace oofem
int giveGlobalNumber() const
Definition dofmanager.h:515
const FloatArray & giveCoordinates() const
Definition dofmanager.h:390
double computeNorm() const
Definition floatarray.C:861
double & at(Index i)
Definition floatarray.h:202
#define OOFEM_ERROR(...)
Definition error.h:79
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Definition inputrecord.h:75
#define _IFT_FullSolvedDomain_box
#define _IFT_FullSolvedDomain_elements
#define _IFT_FullSolvedDomain_nodes
#define _IFT_FullSolvedDomain_radius

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011