OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
BCond.h
Go to the documentation of this file.
1// -*- C++ -*-
2/***************************************************************************
3 *
4 * The IPPL Framework
5 *
6 ***************************************************************************/
7
8#ifndef BCOND_H
9#define BCOND_H
10
11#include "Utility/IpplInfo.h"
12#include "Utility/RefCounted.h"
13#include "Utility/vmap.h"
14
15#include <iostream>
16#include <complex>
17
18// forward declarations
19template <unsigned D> class NDIndex;
20template <class T, unsigned D> class Vektor;
21template <class T, unsigned D> class Tenzor;
22template <class T, unsigned D> class SymTenzor;
23template <class T, unsigned D> class AntiSymTenzor;
24template<unsigned D, class T> class UniformCartesian;
25template<class T, unsigned D> class LField;
26template<class T, unsigned D> class BareField;
27template<class T, unsigned D, class M, class C> class Field;
28template <class T, unsigned D, class M, class C> class BCondBase;
29template <class T, unsigned D, class M, class C>
30std::ostream& operator<<(std::ostream&, const BCondBase<T,D,M,C>&);
31template <class T, unsigned D, class M, class C> class BConds;
32template <class T, unsigned D, class M, class C>
33std::ostream& operator<<(std::ostream&, const BConds<T,D,M,C>&);
34
36
37//
38// Traits used by the single-component version of the applicative templates.
39// General case: this covers intrinsic types like double, bool automatically:
40//
41
42template<class T>
44{
45 typedef T type;
46};
47
48//
49// Specializations for multicomponent IPPL types;
50//
51template<class T,unsigned D>
53{
54 typedef T type;
55};
56
57template<class T,unsigned D>
59{
60 typedef T type;
61};
62
63template<class T,unsigned D>
65{
66 typedef T type;
67};
68
69template<class T,unsigned D>
71{
72 typedef T type;
73};
74
75// Helper classes for getting info about number of indices into
76// BCond-class ctor functions.
77// Define tag types (like iterator tags in stl):
78
80{
81};
82
84{
85};
86
88{
89};
90
92{
93};
94
96{
97};
98
99// Implement tag types for intrinsic types:
100inline scalar_tag get_tag(std::complex<double>) { return scalar_tag(); }
101inline scalar_tag get_tag(double) { return scalar_tag(); }
102inline scalar_tag get_tag(float) { return scalar_tag(); }
103inline scalar_tag get_tag(int) { return scalar_tag(); }
104inline scalar_tag get_tag(bool) { return scalar_tag(); }
105inline scalar_tag get_tag(short) { return scalar_tag(); }
106
107// Tag for Vektor types:
108template<class T, unsigned D>
109inline vektor_tag
111
112// Tag for Tenzor types:
113template<class T, unsigned D>
114inline tenzor_tag
116
117// Tag for AntiSymTenzor types
118template<class T, unsigned D>
119inline antisymtenzor_tag
121
122// Tag for SymTenzor types
123template<class T, unsigned D>
124inline symtenzor_tag
126
127// Functions which return an enum value indicating scalar, vector, tensor,
128// or anti/symtensor type; used in constructors for PeriodicFace, etc., to
129// determine how to turn two 1D component indices into a single index value
130// for pointer offsetting into the Tenzor/Anti/SymTenzor object:
143
145
146template<class T, unsigned D, class M, class C>
147class BCondBase : public RefCounted
148{
149public:
150
151 // Special value designating application to all components of elements:
152 static int allComponents;
153
154 // Constructor takes:
155 // face: the face to apply the boundary condition on.
156 // i,j : what component of T to apply the boundary condition to.
157 // The components default to setting all components.
158 BCondBase(unsigned int face,
159 int i = allComponents,
160 int j = allComponents);
161 virtual ~BCondBase() { }
162
163 virtual void apply( Field<T,D,M,C>& ) = 0;
164 virtual BCondBase<T,D,M,C>* clone() const = 0;
165
166 virtual void write(std::ostream&) const;
167
168 // Return component of Field element on which BC applies
169 int getComponent() const { return m_component; }
170
171 // Return face on which BC applies
172 unsigned int getFace() const { return m_face; }
173
174 // Returns whether or not this BC changes physical cells.
175 bool changesPhysicalCells() const { return m_changePhysical; }
176
177protected:
178
179 // Following are hooks for BC-by-Field-element-component support:
180 // Component of Field elements (Vektor, e.g.) on which the BC applies:
182
183 // What face to apply the boundary condition to.
184 unsigned int m_face;
185
186 // True if this boundary condition changes physical cells.
188};
189
191
192template<
193 class T,
194 unsigned D,
196 class C=typename M::DefaultCentering>
198 : public vmap<int, RefCountedP< BCondBase<T,D,M,C> > >
199{
200public:
205 virtual ~BConds() = default;
206 void apply( Field<T,D,M,C>& a );
207 bool changesPhysicalCells() const;
208 virtual void write(std::ostream&) const;
209};
210
212
213// TJW: so far, componentwise specification of BCondNoAction not possible
214
215template<class T,
216 unsigned D,
218 class C=typename M::DefaultCentering>
219class BCondNoAction : public BCondBase<T,D,M,C>
220{
221public:
222 BCondNoAction(int face) : BCondBase<T,D,M,C>(face) {}
223
224 virtual void apply( Field<T,D,M,C>& ) {}
226 {
227 return new BCondNoAction<T,D,M,C>( *this );
228 }
229
230 // Print out information about the BC to a stream.
231 virtual void write(std::ostream& out) const;
232};
233
235
236template<class T,
237 unsigned D,
239 class C=typename M::DefaultCentering>
240class PeriodicFace : public BCondBase<T,D,M,C>
241{
242public:
243 // Constructor takes zero, one, or two int's specifying components of
244 // multicomponent types like Vektor/Tenzor/Anti/SymTenzor this BC applies to.
245 // Zero int's specified means apply to all components; one means apply to
246 // component (i), and two means apply to component (i,j),
248
249 PeriodicFace(unsigned f,
252
253 // Apply the boundary condition to a particular Field.
254 virtual void apply( Field<T,D,M,C>& );
255
256 // Make a copy of the concrete type.
257 virtual BCondBase<T,D,M,C>* clone() const
258 {
259 return new PeriodicFace<T,D,M,C>( *this );
260 }
261
262 // Print out information about the BC to a stream.
263 virtual void write(std::ostream& out) const;
264};
265
266
267
269//BENI adds Periodic Boundary Conditions for Interpolations///////////
271template<class T,
272 unsigned D,
274 class C=typename M::DefaultCentering>
275class InterpolationFace : public BCondBase<T,D,M,C>
276{
277public:
278 // Constructor takes zero, one, or two int's specifying components of
279 // multicomponent types like Vektor/Tenzor/Anti/SymTenzor this BC applies to.
280 // Zero int's specified means apply to all components; one means apply to
281 // component (i), and two means apply to component (i,j),
283
284 InterpolationFace(unsigned f,
287
288 // Apply the boundary condition to a particular Field.
289 virtual void apply( Field<T,D,M,C>& );
290
291 // Make a copy of the concrete type.
292 virtual BCondBase<T,D,M,C>* clone() const
293 {
294 return new InterpolationFace<T,D,M,C>( *this );
295 }
296
297 // Print out information about the BC to a stream.
298 virtual void write(std::ostream& out) const;
299};
300
302
303template<class T, unsigned D,
305 class C=typename M::DefaultCentering>
306class ParallelPeriodicFace : public PeriodicFace<T,D,M,C>
307{
308public:
309
310 // Constructor takes zero, one, or two int's specifying components
311 // of multicomponent types like Vektor/Tenzor/AntiTenzor/SymTenzor
312 // this BC applies to. Zero int's means apply to all components;
313 // one means apply to component (i), and two means apply to
314 // component (i,j),
315
317
319 int i = Base_t::allComponents,
320 int j = Base_t::allComponents)
321 : PeriodicFace<T,D,M,C>(f,i,j)
322 { }
323
324 // Apply the boundary condition to a particular Field.
325
326 virtual void apply( Field<T,D,M,C>& );
327
328 // Make a copy of the concrete type.
329
330 virtual Base_t * clone() const
331 {
332 return new ParallelPeriodicFace<T,D,M,C>( *this );
333 }
334
335 // Print out information about the BC to a stream.
336
337 virtual void write(std::ostream& out) const;
338};
339
341
342
344// BENI adds parallel Interpolation Face
346
347template<class T, unsigned D,
349 class C=typename M::DefaultCentering>
351{
352public:
353
354 // Constructor takes zero, one, or two int's specifying components
355 // of multicomponent types like Vektor/Tenzor/AntiTenzor/SymTenzor
356 // this BC applies to. Zero int's means apply to all components;
357 // one means apply to component (i), and two means apply to
358 // component (i,j),
359
361
363 int i = Base_t::allComponents,
364 int j = Base_t::allComponents)
365 : InterpolationFace<T,D,M,C>(f,i,j)
366 { }
367
368 // Apply the boundary condition to a particular Field.
369
370 virtual void apply( Field<T,D,M,C>& );
371
372 // Make a copy of the concrete type.
373
374 virtual Base_t * clone() const
375 {
376 return new ParallelInterpolationFace<T,D,M,C>( *this );
377 }
378
379 // Print out information about the BC to a stream.
380
381 virtual void write(std::ostream& out) const;
382};
383
385
386
387template<class T,
388 unsigned D,
390 class C=typename M::DefaultCentering>
391class ExtrapolateFace : public BCondBase<T,D,M,C>
392{
393public:
394 // Constructor takes zero, one, or two int's specifying components of
395 // multicomponent types like Vektor/Tenzor/Anti/SymTenzor this BC applies to.
396 // Zero int's specified means apply to all components; one means apply to
397 // component (i), and two means apply to component (i,j),
399 ExtrapolateFace(unsigned f, T o, T s,
402
403 // Apply the boundary condition to a given Field.
404 virtual void apply( Field<T,D,M,C>& );
405
406 // Make a copy of the concrete type.
407 virtual BCondBase<T,D,M,C>* clone() const
408 {
409 return new ExtrapolateFace<T,D,M,C>( *this );
410 }
411
412 // Print out some information about the BC to a given stream.
413 virtual void write(std::ostream&) const;
414
415 const T& getOffset() const { return Offset; }
416 const T& getSlope() const { return Slope; }
417
418protected:
420};
421
422
424
425// TJW added 12/16/1997 as per Tecolote team's request: this one sets last
426// physical element layer to zero for vert-centered elements/components. For
427// cell-centered, doesn't need to do this because the zero point of an odd
428// function is halfway between the last physical element and the first guard
429// element.
430
431template<class T,
432 unsigned D,
434 class C=typename M::DefaultCentering>
435class ExtrapolateAndZeroFace : public BCondBase<T,D,M,C>
436{
437public:
438 // Constructor takes zero, one, or two int's specifying components of
439 // multicomponent types like Vektor/Tenzor/Anti/SymTenzor this BC applies to.
440 // Zero int's specified means apply to all components; one means apply to
441 // component (i), and two means apply to component (i,j),
443 ExtrapolateAndZeroFace(unsigned f, T o, T s,
446
447 // Apply the boundary condition to a given Field.
448 virtual void apply( Field<T,D,M,C>& );
449
450 // Make a copy of the concrete type.
451 virtual BCondBase<T,D,M,C>* clone() const
452 {
453 return new ExtrapolateAndZeroFace<T,D,M,C>( *this );
454 }
455
456 // Print out some information about the BC to a given stream.
457 virtual void write(std::ostream&) const;
458
459 const T& getOffset() const { return Offset; }
460 const T& getSlope() const { return Slope; }
461
462protected:
464};
465
466
468
469template<class T,
470 unsigned D,
472 class C=typename M::DefaultCentering>
473class PosReflectFace : public ExtrapolateFace<T,D,M,C>
474{
475public:
477 PosReflectFace(unsigned f,
480 : ExtrapolateFace<T,D,M,C>(f,0,1,i,j) {}
481
482 // Print out information about the BC to a stream.
483 virtual void write(std::ostream& out) const;
484};
485
487
488template<class T,
489 unsigned D,
491 class C=typename M::DefaultCentering>
492class NegReflectFace : public ExtrapolateFace<T,D,M,C>
493{
494public:
496 NegReflectFace(unsigned f,
499 : ExtrapolateFace<T,D,M,C>(f,0,-1,i,j) {}
500
501 // Print out information about the BC to a stream.
502 virtual void write(std::ostream& out) const;
503};
504
506
507// TJW added 12/16/1997 as per Tecolote team's request: this one sets last
508// physical element layer to zero for vert-centered elements/components. For
509// cell-centered, doesn't need to do this because the zero point of an odd
510// function is halfway between the last physical element and the first guard
511// element.
512
513template<class T,
514 unsigned D,
516 class C=typename M::DefaultCentering>
518{
519public:
524 : ExtrapolateAndZeroFace<T,D,M,C>(f,0,-1,i,j) {}
525
526 // Print out information about the BC to a stream.
527 virtual void write(std::ostream& out) const;
528};
529
531
532template<class T,
533 unsigned D,
535 class C=typename M::DefaultCentering>
536class ConstantFace : public ExtrapolateFace<T,D,M,C>
537{
538public:
540 ConstantFace(unsigned f, T c,
543 : ExtrapolateFace<T,D,M,C>(f,c,0,i,j) {}
544
545 // Print out information about the BC to a stream.
546 virtual void write(std::ostream& out) const;
547};
548
550
551template<class T,
552 unsigned D,
554 class C=typename M::DefaultCentering>
555class ZeroFace : public ExtrapolateFace<T,D,M,C>
556{
557public:
559 ZeroFace(unsigned f,
562 : ExtrapolateFace<T,D,M,C>(f,0,0,i,j) {}
563
564 // Print out information about the BC to a stream.
565 virtual void write(std::ostream& out) const;
566};
567
569
570// TJW added 1/25/1998 as per Blanca's (Don Marshal's, for the Lagrangian
571// code) request: this one sets last physical element layer to zero for
572// vert-centered elements/components. For cell-centered, doesn't need to do
573// this because the zero point of an odd function is halfway between the last
574// physical element and the first guard element.
575
576template<class T,
577 unsigned D,
579 class C=typename M::DefaultCentering>
581{
582public:
587 : ExtrapolateAndZeroFace<T,D,M,C>(f,0,0,i,j) {}
588
589 // Print out information about the BC to a stream.
590 virtual void write(std::ostream& out) const;
591};
592
594
595//-----------------------------------------------------------------------------
596// Had to depart from the paradigm of the other boundary condition types to
597// implement FunctionFace. Couldn't use the same single FunctionFace class for
598// both whole-Field-element and componentwise functions, because the return
599// of the user-provided function has to be different for the two cases.
600// Instead, left FunctionFace as whole-element-only (no component specification
601// allowed) and introduced new ComponentFunctionFace for componentwise,
602// disallowing via runtime error the allComponents specification allowed in all
603// the other BC types. --Tim Williams 3/31/1997
604//-----------------------------------------------------------------------------
605
606template<class T,
607 unsigned D,
609 class C=typename M::DefaultCentering>
610class FunctionFace : public BCondBase<T,D,M,C>
611{
612public:
613 // Constructor does *not* allow extra one or two arguments specifying
614 // components of multicomponent types, as PeriodicFace and all other BC types
615 // here do; user must use ComponentFunctionFace for these cases. This
616 // constructor only takes the takes arguments for the user-supplied function
617 // and for the active face on the mesh to which this BC applies. The function
618 // must have return type T (can't return single components; must use the
619 // other class ComponentFunctionFace to do this):
620 FunctionFace(T (*func)(const T&), unsigned face);
621
622 void apply( Field<T,D,M,C>& );
623
625 {
626 return new FunctionFace<T,D,M,C>( *this );
627 }
628
629 // Print out information about the BC to a stream.
630 virtual void write(std::ostream& out) const;
631
632 // tjw 3/12/1999: see below
633 T (*Func)(const T&);
634
635private:
636 // tjw 3/12/1999; had to make this public for test/simple/bc2.cpp to work:
637 // T (*Func)(T&);
638};
639
641
642template<class T,
643 unsigned D,
645 class C=typename M::DefaultCentering>
646class ComponentFunctionFace : public BCondBase<T,D,M,C>
647{
648public:
649 // In addition to arguments for FunctionFace, this constructor takes
650 // one, or two unsigned's specifying components of multicomponent types like
651 // Vektor/Tenzor/Anti/SymTenzor this BC applies to.
652 // One unsigned means apply to component (i), and two means apply to
653 // component (i,j). Note: unlike all other non-FunctionFace BC types here,
654 // you *can't* specify nothing or BCondBase<T,D,M,C>::allComponents to
655 // indicate all components; you *must* use FunctionFace class for doing
656 // all components.
657 // ComponentFunctionFace() will give a runtime error if you try to construct
658 // it for all components (which it defaults to, meaning the default is a
659 // runtime error, which should probably be changed some time if somebody can
660 // figure out how). This is not as bad as you might think, though; most
661 // likely the user would be specifying T as the return type of his supplied
662 // function when he is trying to do the all-component case, in which he'd
663 // get a compile error on the type of the constructor argument Func.
666 (*func)( typename ApplyToComponentType<T>::type),
667 unsigned face,
670
671 void apply( Field<T,D,M,C>& );
672
674 {
675 return new ComponentFunctionFace<T,D,M,C>( *this );
676 }
677
678 // Print out information about the BC to a stream.
679 virtual void write(std::ostream& out) const;
680
681 // tjw 3/12/1999: see below
683 (*Func)( typename ApplyToComponentType<T>::type );
684
685private:
686 // tjw 3/12/1999; had to make this public for test/simple/bc2.cpp to work:
687 // typename ApplyToComponentType<T>::type
688 // (*Func)( typename ApplyToComponentType<T>::type );
689};
690
692
693/*
694 Special for Conejo: The Eureka boundary condition.
695
696 This is an augmented zero boundary condition which sets
697 more locations to zero for some cases.
698
699 Instead of setting just the guard layers to zero, it sets the guard
700 layers plus one to zero in all cases except one:
701 Face centered data (which as all but one dimension cell centered),
702 on the directions in which it is cell centered.
703
704*/
705
706template<class T,
707 unsigned D,
709 class C=typename M::DefaultCentering>
710class EurekaFace : public BCondBase<T,D,M,C>
711{
712public:
713 // Constructor takes:
714 // face: the face to apply the boundary condition on.
715 // i,j : what component of T to apply the boundary condition to.
716 // The components default to setting all components.
717 // All it has to do is tell the base class to set itself up.
719 EurekaFace(unsigned int face,
722 : BCondBase<T,D,M,C>(face,i,j) { BCondBase<T,D,M,C>::m_changePhysical = true; }
723
724 // Apply the boundary condition to a given Field.
725 virtual void apply( Field<T,D,M,C>& ) ;
726
727 // Make a copy of one of these.
729 {
730 return new EurekaFace<T,D,M,C>(*this);
731 }
732
733 // Print out information about the BC to a stream.
734 virtual void write(std::ostream& out) const;
735
736};
737
739
740// ----------------------------------------------------------------------------
741// TJW added 1/26/1998 as per Blanca's (Jerry Brock's, for the tracer particle
742// code) request: this one takes the values of the last two physical elements,
743// and linearly extrapolates from the line through them out to all the guard
744// elements. This is independent of centering. The intended use is for filling
745// global guard layers of a Field of Vektors holding the mesh node position
746// values, for which this does the right thing at hi and lo faces (exactly
747// right for uniform cartesian meshes, and a reasonable thing to do for
748// nonuniform cartesian meshes).
749//
750// Had to depart from the paradigm of the other boundary condition types to
751// implement LinearExtrapolateFace. Couldn't use the same single
752// LinearExtrapolateFace class for both whole-Field-element and componentwise
753// functions, because I couldn't figure out how to implement it using PETE and
754// applicative templates. Instead, created LinearExtrapolateFace as
755// whole-element-only (no component specification allowed) and separate
756// ComponentLinearExtrapolateFace for componentwise, disallowing via runtime
757// error the allComponents specification allowed in all the other BC
758// types. --Tim Williams 1/26/1999
759// ----------------------------------------------------------------------------
760
761template<class T,
762 unsigned D,
764 class C=typename M::DefaultCentering>
765class LinearExtrapolateFace : public BCondBase<T,D,M,C>
766{
767public:
768 // Constructor takes zero, one, or two int's specifying components of
769 // multicomponent types like Vektor/Tenzor/Anti/SymTenzor this BC applies to.
770 // Zero int's specified means apply to all components; one means apply to
771 // component (i), and two means apply to component (i,j),
774 BCondBase<T,D,M,C>(f) {}
775
776 // Apply the boundary condition to a given Field.
777 virtual void apply( Field<T,D,M,C> &A);
778
779 // Make a copy of the concrete type.
780 virtual BCondBase<T,D,M,C>* clone() const
781 {
782 return new LinearExtrapolateFace<T,D,M,C>( *this );
783 }
784
785 // Print out some information about the BC to a given stream.
786 virtual void write(std::ostream&) const;
787
788};
789
790
791template<class T,
792 unsigned D,
794 class C=typename M::DefaultCentering>
796{
797public:
798 // Constructor takes zero, one, or two int's specifying components of
799 // multicomponent types like Vektor/Tenzor/Anti/SymTenzor this BC applies to.
800 // Zero int's specified means apply to all components; one means apply to
801 // component (i), and two means apply to component (i,j),
806 BCondBase<T,D,M,C>(f,i,j) {
807 // Disallow specification of all components (default, unfortunately):
810 ERRORMSG("ComponentLinearExtrapolateFace(): allComponents specified; "
811 << "not allowed; use LinearExtrapolateFace "
812 << "class instead." << endl);
813 }
814
815 // Apply the boundary condition to a given Field.
816 virtual void apply( Field<T,D,M,C> &A);
817
818 // Make a copy of the concrete type.
819 virtual BCondBase<T,D,M,C>* clone() const
820 {
821 return new ComponentLinearExtrapolateFace<T,D,M,C>( *this );
822 }
823
824 // Print out some information about the BC to a given stream.
825 virtual void write(std::ostream&) const;
826
827};
828
829
831
832template<class T,
833 unsigned D,
835 class C=typename M::DefaultCentering>
836class PatchBC : public BCondBase<T,D,M,C>
837{
838public:
839
840 //
841 // Initialize with a functor and the face to apply that functor to.
842 //
843 PatchBC(unsigned face);
844
845 //
846 // Virtual function to apply this BC to a Field.
847 //
848 void apply( Field<T,D,M,C>& );
849
850 //
851 // Virtual function for the user to supply to apply this BC to
852 // a given vnode.
853 //
855 const NDIndex<D>&) = 0;
856
857 //
858 // Print out information about the BC to a stream.
859 //
860 virtual void write(std::ostream& out) const
861 {
862 out << "PatchBC(" << this->getFace() << ")";
863 }
864
865private:
866
867};
868
870
871//
872// Define global streaming functions that just call the
873// write function for each of the above base classes.
874//
875
876template<class T, unsigned D, class M, class C >
877inline std::ostream&
878operator<<(std::ostream& o, const BCondBase<T,D,M,C>& bc)
879{
880 bc.write(o);
881 return o;
882}
883
884
885template<class T, unsigned D, class M, class C >
886inline std::ostream&
887operator<<(std::ostream& o, const BConds<T,D,M,C>& bc)
888{
889 bc.write(o);
890 return o;
891}
892
894
895#include "Field/BCond.hpp"
896
897#endif // BCOND_H
898
899/***************************************************************************
900 * $RCSfile: BCond.h,v $ $Author: adelmann $
901 * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:26 $
902 * IPPL_VERSION_ID: $Id: BCond.h,v 1.1.1.1 2003/01/23 07:40:26 adelmann Exp $
903 ***************************************************************************/
#define ERRORMSG(msg)
Definition IpplInfo.h:350
Inform & endl(Inform &inf)
Definition Inform.cpp:42
scalar_tag get_tag(std::complex< double >)
Definition BCond.h:100
TensorOrder_e getTensorOrder(const scalar_tag &)
Definition BCond.h:133
std::ostream & operator<<(std::ostream &, const BCondBase< T, D, M, C > &)
Definition BCond.h:878
TensorOrder_e
Definition BCond.h:131
@ IPPL_TENSOR
Definition BCond.h:131
@ IPPL_SYMTENSOR
Definition BCond.h:132
@ IPPL_SCALAR
Definition BCond.h:131
@ IPPL_VECTOR
Definition BCond.h:131
@ IPPL_ANTISYMTENSOR
Definition BCond.h:132
std::complex< double > a
Definition Field.h:33
bool changesPhysicalCells() const
Definition BCond.h:175
virtual BCondBase< T, D, M, C > * clone() const =0
int getComponent() const
Definition BCond.h:169
virtual ~BCondBase()
Definition BCond.h:161
int m_component
Definition BCond.h:181
unsigned int getFace() const
Definition BCond.h:172
virtual void write(std::ostream &) const
Definition BCond.hpp:107
static int allComponents
Definition BCond.h:152
unsigned int m_face
Definition BCond.h:184
bool m_changePhysical
Definition BCond.h:187
virtual void apply(Field< T, D, M, C > &)=0
vmap< int, RefCountedP< BCondBase< T, D, M, C > > >::const_iterator const_iterator
Definition BCond.h:204
bool changesPhysicalCells() const
Definition BCond.hpp:268
virtual ~BConds()=default
void apply(Field< T, D, M, C > &a)
Definition BCond.hpp:258
vmap< int, RefCountedP< BCondBase< T, D, M, C > > >::iterator iterator
Definition BCond.h:202
virtual void write(std::ostream &) const
Definition BCond.hpp:236
virtual void write(std::ostream &out) const
BCondNoAction(int face)
Definition BCond.h:222
virtual void apply(Field< T, D, M, C > &)
Definition BCond.h:224
BCondBase< T, D, M, C > * clone() const
Definition BCond.h:225
BCondBase< T, D, M, C > BCondBaseTDMC
Definition BCond.h:247
virtual void apply(Field< T, D, M, C > &)
Definition BCond.hpp:480
virtual BCondBase< T, D, M, C > * clone() const
Definition BCond.h:257
virtual void write(std::ostream &out) const
Definition BCond.hpp:113
virtual void apply(Field< T, D, M, C > &)
Definition BCond.hpp:489
virtual void write(std::ostream &out) const
Definition BCond.hpp:120
virtual BCondBase< T, D, M, C > * clone() const
Definition BCond.h:292
BCondBase< T, D, M, C > BCondBaseTDMC
Definition BCond.h:282
ParallelPeriodicFace(unsigned f, int i=Base_t::allComponents, int j=Base_t::allComponents)
Definition BCond.h:318
virtual Base_t * clone() const
Definition BCond.h:330
virtual void apply(Field< T, D, M, C > &)
Definition BCond.hpp:1320
virtual void write(std::ostream &out) const
Definition BCond.hpp:133
BCondBase< T, D, M, C > Base_t
Definition BCond.h:316
virtual Base_t * clone() const
Definition BCond.h:374
ParallelInterpolationFace(unsigned f, int i=Base_t::allComponents, int j=Base_t::allComponents)
Definition BCond.h:362
virtual void apply(Field< T, D, M, C > &)
Definition BCond.hpp:2041
virtual void write(std::ostream &out) const
Definition BCond.hpp:127
BCondBase< T, D, M, C > Base_t
Definition BCond.h:360
BCondBase< T, D, M, C > BCondBaseTDMC
Definition BCond.h:398
virtual void apply(Field< T, D, M, C > &)
Definition BCond.hpp:2809
virtual BCondBase< T, D, M, C > * clone() const
Definition BCond.h:407
const T & getOffset() const
Definition BCond.h:415
virtual void write(std::ostream &) const
Definition BCond.hpp:197
const T & getSlope() const
Definition BCond.h:416
BCondBase< T, D, M, C > BCondBaseTDMC
Definition BCond.h:442
const T & getSlope() const
Definition BCond.h:460
virtual void write(std::ostream &) const
Definition BCond.hpp:207
const T & getOffset() const
Definition BCond.h:459
virtual BCondBase< T, D, M, C > * clone() const
Definition BCond.h:451
virtual void apply(Field< T, D, M, C > &)
Definition BCond.hpp:3622
BCondBase< T, D, M, C > BCondBaseTDMC
Definition BCond.h:476
virtual void write(std::ostream &out) const
Definition BCond.hpp:151
PosReflectFace(unsigned f, int i=BCondBaseTDMC::allComponents, int j=BCondBaseTDMC::allComponents)
Definition BCond.h:477
virtual void write(std::ostream &out) const
Definition BCond.hpp:139
BCondBase< T, D, M, C > BCondBaseTDMC
Definition BCond.h:495
NegReflectFace(unsigned f, int i=BCondBaseTDMC::allComponents, int j=BCondBaseTDMC::allComponents)
Definition BCond.h:496
virtual void write(std::ostream &out) const
Definition BCond.hpp:145
NegReflectAndZeroFace(unsigned f, int i=BCondBaseTDMC::allComponents, int j=BCondBaseTDMC::allComponents)
Definition BCond.h:521
BCondBase< T, D, M, C > BCondBaseTDMC
Definition BCond.h:520
virtual void write(std::ostream &out) const
Definition BCond.hpp:169
BCondBase< T, D, M, C > BCondBaseTDMC
Definition BCond.h:539
ConstantFace(unsigned f, T c, int i=BCondBaseTDMC::allComponents, int j=BCondBaseTDMC::allComponents)
Definition BCond.h:540
virtual void write(std::ostream &out) const
Definition BCond.hpp:157
BCondBase< T, D, M, C > BCondBaseTDMC
Definition BCond.h:558
ZeroFace(unsigned f, int i=BCondBaseTDMC::allComponents, int j=BCondBaseTDMC::allComponents)
Definition BCond.h:559
BCondBase< T, D, M, C > BCondBaseTDMC
Definition BCond.h:583
ZeroGuardsAndZeroFace(unsigned f, int i=BCondBaseTDMC::allComponents, int j=BCondBaseTDMC::allComponents)
Definition BCond.h:584
virtual void write(std::ostream &out) const
Definition BCond.hpp:163
T(* Func)(const T &)
Definition BCond.h:633
virtual void write(std::ostream &out) const
Definition BCond.hpp:184
BCondBase< T, D, M, C > * clone() const
Definition BCond.h:624
void apply(Field< T, D, M, C > &)
Definition BCond.hpp:4551
BCondBase< T, D, M, C > * clone() const
Definition BCond.h:673
void apply(Field< T, D, M, C > &)
Definition BCond.hpp:5003
virtual void write(std::ostream &out) const
Definition BCond.hpp:190
ApplyToComponentType< T >::type(* Func)(typename ApplyToComponentType< T >::type)
Definition BCond.h:683
BCondBase< T, D, M, C > BCondBaseTDMC
Definition BCond.h:664
virtual void write(std::ostream &out) const
Definition BCond.hpp:178
EurekaFace(unsigned int face, int i=BCondBaseTDMC::allComponents, int j=BCondBaseTDMC::allComponents)
Definition BCond.h:719
BCondBase< T, D, M, C > * clone() const
Definition BCond.h:728
BCondBase< T, D, M, C > BCondBaseTDMC
Definition BCond.h:718
virtual void apply(Field< T, D, M, C > &)
Definition BCond.hpp:5394
virtual BCondBase< T, D, M, C > * clone() const
Definition BCond.h:780
virtual void apply(Field< T, D, M, C > &A)
Definition BCond.hpp:5765
BCondBase< T, D, M, C > BCondBaseTDMC
Definition BCond.h:772
LinearExtrapolateFace(unsigned f)
Definition BCond.h:773
virtual void write(std::ostream &) const
Definition BCond.hpp:217
virtual BCondBase< T, D, M, C > * clone() const
Definition BCond.h:819
BCondBase< T, D, M, C > BCondBaseTDMC
Definition BCond.h:802
virtual void write(std::ostream &) const
Definition BCond.hpp:226
ComponentLinearExtrapolateFace(unsigned f, int i=BCondBaseTDMC::allComponents, int j=BCondBaseTDMC::allComponents)
Definition BCond.h:803
virtual void apply(Field< T, D, M, C > &A)
Definition BCond.hpp:5947
virtual void applyPatch(typename Field< T, D, M, C >::iterator, const NDIndex< D > &)=0
void apply(Field< T, D, M, C > &)
Definition BCond.hpp:6129
virtual void write(std::ostream &out) const
Definition BCond.h:860
Definition vmap.h:59