LifeV
BCBase.hpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3  *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23  *******************************************************************************
24  */
25 //@HEADER
26 
27 /*!
28  @file
29  @brief classes to handle boundary conditions
30 
31  @author M.A. Fernandez
32  @author M.Prosi
33  @contributor Lucia Mirabella <lucia.mirabell@gmail.com>
34  @contributor Mauro Perego <perego.mauro@gmail.com>
35  @maintainer Mauro Perego <perego.mauro@gmail.com>
36 
37  @date 06-2002
38 
39  @date 11-2002
40 
41  This file contains the classes which may be used to store boundary
42  conditions. A boundary condition object will have the following
43  elements:
44 <ol>
45  <li> a name identifying a specific BC,
46 
47  <li> a flag identifying a specific part of the mesh boundary,
48 
49  <li> a type (Natural, Robin, Flux, Resistance,
50  Essential, EssentialEdges, EssentialVertices),
51 
52  <li> a mode of implementation (Scalar, Full, Component, Normal,
53  Tangential, Resistance, Directional),
54 
55  <li> a functor holding the data function,
56 
57  <li> a bool vector describing the components involved in this boundary condition
58 
59  <li> a list of pointers to identifiers allowing the user to know to
60  which DOF the boundary condition applies.
61 </ol>
62  */
63 
64 #ifndef BCBASE_H
65 #define BCBASE_H
66 
67 #include <lifev/core/LifeV.hpp>
68 
69 #include <lifev/core/util/LifeDebug.hpp>
70 
71 #include <lifev/core/array/VectorEpetra.hpp>
72 
73 #include <lifev/core/mesh/MarkerDefinitions.hpp>
74 
75 #include <lifev/core/fem/BCIdentifier.hpp>
76 #include <lifev/core/fem/DOF.hpp>
77 #include <lifev/core/fem/CurrentFE.hpp>
78 #include <lifev/core/fem/CurrentFEManifold.hpp>
79 #include <lifev/core/fem/BCVector.hpp>
80 #include <lifev/core/fem/BCFunction.hpp>
81 
82 namespace LifeV
83 {
84 
85 /*! @enum bcType_Type
86  Boundary condition basic types: Natural, Robin, Flux, Resistance, Periodic, Essential, EssentialEdges, EssentialVertices
87  */
89 {
90  Natural, /*!< Neumann boundary conditions */
91  Robin, /*!< Robin boundary conditions */
92  Flux, /*!< Flux boundary conditions */
93  Resistance, /*!< Resistance boundary conditions */
94  Essential, /*!< Dirichlet boundary conditions */
95  EssentialEdges, /*!< Dirichlet boundary conditions on edges */
96  EssentialVertices /*!< Dirichlet boundary conditions on vertices */
97 };
98 
99 /*! @enum bcMode_Type
100  Type for boundary conditions application modes
101  */
103 {
104  Scalar, /*!< To be used for scalar problems */
105  Full, /*!< To be used for vector problems, when the boundary condition involves all components*/
106  Component, /*!< To be used for vector problems, when the boundary condition DOESN'T involve all components*/
107  Normal, /*!< To be used for vector problems, when the boundary condition involve the normal component*/
108  Tangential, /*!< To be used for vector problems, when the boundary condition involve the tangential component*/
109  Directional /*!< To be used for vector problems, when the boundary condition involve a specific direction*/
110 };
111 
112 
113 
114 /*! Type of the name of the Boundary conditions
115  */
116 typedef std::string bcName_Type;
117 
119 
121 
122 //! BCBase - Base class which holds the boundary condition information
123 /*!
124  @author M.A. Fernandez
125  @author M.Prosi
126  @see
127 
128  For each boundary condition the user must give
129 <ol>
130  <li> a name,
131 
132  <li> a mesh flag,
133 
134  <li> a type,
135 
136  <li> a mode,
137 
138  <li> a data BCFunction,
139 
140  <li> three (or two in 2D) bools describing the components involved in
141  this boundary condition.
142 </ol>
143  Finally the list of pointers to identifiers will be updated in the
144  DOF class (\c BCHandler::bcUpdate method).
145 
146  \warning The idea is to not use inheritance from this class
147 
148  */
149 class BCBase
150 {
151 public:
152 
153  //! BCHandle is a friend class of BCBase
154  friend class BCHandler;
155 
156  //! @name Public Types
157  //@{
158 
159  //@}
160 
161 
162  //! @name Constructor & Destructor
163  //@{
164 
165  //! Empty constructor
166  BCBase();
167 
168  //! Constructor for BCBase
169  /*!
170  @param name the name of the boundary condition
171  @param flag the mesh flag identifying the part of the mesh where
172  the boundary condition applies
173  @param type the boundary condition type: Natural, Essential, Robin, Flux, Resistance
174  @param mode the boundary condition mode: Scalar, Full,
175  Component, Normal, Tangential, Directional
176  @param bcFunction the function holding the user defined function defining the boundary condition
177  @param components vector of IDs storing the list of components involved in this boundary condition
178  */
179  BCBase ( const bcName_Type& name,
180  const bcFlag_Type& flag,
181  const bcType_Type& type,
182  const bcMode_Type& mode,
183  BCFunctionBase& bcFunction,
184  const bcComponentsVec_Type& components );
185 
186  //! Constructor for BCBase without specifying components for Scalar, Tangential or Normal mode problems
187  /*!
188  @param name the name of the boundary condition
189  @param flag the mesh flag identifying the part of the mesh where
190  the boundary condition applies
191  @param type the boundary condition type: Natural, Essential, Robin, Flux, Resistance
192  @param mode the boundary condition mode: Scalar, Normal, Tangential
193  @param bcFunction the BCFunctionBase holding the function defining the boundary condition
194  involved in this boundary condition
195  */
196  BCBase ( const bcName_Type& name,
197  const bcFlag_Type& flag,
198  const bcType_Type& type,
199  const bcMode_Type& mode,
200  BCFunctionBase& bcFunction );
201 
202  //! Constructor for BCBase without specifying components for without list of components for Full mode problems
203  /*!
204  @param name the name of the boundary condition
205  @param flag the mesh flag identifying the part of the mesh where
206  the boundary condition applies
207  @param type the boundary condition type: Natural, Essential, Robin, Flux, Resistance
208  @param mode the boundary condition mode: Full
209  @param bcFunction BCFunctionBase holding the function defining the boundary condition
210  @param numberOfComponents number of components involved
211  in this boundary condition
212  */
213  BCBase ( const bcName_Type& name,
214  const bcFlag_Type& flag,
215  const bcType_Type& type,
216  const bcMode_Type& mode,
217  BCFunctionBase& bcFunction,
218  const UInt& numberOfComponents );
219 
220  //! Constructor for BCBase to prescribe a boundary condition from a vector of dof values
221  /*!
222  @param name the name of the boundary condition
223  @param flag the mesh flag identifying the part of the mesh where
224  the boundary condition applies
225  @param type the boundary condition type: Natural, Essential, Robin, Flux, Resistance
226  @param mode the boundary condition mode: Scalar, Full,
227  Component, Normal, Tangential, Directional
228  @param vector the vector containing the dof values to be prescribed as boundary data
229  @param components vector of IDs storing the list of components involved in this boundary condition
230  */
231  BCBase ( const bcName_Type& name,
232  const bcFlag_Type& flag,
233  const bcType_Type& type,
234  const bcMode_Type& mode,
235  BCVectorBase& vector,
236  const bcComponentsVec_Type& components );
237 
238  //! Constructor for BCBase to prescribe a boundary condition from a vector of dof values without specifying components for Scalar, Tangential or Normal mode problems
239  /*!
240  @param name the name of the boundary condition
241  @param flag the mesh flag identifying the part of the mesh where
242  the boundary condition applies
243  @param type the boundary condition type: Natural, Essential, Robin, Flux, Resistance
244  @param mode the boundary condition mode: Scalar, Full,
245  Component, Normal, Tangential, Directional
246  @param bcVector the vector containing the dof values to be prescribed as boundary data
247  */
248  BCBase ( const bcName_Type& name,
249  const bcFlag_Type& flag,
250  const bcType_Type& type,
251  const bcMode_Type& mode,
252  BCVectorBase& bcVector );
253 
254  //! Constructor for BCBase to prescribe a boundary condition from a vector of dof values without specifying components for Full mode problems
255  /*!
256  @param name the name of the boundary condition
257  @param flag the mesh flag identifying the part of the mesh where
258  the boundary condition applies
259  @param type the boundary condition type: Natural, Essential, Robin, Flux, Resistance
260  @param mode the boundary condition mode: Scalar, Full,
261  Component, Normal, Tangential, Directional
262  @param bcVector the vector containing the dof values to be prescribed as boundary data
263  @param numberOfComponents number of components involved in this boundary condition
264  */
265  BCBase ( const bcName_Type& name,
266  const bcFlag_Type& flag,
267  const bcType_Type& type,
268  const bcMode_Type& mode,
269  BCVectorBase& bcVector,
270  const UInt& numberOfComponents );
271 
272  //! Constructor for BCBase. The BC function depends on a generic FE vector (e.g. the solution at the previous time step)
273  /*!
274  @param name the name of the boundary condition
275  @param flag the mesh flag identifying the part of the mesh where
276  the boundary condition applies
277  @param type the boundary condition type: Natural, Essential, Robin, Flux, Resistance
278  @param mode the boundary condition mode: Scalar, Full,
279  Component, Normal, Tangential, Directional
280  @param bcFunctionFEVectorDependent the BCFunctionUDepBase holding the function (depending on a generic finite element vector ) defining the boundary condition
281  @param components vector of IDs storing the list of components involved in this boundary condition
282  */
283  BCBase ( const bcName_Type& name,
284  const bcFlag_Type& flag,
285  const bcType_Type& type,
286  const bcMode_Type& mode,
287  BCFunctionUDepBase& bcFunctionFEVectorDependent,
288  const bcComponentsVec_Type& components );
289 
290  //! Constructor for BCBase without specifying components for Scalar, Tangential or Normal mode problems. The BC function depends on a generic FE vector (e.g. the solution at the previous time step)
291  /*!
292  @param name the name of the boundary condition
293  @param flag the mesh flag identifying the part of the mesh where
294  the boundary condition applies
295  @param type the boundary condition type: Natural, Essential, Robin, Flux, Resistance
296  @param mode the boundary condition mode: Scalar, Normal, Tangential
297  @param bcFunctionFEVectorDependent the BCFunctionUDepBase holding the function (depending on a generic finite element vector ) defining the boundary condition
298  */
299  BCBase ( const bcName_Type& name,
300  const bcFlag_Type& flag,
301  const bcType_Type& type,
302  const bcMode_Type& mode,
303  BCFunctionUDepBase& bcFunctionFEVectorDependent);
304 
305  //! Constructor for BCBase without specifying components for Full mode problems. The BC function depends on a generic FE vector (e.g. the solution at the previous time step)
306  /*!
307  @param name the name of the boundary condition
308  @param flag the mesh flag identifying the part of the mesh where
309  the boundary condition applies
310  @param type the boundary condition type: Natural, Essential, Robin, Flux, Resistance
311  @param mode the boundary condition mode: Full
312  @param bcFunctionFEVectorDependent the BCFunctionUDepBase holding the function (depending on a generic finite element vector ) defining the boundary condition
313  @param numberOfComponents number of components involved in this boundary condition
314  */
315  BCBase ( const bcName_Type& name,
316  const bcFlag_Type& flag,
317  const bcType_Type& type,
318  const bcMode_Type& mode,
319  BCFunctionUDepBase& bcFunctionFEVectorDependent,
320  const UInt& numberOfComponents );
321 
322  //! Copy constructor for BCBase
323  /*!
324  @param bcBase a BCBase object
325  @warning This is not a copy constructor since the lists are built empty
326  */
327  BCBase ( const BCBase& bcBase );
328 
329  //! Destructor
330  ~BCBase();
331  //@}
332 
333 
334  //! @name Methods
335  //@{
336  //! Returns the index of the component of the solution associated to the iComponent-th component prescribed in the boundary condition at hand
337  /*!
338  Example: the solution has 4 components and we prescribe a boundary condition on component 0 and 3.
339  Then, component(1) returns 3, since 3 is the index of the 2nd BC prescribed.
340 
341  @param iComponent the "local" component
342  @return the index of the component of the solution associated to the iComponent-th component prescribed in the boundary condition at hand
343  */
344  ID component ( const ID i ) const;
345 
346  //! Returns true if robin coefficient (in BC Vector ) is a VectorEpetra, false if it is scalar (default alphaCoef=1)
347  /*!
348  @return true if robin coefficient (in BC Vector ) is a VectorEpetra, false if it is scalar
349  */
350  bool isRobinCoeffAVector() const;
351 
352  //! Returns true if beta coefficient (in BC Vector ) is a VectorEpetra (betaVec) (default betaCoef=1)
353  /*!
354  @return true if beta coefficient (in BC Vector ) is a VectorEpetra (betaVec)
355  */
356  bool isBetaCoeffAVector() const;
357 
358  //! Returns the value of the robin coefficient vector (in BC Vector)
359  /*!
360  corresponding to DOF iDof and component iComponent
361  @param iDof DOF we are looking for in RobinVec
362  @param iComponent component we are looking for in RobinVec
363  @return value of the robin coefficient vector (in BC Vector) corresponding to iDof and iComponent
364  */
365  Real robinCoeffVector ( const ID& iDof, const ID& iComponent ) const;
366 
367  //! Returns the value of the beta coefficient vector (in BC Vector)
368  /*!
369  corresponding to DOF iDof and component iComponent
370  @param iDof DOF we are looking for in BetaVec
371  @param iComponent component we are looking for in BetaVec
372  @return value of the Beta coefficient vector (in BC Vector) corresponding to iDof and iComponent
373  */
374  Real betaCoeffVector ( const ID& iDof, const ID& iComponent ) const;
375 
376  //! Returns a pointer to the BCFunctionBase object
377  /*!
378  @return pointer to the BCFunctionBase object
379  */
380  const BCFunctionBase* pointerToFunctor() const;
381 
382  //! Returns a pointer to the BCFunctionUDepBase object
383  /*!
384  @return pointer to the BCFunctionUDepBase object
385  */
387 
388  //! Returns a pointer to the BCVector object
389  /*!
390  @return pointer to the BCVector object
391  */
392  const BCVectorBase* pointerToBCVector() const;
393 
394  //! Adds a new identifier to the list
395  /*!
396  @param identifierToAddPtr pointer to the BCIdentifierBase object to be added
397  */
398  void addBCIdentifier ( BCIdentifierBase* identifierToAddPtr );
399 
400  //! Returns the size of the identifiers list
401  /*!
402  @return the size of the identifiers list
403  */
404  UInt list_size() const;
405 
406  //! Method that writes info in output
407  /*!
408  @param verbose to specify the level of verbosity (false by default)
409  @param outStream to specify the output stream (std::cout by default)
410  */
411  std::ostream& showMe ( bool verbose = false, std::ostream& outStream = std::cout ) const;
412  //@}
413 
414 
415  //! @name Operators
416  //@{
417 
418  //! The assignment operator for BCBase
419  /*!
420  @param bcBase a BCBase object
421  @return Reference to a new BCBase with the same
422  content of bcBase
423  */
424  BCBase& operator= ( const BCBase& bcBase);
425 
426  //! Returns a pointer to the (i)-th element of the list of identifiers
427  /*!
428  The list of identifiers has to be finalized before calling this operator.
429  @param i index of the element in the list of identifier that we want to be returned (starting from 0)
430  */
431  const BCIdentifierBase* operator[] ( const ID& i ) const;
432 
433  //! Overloading function operator by calling the BCFunctionBase user specified function
434  /*!
435  @param t time
436  @param x coordinate
437  @param y coordinate
438  @param z coordinate
439  @param iComponent component of the vector function
440  @return iComponent of the user defined function evaluated in (t,x,y,z)
441  */
442  Real operator() ( const Real& t, const Real& x, const Real& y,
443  const Real& z, const ID& iComponent ) const;
444 
445  //! Overloading function operator by calling the BCFunctionUDepBase user specified function
446  /*!
447  @param t time
448  @param x coordinate
449  @param y coordinate
450  @param z coordinate
451  @param iComponent component of the vector function
452  @param u value of the FE vector in t, x, y, z, component iComp
453  @return i-component of the user defined function evaluated in (t,x,y,z,u)
454  */
455  Real operator() ( const Real& t, const Real& x, const Real& y,
456  const Real& z, const ID& iComponent, const Real& u ) const;
457 
458 
459  //! Overloading function operator by querying the BCVector in DOF iDof and component iComponent
460  /*!
461  @param iDof global dof index
462  @param iComponent component index
463  */
464  Real operator() ( const ID& iDof, const ID& iComponent ) const;
465 
466  //! Overloading "less-than" operator between BCBase objects
467  /*!
468  The "smaller" (or weaker) boundary conditions is the one to be applied first
469  @param bcBase1 first BCBase to compare
470  @param bcBase2 second BCBase to compare
471  @return True if bcBase1 is smaller, False if bcBase1 is bigger
472  */
473  friend bool operator< ( const BCBase& bcBase1, const BCBase& bcBase2 )
474  {
475  if (bcBase1.type() == bcBase2.type() )
476  {
477  return (bcBase1.flag() < bcBase2.flag() );
478  }
479  else
480  {
481  return ( bcBase1.type() < bcBase2.type() );
482  }
483  }
484 
485 
486  //! Overloading "is-equal" operator for BCBase objects
487  /*!
488  Check if the flag of bcBase is equal to flag argument
489  @param bcBase BCBase to check
490  @param flag bcFlag_Type to be compared with bcBase flag
491  @return True if bcBase's flag is equal to flag
492  */
493  friend bool operator== ( const BCBase& bcBase, const bcFlag_Type flag )
494  {
495  return bcBase.flag() == flag;
496  }
497 
498 
499 
500  //@}
501 
502  //! @name Set Methods
503  //@{
504  //! set BCVectorBase boundary condition
505  /*!
506  @param bcVector to be set in BCBase class
507  */
508  void setBCVector ( const BCVectorBase& bcVector );
509 
510  //! set BCFunctionBase boundary condition
511  /*!
512  @param bcFunction to be set in BCBase class
513  */
514  void setBCFunction ( const BCFunctionBase& bcFunction );
515 
516  //! set BCFunctionUDepBase boundary condition
517  /*!
518  @param bcFunctionFEVectorDependent to be set in BCBase class
519  */
520  void setBCFunction ( const BCFunctionUDepBase& bcFunctionFEVectorDependent );
521 
522  //! Set the BC offset
523  /*!
524  @param bcOffset to be set in BCBase class
525  */
526  void setOffset (int bcOffset)
527  {
528  M_offset = bcOffset;
529  }
530 
531  //! Set the BC type
532  /*!
533  @param bcOffset to be set in BCBase class
534  */
535  void setType (const bcType_Type& bcType)
536  {
537  M_type = bcType;
538  }
539  //@}
540 
541  //! @name Get Methods
542  //@{
543 
544  //! Returns the boundary condition name
545  /*!
546  @return boundary condition name
547  */
548  std::string name() const;
549 
550  //! Returns the flag associated to the boundary condition name
551  /*!
552  @return boundary condition flag
553  */
554  bcFlag_Type flag() const;
555 
556  //! Returns the boundary condition type
557  /*!
558  @return boundary condition type
559  */
560  bcType_Type type() const;
561 
562  //! Returns the boundary condition mode
563  /*!
564  @return boundary condition mode
565  */
566  bcMode_Type mode() const;
567 
568  //! Returns the number of components involved in this boundary condition
569  /*!
570  @return number of components prescribed by this boundary condition
571  */
572  UInt numberOfComponents() const;
573 
574 
575  //! Returns the offset associated to this boundary condition
576  /*!
577  @return offset associated to this boundary condition
578  */
579  const int& offset() const
580  {
581  return M_offset;
582  }
583 
584  //! Returns the value of the robin coefficient (in BC Vector)
585  /*!
586  @return value of the robin coefficient (in BC Vector)
587  */
588  Real robinCoeff() const;
589 
590  //! Returns the value of the resistance coefficient (in BC Vector)
591  /*!
592  @return value of the resistance coefficient (in BC Vector)
593  */
594  Real resistanceCoeff() const;
595 
596  //! Returns the value of the beta coefficient (in BC Vector)
597  /*!
598  @return value of the beta coefficient (in BC Vector)
599  */
600  Real betaCoeff() const;
601 
602  //! Returns True if a FE BCVector has been provided to the class, False otherwise
603  /*!
604  @return True if FE BCVector has been provided to the class, False otherwise
605  */
606  bool isDataAVector() const;
607 
608  //! Returns whether the list is finalized and the vector of ID's is then accessible.
609  /*!
610  @return M_finalized private member
611  */
612  bool finalized() const;
613 
614  //! Returns True if the BCBase is based on a BCFunctionUDepBase function, False otherwise
615  /*!
616  @return True if the BCBase is based on a BCFunctionUDepBase function, False otherwise
617  */
618  bool isUDep() const;
619 
620  //!< Copy content of M_idSet into M_idVector, clear M_idSet
621  void copyIdSetIntoIdVector();
622  //@}
623 private:
624 
625  std::string M_name; //!< name of the boundary condition
626 
627  bcFlag_Type M_flag; //!< flag identifying a specific part of the mesh boundary
628 
629  bcType_Type M_type; //!< the boundary condition type
630 
631  bcMode_Type M_mode; //!< the boundary condition mode of application
632 
633  bcComponentsVec_Type M_components; //! the list of components involved in this BC
634 
635  std::shared_ptr<BCFunctionBase> M_bcFunction; //!< Pointer to a user defined BC function
636 
637  std::shared_ptr<BCFunctionUDepBase> M_bcFunctionFEVectorDependent; //!< Pointer to a user defined BC function (depending on a generic FE vector)
638 
639  std::shared_ptr<BCVectorBase > M_bcVector; //!< Pointer to a user given BC vector
640 
641  bool M_isStored_BcVector; //! True if a FE BCVector has been provided
642 
643  bool M_isStored_BcFunctionVectorDependent; //!< True if the BCBase is based on a BCFunctionUDepBase function, False otherwise
644 
645  std::set<std::shared_ptr<BCIdentifierBase>, BCIdentifierComparison> M_idSet; //!< set of pointers to identifiers allowing the user to get hold the DOF to which the BC applies
646 
647  std::vector<std::shared_ptr<BCIdentifierBase> > M_idVector; //!< container for id's when the list is finalized
648 
649  int M_offset; //!< boundary condition offset
650 
651  bool M_finalized; //!< True, when M_idVector is finalized
652 
653 };
654 
655 
656 
657 
658 
659 }
660 
661 #endif
BCBase & operator=(const BCBase &bcBase)
The assignment operator for BCBase.
Definition: BCBase.cpp:606
BCBase(const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCVectorBase &vector, const bcComponentsVec_Type &components)
Constructor for BCBase to prescribe a boundary condition from a vector of dof values.
Definition: BCBase.cpp:195
bool isBetaCoeffAVector() const
Returns true if beta coefficient (in BC Vector ) is a VectorEpetra (betaVec) (default betaCoef=1) ...
Definition: BCBase.cpp:485
bool isRobinCoeffAVector() const
Returns true if robin coefficient (in BC Vector ) is a VectorEpetra, false if it is scalar (default a...
Definition: BCBase.cpp:472
bcMode_Type M_mode
the boundary condition mode of application
Definition: BCBase.hpp:631
BCBase(const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCVectorBase &bcVector, const UInt &numberOfComponents)
Constructor for BCBase to prescribe a boundary condition from a vector of dof values without specifyi...
Definition: BCBase.cpp:275
BCBase(const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCFunctionUDepBase &bcFunctionFEVectorDependent, const UInt &numberOfComponents)
Constructor for BCBase without specifying components for Full mode problems. The BC function depends ...
Definition: BCBase.cpp:384
bcType_Type type() const
Returns the boundary condition type.
Definition: BCBase.cpp:717
BCFunctionUDepBase - class that holds the function used for prescribing boundary conditions.
Definition: BCFunction.hpp:380
markerID_Type bcFlag_Type
Definition: BCBase.hpp:118
Real betaCoeffVector(const ID &iDof, const ID &iComponent) const
Returns the value of the beta coefficient vector (in BC Vector)
Definition: BCBase.cpp:513
Real robinCoeffVector(const ID &iDof, const ID &iComponent) const
Returns the value of the robin coefficient vector (in BC Vector)
Definition: BCBase.cpp:500
bcComponentsVec_Type M_components
Definition: BCBase.hpp:633
void addBCIdentifier(BCIdentifierBase *identifierToAddPtr)
Adds a new identifier to the list.
Definition: BCBase.cpp:544
Real betaCoeff() const
Returns the value of the beta coefficient (in BC Vector)
Definition: BCBase.cpp:760
BCHandler - class for handling boundary conditions.
Definition: BCHandler.hpp:100
std::string M_name
name of the boundary condition
Definition: BCBase.hpp:625
bcMode_Type
Definition: BCBase.hpp:102
bcFlag_Type flag() const
Returns the flag associated to the boundary condition name.
Definition: BCBase.cpp:712
std::shared_ptr< BCVectorBase > M_bcVector
Pointer to a user given BC vector.
Definition: BCBase.hpp:639
bool M_isStored_BcVector
Definition: BCBase.hpp:641
bcType_Type M_type
the boundary condition type
Definition: BCBase.hpp:629
BCBase(const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCFunctionBase &bcFunction, const UInt &numberOfComponents)
Constructor for BCBase without specifying components for without list of components for Full mode pro...
Definition: BCBase.cpp:162
bool isDataAVector() const
Returns True if a FE BCVector has been provided to the class, False otherwise.
Definition: BCBase.cpp:774
ID markerID_Type
markerID_Type is the type used to store the geometric entity marker IDs
Definition: Marker.hpp:81
void updateInverseJacobian(const UInt &iQuadPt)
std::shared_ptr< BCFunctionBase > M_bcFunction
the list of components involved in this BC
Definition: BCBase.hpp:635
BCBase(const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCFunctionBase &bcFunction, const bcComponentsVec_Type &components)
Constructor for BCBase.
Definition: BCBase.cpp:77
Real operator()(const Real &t, const Real &x, const Real &y, const Real &z, const ID &iComponent) const
Overloading function operator by calling the BCFunctionBase user specified function.
Definition: BCBase.cpp:645
BCFunctionBase - class that holds the function used for prescribing boundary conditions.
Definition: BCFunction.hpp:77
UInt numberOfComponents() const
Returns the number of components involved in this boundary condition.
Definition: BCBase.cpp:727
std::vector< ID > bcComponentsVec_Type
Definition: BCBase.hpp:120
bool M_finalized
True, when M_idVector is finalized.
Definition: BCBase.hpp:651
BCVectorBase - class that holds the FE vectors used for prescribing boundary conditions.
Definition: BCVector.hpp:74
BCBase(const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCFunctionUDepBase &bcFunctionFEVectorDependent)
Constructor for BCBase without specifying components for Scalar, Tangential or Normal mode problems...
Definition: BCBase.cpp:333
uint32_type ID
IDs.
Definition: LifeV.hpp:194
void setBCFunction(const BCFunctionBase &bcFunction)
set BCFunctionBase boundary condition
Definition: BCBase.cpp:687
bcMode_Type mode() const
Returns the boundary condition mode.
Definition: BCBase.cpp:722
void setBCVector(const BCVectorBase &bcVector)
set BCVectorBase boundary condition
Definition: BCBase.cpp:679
bool M_isStored_BcFunctionVectorDependent
True if a FE BCVector has been provided.
Definition: BCBase.hpp:643
BCBase()
Empty constructor.
Definition: BCBase.cpp:73
const int & offset() const
Returns the offset associated to this boundary condition.
Definition: BCBase.hpp:579
friend bool operator<(const BCBase &bcBase1, const BCBase &bcBase2)
Overloading "less-than" operator between BCBase objects.
Definition: BCBase.hpp:473
bool finalized() const
Returns whether the list is finalized and the vector of ID&#39;s is then accessible.
Definition: BCBase.cpp:779
std::shared_ptr< BCFunctionUDepBase > M_bcFunctionFEVectorDependent
Pointer to a user defined BC function (depending on a generic FE vector)
Definition: BCBase.hpp:637
Real operator()(const ID &iDof, const ID &iComponent) const
Overloading function operator by querying the BCVector in DOF iDof and component iComponent.
Definition: BCBase.cpp:660
BCBase(const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCVectorBase &bcVector)
Constructor for BCBase to prescribe a boundary condition from a vector of dof values without specifyi...
Definition: BCBase.cpp:221
std::string bcName_Type
Definition: BCBase.hpp:116
bool isUDep() const
Returns True if the BCBase is based on a BCFunctionUDepBase function, False otherwise.
Definition: BCBase.cpp:784
BCIdentifierBase - Base class holding DOF identifiers for implementing BC.
int M_offset
boundary condition offset
Definition: BCBase.hpp:649
Real resistanceCoeff() const
Returns the value of the resistance coefficient (in BC Vector)
Definition: BCBase.cpp:746
std::ostream & showMe(bool verbose=false, std::ostream &outStream=std::cout) const
Method that writes info in output.
Definition: BCBase.cpp:557
void setOffset(int bcOffset)
Set the BC offset.
Definition: BCBase.hpp:526
double Real
Generic real data.
Definition: LifeV.hpp:175
BCBase(const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCFunctionBase &bcFunction)
Constructor for BCBase without specifying components for Scalar, Tangential or Normal mode problems...
Definition: BCBase.cpp:100
const BCIdentifierBase * operator[](const ID &i) const
Returns a pointer to the (i)-th element of the list of identifiers.
Definition: BCBase.cpp:638
friend bool operator==(const BCBase &bcBase, const bcFlag_Type flag)
Overloading "is-equal" operator for BCBase objects.
Definition: BCBase.hpp:493
bcType_Type
Definition: BCBase.hpp:88
void setType(const bcType_Type &bcType)
Set the BC type.
Definition: BCBase.hpp:535
void setBCFunction(const BCFunctionUDepBase &bcFunctionFEVectorDependent)
set BCFunctionUDepBase boundary condition
Definition: BCBase.cpp:695
ID component(const ID i) const
Returns the index of the component of the solution associated to the iComponent-th component prescrib...
Definition: BCBase.cpp:466
const BCFunctionBase * pointerToFunctor() const
Returns a pointer to the BCFunctionBase object.
Definition: BCBase.cpp:528
Real operator()(const Real &t, const Real &x, const Real &y, const Real &z, const ID &iComponent, const Real &u) const
Overloading function operator by calling the BCFunctionUDepBase user specified function.
Definition: BCBase.cpp:651
UInt list_size() const
Returns the size of the identifiers list.
Definition: BCBase.cpp:551
~BCBase()
Destructor.
Definition: BCBase.cpp:458
void copyIdSetIntoIdVector()
Definition: BCBase.cpp:795
bcFlag_Type M_flag
flag identifying a specific part of the mesh boundary
Definition: BCBase.hpp:627
std::vector< std::shared_ptr< BCIdentifierBase > > M_idVector
container for id&#39;s when the list is finalized
Definition: BCBase.hpp:647
std::string name() const
Returns the boundary condition name.
Definition: BCBase.cpp:707
Real robinCoeff() const
Returns the value of the robin coefficient (in BC Vector)
Definition: BCBase.cpp:732
const BCFunctionUDepBase * pointerToFunctorUDep() const
Returns a pointer to the BCFunctionUDepBase object.
Definition: BCBase.cpp:533
BCBase(const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCFunctionUDepBase &bcFunctionFEVectorDependent, const bcComponentsVec_Type &components)
Constructor for BCBase. The BC function depends on a generic FE vector (e.g. the solution at the prev...
Definition: BCBase.cpp:308
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191
const BCVectorBase * pointerToBCVector() const
Returns a pointer to the BCVector object.
Definition: BCBase.cpp:538
BCBase(const BCBase &bcBase)
Copy constructor for BCBase.
Definition: BCBase.cpp:417