OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
transportgradientperiodic.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; either
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 #include "dofiditem.h"
37 #include "node.h"
38 #include "dofmanager.h"
39 #include "dof.h"
40 #include "valuemodetype.h"
41 #include "floatarray.h"
42 #include "floatmatrix.h"
43 #include "engngm.h"
44 #include "node.h"
45 #include "activedof.h"
46 #include "masterdof.h"
47 #include "classfactory.h"
48 #include "sparsemtrxtype.h"
49 #include "sparsemtrx.h"
50 #include "sparselinsystemnm.h"
51 #include "dynamicinputrecord.h"
52 #include "domain.h"
53 #include "spatiallocalizer.h"
54 #include "feinterpol.h"
55 #include "unknownnumberingscheme.h"
56 #include "function.h"
57 #include "timestep.h"
58 #include "mathfem.h"
59 
60 namespace oofem {
61 REGISTER_BoundaryCondition(TransportGradientPeriodic);
62 
63 TransportGradientPeriodic :: TransportGradientPeriodic(int n, Domain *d) : ActiveBoundaryCondition(n, d), //PrescribedGradientHomogenization(),
64  grad( new Node(1, d) )
65 {
66  int nsd = d->giveNumberOfSpatialDimensions();
67  // The prescribed strains.
68  for ( int i = 0; i < nsd; i++ ) {
69  int dofid = d->giveNextFreeDofID();
70  grad_ids.followedBy(dofid);
71  // Just putting in X_i id-items since they don't matter.
72  // These don't actually need to be active, they are masterdofs with prescribed values, its
73  // easier to just have them here rather than trying to make another Dirichlet boundary condition.
74  grad->appendDof( new ActiveDof( grad.get(), (DofIDItem)dofid, this->giveNumber() ) );
75  //grad->appendDof( new MasterDof(grad.get(), this->giveNumber(), 0, (DofIDItem)dofid ) );
76  }
77 }
78 
79 
81 {
82 }
83 
84 
86 {
87  return 1;
88 }
89 
90 
92 {
93  return this->grad.get();
94 }
95 
96 
98 {
99  FloatArray coord;
101  //Set *masterSet = this->domain->giveSet(2);
102  const IntArray &nodes = this->domain->giveSet(this->set)->giveNodeList(); // Split into slave set and master set?
103  int nsd = jump.giveSize();
104  std :: vector< FloatArray > jumps;
105  // Construct all the possible jumps;
106  jumps.reserve((2 << (nsd-1)) - 1);
107  if ( nsd != 3 ) {
108  OOFEM_ERROR("Only 3d implemented yet!");
109  }
110  jumps.emplace_back(jump);
111  jumps.emplace_back(FloatArray{jump.at(1), jump.at(2), 0.});
112  jumps.emplace_back(FloatArray{jump.at(1), 0., jump.at(3)});
113  jumps.emplace_back(FloatArray{0., jump.at(2), jump.at(3)});
114  jumps.emplace_back(FloatArray{jump.at(1), 0., 0.});
115  jumps.emplace_back(FloatArray{0., jump.at(2), 0.});
116  jumps.emplace_back(FloatArray{0., 0., jump.at(3)});
117 
118  double maxdist = jump.computeNorm()*1e-5;
119 
120  this->slavemap.clear();
121  for ( int inode : nodes ) {
122  Node *masterNode = NULL;
123  Node *node = this->domain->giveNode(inode);
124  const FloatArray &masterCoord = *node->giveCoordinates();
125  //printf("node %d\n", node->giveLabel()); masterCoord.printYourself();
126  // The difficult part, what offset to subtract to find the master side;
127  for ( FloatArray &testJump : jumps ) {
128  coord.beDifferenceOf(masterCoord, testJump);
129  masterNode = sl->giveNodeClosestToPoint(coord, maxdist);
130  if ( masterNode != NULL ) {
131  //printf("Found master (%d) to node %d (distance = %e)\n", masterNode->giveNumber(), node->giveNumber(),
132  // masterNode->giveCoordinates()->distance(coord));
133  break;
134  }
135  }
136  if ( masterNode ) {
137  this->slavemap.insert({node->giveNumber(), masterNode->giveNumber()});
138  } else {
139  OOFEM_ERROR("Couldn't find master node!");
140  }
141  }
142 }
143 
144 
146 {
147  int nsd = d->giveNumberOfSpatialDimensions();
148  double domain_size = 0.0;
149  // This requires the boundary to be consistent and ordered correctly.
150  Set *set = d->giveSet(setNum);
151  const IntArray &boundaries = set->giveBoundaryList();
152 
153  for ( int pos = 1; pos <= boundaries.giveSize() / 2; ++pos ) {
154  Element *e = d->giveElement( boundaries.at(pos * 2 - 1) );
155  int boundary = boundaries.at(pos * 2);
157  domain_size += fei->evalNXIntegral( boundary, FEIElementGeometryWrapper(e) );
158  }
159  return fabs(domain_size / nsd);
160 }
161 
162 
164 {
165  if ( this->isGradDof(dof) ) {
166  return 1;
167  }
168  return this->giveDomain()->giveNumberOfSpatialDimensions() + 1;
169 }
170 
171 
173 {
174  if ( this->isGradDof(dof) ) {
175  return NULL;
176  }
177  if ( mdof == 1 ) {
178  int node = this->slavemap[dof->giveDofManager()->giveNumber()];
179  return this->domain->giveDofManager(node)->giveDofWithID(dof->giveDofID());
180  } else {
181  return this->grad->giveDofWithID(this->grad_ids[mdof-2]);
182  }
183 }
184 
185 
187 {
188  DofIDEquationNumbering pnum(true, grad_ids);
189  EngngModel *emodel = this->giveDomain()->giveEngngModel();
190  FloatArray tmp;
191  int npeq = grad_ids.giveSize();
192  // sigma = residual (since we use the slave dofs) = f_ext - f_int
193  flux.resize(npeq);
194  flux.zero();
195  emodel->assembleVector(flux, tStep, InternalForceAssembler(), VM_Total, pnum, this->domain);
196  tmp.resize(npeq);
197  tmp.zero();
198  emodel->assembleVector(tmp, tStep, ExternalForceAssembler(), VM_Total, pnum, this->domain);
199  flux.subtract(tmp);
200  // Divide by the RVE-volume
201  flux.times(1.0 / ( this->domainSize(this->giveDomain(), this->set) + this->domainSize(this->giveDomain(), this->masterSet) ));
202 }
203 
204 
206 {
208  //DofIDEquationNumbering pnum(true, this->grad_ids);
210  int nsd = this->domain->giveNumberOfSpatialDimensions();
211 
212  EngngModel *rve = this->giveDomain()->giveEngngModel();
214  std :: unique_ptr< SparseLinearSystemNM > solver( classFactory.createSparseLinSolver( ST_Petsc, this->domain, this->domain->giveEngngModel() ) ); // = rve->giveLinearSolver();
215  SparseMtrxType stype = solver->giveRecommendedMatrix(true);
216  std :: unique_ptr< SparseMtrx > Kff( classFactory.createSparseMtrx( stype ) );
217  std :: unique_ptr< SparseMtrx > Kfp( classFactory.createSparseMtrx( stype ) );
218  std :: unique_ptr< SparseMtrx > Kpp( classFactory.createSparseMtrx( stype ) );
219 
220  Kff->buildInternalStructure(rve, this->domain->giveNumber(), fnum);
221  int neq = Kff->giveNumberOfRows();
222  Kfp->buildInternalStructure(rve, this->domain->giveNumber(), fnum, pnum);
223  Kpp->buildInternalStructure(rve, this->domain->giveNumber(), pnum);
224  //Kfp->buildInternalStructure(rve, neq, nsd, {}, {});
225  //Kpp->buildInternalStructure(rve, nsd, nsd, {}, {});
226 #if 1
227  rve->assemble(*Kff, tStep, TangentAssembler(TangentStiffness), fnum, this->domain);
228  rve->assemble(*Kfp, tStep, TangentAssembler(TangentStiffness), fnum, pnum, this->domain);
229  rve->assemble(*Kpp, tStep, TangentAssembler(TangentStiffness), pnum, this->domain);
230 #else
231  auto ma = TangentAssembler(TangentStiffness);
232  IntArray floc, ploc;
233  FloatMatrix mat, R;
234 
235  int nelem = domain->giveNumberOfElements();
236 #ifdef _OPENMP
237  #pragma omp parallel for shared(Kff, Kfp, Kpp) private(mat, R, floc, ploc)
238 #endif
239  for ( int ielem = 1; ielem <= nelem; ielem++ ) {
240  Element *element = domain->giveElement(ielem);
241  // skip remote elements (these are used as mirrors of remote elements on other domains
242  // when nonlocal constitutive models are used. They introduction is necessary to
243  // allow local averaging on domains without fine grain communication between domains).
244  if ( element->giveParallelMode() == Element_remote || !element->isActivated(tStep) ) {
245  continue;
246  }
247 
248  ma.matrixFromElement(mat, *element, tStep);
249 
250  if ( mat.isNotEmpty() ) {
251  ma.locationFromElement(floc, *element, fnum);
252  ma.locationFromElement(ploc, *element, pnum);
254  if ( element->giveRotationMatrix(R) ) {
255  mat.rotatedWith(R);
256  }
257 
258 #ifdef _OPENMP
259  #pragma omp critical
260 #endif
261  {
262  Kff->assemble(floc, mat);
263  Kfp->assemble(floc, ploc, mat);
264  Kpp->assemble(ploc, mat);
265  }
266  }
267  }
268  Kff->assembleBegin();
269  Kfp->assembleBegin();
270  Kpp->assembleBegin();
271 
272  Kff->assembleEnd();
273  Kfp->assembleEnd();
274  Kpp->assembleEnd();
275 #endif
276 
277  FloatMatrix grad_pert(nsd, nsd), rhs, sol(neq, nsd);
278  grad_pert.resize(nsd, nsd);
279  grad_pert.beUnitMatrix();
280  // Workaround since the matrix size is inflexible with custom dof numbering (so far, planned to be fixed).
281  IntArray grad_loc;
282  this->grad->giveLocationArray(this->grad_ids, grad_loc, pnum);
283  FloatMatrix pert(Kpp->giveNumberOfRows(), nsd);
284  pert.assemble(grad_pert, grad_loc, {1,2,3});
285  //pert.printYourself("pert");
286 
287  //printf("Kfp = %d x %d\n", Kfp->giveNumberOfRows(), Kfp->giveNumberOfColumns());
288  //printf("Kff = %d x %d\n", Kff->giveNumberOfRows(), Kff->giveNumberOfColumns());
289  //printf("Kpp = %d x %d\n", Kpp->giveNumberOfRows(), Kpp->giveNumberOfColumns());
290 
291  // Compute the solution to each of the pertubation of eps
292  Kfp->times(pert, rhs);
293  //rhs.printYourself("rhs");
294 
295  // Initial guess (Taylor assumption) helps KSP-iterations
296  for ( auto &n : domain->giveDofManagers() ) {
297  int k1 = n->giveDofWithID( this->dofs(0) )->__giveEquationNumber();
298  if ( k1 ) {
299  FloatArray *coords = n->giveCoordinates();
300  for ( int i = 1; i <= nsd; ++i ) {
301  sol.at(k1, i) = -(coords->at(i) - mCenterCoord.at(i));
302  }
303  }
304  }
305 
306  if ( solver->solve(*Kff, rhs, sol) & NM_NoSuccess ) {
307  OOFEM_ERROR("Failed to solve Kff");
308  }
309  // Compute the solution to each of the pertubation of eps
310  Kfp->timesT(sol, k); // Assuming symmetry of stiffness matrix
311  // This is probably always zero, but for generality
312  FloatMatrix tmpMat;
313  Kpp->times(pert, tmpMat);
314  k.subtract(tmpMat);
315  k.times( - 1.0 / ( this->domainSize(this->giveDomain(), this->set) + this->domainSize(this->giveDomain(), this->masterSet) ));
316 
317  // Temp workaround on sizing issue mentioned above:
318  FloatMatrix k2 = k;
319  k.beSubMatrixOf(k2, grad_loc, {1,2,3});
320 }
321 
322 
324 {
325  DofManager *master = this->domain->giveDofManager(this->slavemap[dof->giveDofManager()->giveNumber()]);
326  FloatArray *coords = dof->giveDofManager()->giveCoordinates();
327  FloatArray *masterCoords = master->giveCoordinates();
328 
329  FloatArray dx;
330  dx.beDifferenceOf(* coords, * masterCoords );
331 
332  masterContribs.resize(dx.giveSize() + 1);
333 
334  masterContribs.at(1) = 1.; // Master dof is always weight 1.0
335  for ( int i = 1; i <= dx.giveSize(); ++i ) {
336  masterContribs.at(i+1) = dx.at(i);
337  }
338 }
339 
340 
342 {
343  DofManager *master = this->domain->giveDofManager(this->slavemap[dof->giveDofManager()->giveNumber()]);
344  FloatArray dx, g;
345  dx.beDifferenceOf(* dof->giveDofManager()->giveCoordinates(), * master->giveCoordinates());
346  this->grad->giveUnknownVector(g, this->grad_ids, mode, tStep);
347  return val + g.dotProduct(dx);
348 }
349 
350 
352 {
353  if ( this->isGradDof(dof) ) {
354  int ind = grad_ids.findFirstIndexOf(dof->giveDofID()) - 1;
355  return this->mGradient(ind) * this->giveTimeFunction()->evaluateAtTime(tStep->giveTargetTime());
356  }
357 
358  DofManager *master = this->domain->giveDofManager(this->slavemap[dof->giveDofManager()->giveNumber()]);
359  double val = master->giveDofWithID(dof->giveDofID())->giveUnknown(field, mode, tStep);
360  return this->giveUnknown(val, mode, tStep, dof);
361 }
362 
363 
365 {
366  if ( this->isGradDof(dof) ) {
367  int ind = grad_ids.findFirstIndexOf(dof->giveDofID()) - 1;
368  return this->mGradient(ind) * this->giveTimeFunction()->evaluateAtTime(tStep->giveTargetTime());
369  }
370 
371  DofManager *master = this->domain->giveDofManager(this->slavemap[dof->giveDofManager()->giveNumber()]);
372 
373  if ( mode == VM_Incremental ) {
374  double val = master->giveDofWithID(dof->giveDofID())->giveUnknown(mode, tStep);
375  return this->giveUnknown(val, mode, tStep, dof);
376  }
377  double val = master->giveDofWithID(dof->giveDofID())->giveUnknown(mode, tStep);
378  return this->giveUnknown(val, mode, tStep, dof);
379 }
380 
381 
383 {
384  return this->isGradDof(dof);
385 }
386 
387 
389 {
390  int index = grad_ids.findFirstIndexOf(dof->giveDofID()) - 1;
391  return this->mGradient(index) * this->giveTimeFunction()->evaluateAtTime(tStep->giveTargetTime());
392 }
393 
394 
396 {
397  return this->isGradDof(dof);
398 }
399 
400 
402 {
403  return this->grad.get() == dof->giveDofManager();
404 }
405 
406 
408 {
409  IRResultType result;
410 
412  this->mCenterCoord = {0., 0., 0.};
414 
417 
419  //return PrescribedGradientHomogenization::initializeFrom(ir);
420 }
421 
422 
424 {
426  //PrescribedGradientHomogenization :: giveInputRecord(input);
429 
432 }
433 
434 
436 {
437  this->findSlaveToMasterMap();
438 }
439 } // end namespace oofem
The base class for all spatial localizers.
void setField(int item, InputFieldType id)
virtual bool isActivated(TimeStep *tStep)
Definition: element.C:793
The representation of EngngModel default unknown numbering.
void subtract(const FloatArray &src)
Subtracts array src to receiver.
Definition: floatarray.C:258
REGISTER_BoundaryCondition(BoundaryCondition)
Class and object Domain.
Definition: domain.h:115
Implementation for assembling internal forces vectors in standard monolithic, nonlinear FE-problems...
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition: femcmpnn.h:82
IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: activebc.h:75
SparseMtrx * createSparseMtrx(SparseMtrxType type)
Creates new instance of sparse matrix corresponding to given keyword.
Definition: classfactory.C:105
virtual int giveNumberOfMasterDofs(ActiveDof *dof)
Allows for active boundary conditions to handle their own special DOF.
Abstract class representing field of primary variables (those, which are unknown and are typically as...
Definition: primaryfield.h:104
Specialized numbering scheme for assembling only specified DofIDs.
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
void findSlaveToMasterMap()
This is the central support function, which finds the corresponding slave nodes for each master node...
void beSubMatrixOf(const FloatMatrix &src, int topRow, int bottomRow, int topCol, int bottomCol)
Assigns to the receiver the sub-matrix of another matrix.
Definition: floatmatrix.C:962
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
virtual Dof * giveMasterDof(ActiveDof *dof, int mdof)
Give the pointer to master dof belonging to active DOF.
virtual void computeTangent(FloatMatrix &E, TimeStep *tStep)
virtual FloatArray * giveCoordinates()
Definition: dofmanager.h:382
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
Definition: domain.C:433
Implementation for assembling tangent matrices in standard monolithic FE-problems.
double giveTargetTime()
Returns target time.
Definition: timestep.h:146
Abstract base class for all finite elements.
Definition: element.h:145
Base class for dof managers.
Definition: dofmanager.h:113
std::vector< std::unique_ptr< DofManager > > & giveDofManagers()
Definition: domain.h:400
int giveNumber()
Returns domain number.
Definition: domain.h:266
int giveNumberOfElements() const
Returns number of elements in domain.
Definition: domain.h:434
virtual double evalNXIntegral(int boundary, const FEICellGeometry &cellgeo)
Computes the integral .
Definition: feinterpol.h:420
int giveNumberOfSpatialDimensions()
Returns number of spatial dimensions.
Definition: domain.C:1067
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
virtual FEInterpolation * giveInterpolation() const
Definition: element.h:629
virtual bool hasBc(Dof *dof, TimeStep *tStep)
Returns the prescribed value of a dof (if any).
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
Definition: floatarray.C:341
#define NM_NoSuccess
Numerical method failed to solve problem.
Definition: nmstatus.h:48
Class representing a general abstraction for finite element interpolation class.
Definition: feinterpol.h:132
bool isNotEmpty() const
Tests for empty matrix.
Definition: floatmatrix.h:162
virtual void assemble(SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma, const UnknownNumberingScheme &s, Domain *domain)
Assembles characteristic matrix of required type into given sparse matrix.
Definition: engngm.C:803
virtual double domainSize(Domain *d, int setNum)
virtual DofManager * giveInternalDofManager(int i)
Gives an internal dof manager from receiver.
virtual void postInitialize()
Performs post initialization steps.
Element * giveElement(int n)
Service for accessing particular domain fe element.
Definition: domain.C:160
double dotProduct(const FloatArray &x) const
Computes the dot product (or inner product) of receiver and argument.
Definition: floatarray.C:463
#define OOFEM_ERROR(...)
Definition: error.h:61
DofIDItem
Type representing particular dof type.
Definition: dofiditem.h:86
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
virtual Node * giveNodeClosestToPoint(const FloatArray &coords, double maxDist)=0
Returns the node closest to the given coordinate.
Implementation for assembling external forces vectors in standard monolithic FE-problems.
void times(double f)
Multiplies receiver by factor f.
Definition: floatmatrix.C:1594
Set of elements, boundaries, edges and/or nodes.
Definition: set.h:66
SpatialLocalizer * giveSpatialLocalizer()
Returns receiver&#39;s associated spatial localizer.
Definition: domain.C:1184
void rotatedWith(const FloatMatrix &r, char mode= 'n')
Returns the receiver &#39;a&#39; transformed using give transformation matrix r.
Definition: floatmatrix.C:1557
const IntArray & giveNodeList()
Returns list of all nodes within set.
Definition: set.C:146
DofIDItem giveDofID() const
Returns DofID value of receiver, which determines type of of unknown connected to receiver (e...
Definition: dof.h:276
Wrapper around element definition to provide FEICellGeometry interface.
Definition: feinterpol.h:95
Set * giveSet(int n)
Service for accessing particular domain set.
Definition: domain.C:363
#define _IFT_TransportGradientPeriodic_jump
virtual bool giveRotationMatrix(FloatMatrix &answer)
Transformation matrices updates rotation matrix between element-local and primary DOFs...
Definition: element.C:259
IntArray dofs
Dofs that b.c. is applied to (relevant for Dirichlet type b.c.s).
Abstract base class for all active boundary conditions.
Definition: activebc.h:63
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
Class representing "slave" degree of freedom with an active boundary condition.
Definition: activedof.h:48
void subtract(const FloatMatrix &a)
Subtracts matrix from the receiver.
Definition: floatmatrix.C:1084
#define _IFT_TransportGradientPeriodic_gradient
virtual int giveNumberOfInternalDofManagers()
Gives the number of internal dof managers.
int giveNextFreeDofID(int increment=1)
Gives the next free dof ID.
Definition: domain.C:1411
Class representing vector of real numbers.
Definition: floatarray.h:82
SparseLinearSystemNM * createSparseLinSolver(LinSystSolverType st, Domain *d, EngngModel *m)
Creates new instance of SparseLinearSystemNM corresponding to given type.
Definition: classfactory.C:120
elementParallelMode giveParallelMode() const
Return elementParallelMode of receiver.
Definition: element.h:1069
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
virtual double giveBcValue(Dof *dof, ValueModeType mode, TimeStep *tStep)
Returns the prescribed value of a dof (if any).
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
double giveUnknown(double val, ValueModeType mode, TimeStep *tStep, ActiveDof *dof)
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
The representation of EngngModel default prescribed unknown numbering.
Dof * giveDofWithID(int dofID) const
Returns DOF with given dofID; issues error if not present.
Definition: dofmanager.C:119
void followedBy(const IntArray &b, int allocChunk=0)
Appends array b at the end of receiver.
Definition: intarray.C:145
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Class representing the a dynamic Input Record.
void times(double s)
Multiplies receiver with scalar.
Definition: floatarray.C:818
ClassFactory & classFactory
Definition: classfactory.C:59
#define new
Element in active domain is only mirror of some remote element.
Definition: element.h:102
#define _IFT_TransportGradientPeriodic_centerCoords
virtual FloatArray * giveCoordinates()
Definition: node.h:114
Domain * giveDomain() const
Definition: femcmpnn.h:100
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
virtual void computeField(FloatArray &sigma, TimeStep *tStep)
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
DofManager * giveDofManager() const
Definition: dof.h:123
virtual void computeDofTransformation(ActiveDof *dof, FloatArray &masterContribs)
int giveSize() const
Definition: intarray.h:203
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
virtual bool isPrimaryDof(ActiveDof *dof)
Checks to see if the dof is a primary DOF.
Node * giveNode(int n)
Service for accessing particular domain node.
Definition: domain.h:371
the oofem namespace is to define a context or scope in which all oofem names are defined.
void assemble(const FloatMatrix &src, const IntArray &loc)
Assembles the contribution using localization array into receiver.
Definition: floatmatrix.C:251
Class implementing node in finite element mesh.
Definition: node.h:87
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
int giveNumber() const
Definition: femcmpnn.h:107
DofManager * giveDofManager(int n)
Service for accessing particular domain dof manager.
Definition: domain.C:314
virtual double evaluateAtTime(double t)
Returns the value of the function at given time.
Definition: function.C:76
void assembleVector(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
Assembles characteristic vector of required type from dofManagers, element, and active boundary condi...
Definition: engngm.C:986
Class representing solution step.
Definition: timestep.h:80
#define _IFT_TransportGradientPeriodic_masterSet
int findFirstIndexOf(int value) const
Finds index of first occurrence of given value in array.
Definition: intarray.C:331
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:32 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011