Walls.h File Reference

Go to the source code of this file.

Classes

struct  SerializationWrappers::Wrapper< Base >
 

Namespaces

 SerializationWrappers
 

Functions

template<class Archive >
void save (Archive &ar, const WallHandler &w)
 
template<class Archive >
void load (Archive &ar, WallHandler &w)
 
template<class Archive >
void save (Archive &ar, const SerializationWrappers::Wrapper< BaseWall > w)
 
template<class Archive >
void load (Archive &ar, SerializationWrappers::Wrapper< BaseWall > &b)
 
template<class Archive >
void load (Archive &ar, InfiniteWall &w)
 
template<class Archive >
void save (Archive &ar, const InfiniteWall &w)
 
template<class Archive >
void load (Archive &ar, CylindricalWall &w)
 
template<class Archive >
void save (Archive &ar, const CylindricalWall &w)
 

Function Documentation

◆ load() [1/4]

template<class Archive >
void load ( Archive &  ar,
CylindricalWall w 
)
124  {
125  //Vec3D position;
126  Mdouble radius;
127  ar( //CEREAL_NVP( position ),
128  CEREAL_NVP( radius ));
129 }
double Mdouble
Definition: GeneralDefine.h:13
radius
Definition: UniformPSDSelfTest.py:15

References UniformPSDSelfTest::radius.

◆ load() [2/4]

template<class Archive >
void load ( Archive &  ar,
InfiniteWall w 
)
109  {
110  Vec3D position, normal;
111  ar( CEREAL_NVP( position ),
112  CEREAL_NVP( normal ));
113  w.setPosition( position );
114  w.setNormal( normal );
115 }
RowVector3d w
Definition: Matrix_resize_int.cpp:3
Definition: Kernel/Math/Vector.h:30
void normal(const Vector< double > &x, Vector< double > &normal)
Definition: free_surface_rotation.cc:65

References WallFunction::normal(), and w.

◆ load() [3/4]

template<class Archive >
void load ( Archive &  ar,
SerializationWrappers::Wrapper< BaseWall > &  b 
)
82 {
83  logger(DEBUG, "In load Generic Wall!");
85  ar(cereal::make_nvp("type", type));
86  logger(INFO, "Type = %", type);
87  if (type == "InfiniteWall")
88  {
89  b.data = new InfiniteWall();
90  //ar( cereal::make_nvp("value", dynamic_cast<InfiniteWall*>(b)));
91  load(ar, *(dynamic_cast<InfiniteWall*>(b.data)));
92  /* } else if (type == "FiniteWall") {
93  b = new InfiniteWall();
94  ar( cereal::make_nvp("value", dynamic_cast<FiniteWall*>(b)));*/
95  }
96  else if (type == "InfiniteWallWithHole")
97  {
98  b.data = new InfiniteWallWithHole();
99  //ar( cereal::make_nvp("value", dynamic_cast<InfiniteWallWithHole*>(b)));
100  } else if (type == "CylindricalWall") {
101  b.data = new CylindricalWall();
102  //ar( cereal::make_nvp("value", dynamic_cast<CylindricalWall*>(b)));
103  load( ar, *(dynamic_cast<CylindricalWall*>(b.data)));
104  }
105 
106 }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
void load(Archive &ar, WallHandler &w)
Definition: Walls.h:44
Scalar * b
Definition: benchVecAdd.cpp:17
Definition: CylindricalWall.h:17
Definition: InfiniteWallWithHole.h:17
A infinite wall fills the half-space {point: (position_-point)*normal_<=0}.
Definition: InfiniteWall.h:27
#define DEBUG
Definition: main.h:181
#define INFO(i)
Definition: mumps_solver.h:54
type
Definition: compute_granudrum_aor.py:141
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286

References b, DEBUG, INFO, load(), logger, oomph::Global_string_for_annotation::string(), and compute_granudrum_aor::type.

◆ load() [4/4]

template<class Archive >
void load ( Archive &  ar,
WallHandler w 
)
44  {
45  cereal::size_type count;
46  ar ( cereal::make_size_tag(count));
47 
48  //Due to inheritance etc etc, we need to create pointers here.
49  logger(VERBOSE, "WallHandler");
50  for (int i = 0; i < count; i++)
51  {
53  logger(INFO, " Pass % / %\n", i, count, Flusher::NO_FLUSH);
54  ar(wall);
55  logger(INFO, " Adding...\n", Flusher::NO_FLUSH);
56  w.copyAndAddObject(wall.data);
57  logger(INFO, " Done. ");
58  }
59 }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
LL< Log::VERBOSE > VERBOSE
Verbose information.
Definition: Logger.cc:36
Definition: Walls.h:22
Base * data
Definition: Walls.h:31

References SerializationWrappers::Wrapper< Base >::data, i, INFO, logger, NO_FLUSH, VERBOSE, and w.

Referenced by load().

◆ save() [1/4]

template<class Archive >
void save ( Archive &  ar,
const CylindricalWall w 
)
132  {
133  ar ( //cereal::make_nvp("position", w.getPosition()),
134  cereal::make_nvp("radius", w.getRadius()));
135 }

References w.

◆ save() [2/4]

template<class Archive >
void save ( Archive &  ar,
const InfiniteWall w 
)
118  {
119  ar( cereal::make_nvp("position", w.getPosition()),
120  cereal::make_nvp("normal", w.getNormal()));
121 }

References w.

◆ save() [3/4]

template<class Archive >
void save ( Archive &  ar,
const SerializationWrappers::Wrapper< BaseWall w 
)
62  {
63  if (typeid(*(w.data)) == typeid(InfiniteWall)) {
64  ar( cereal::make_nvp("type","InfiniteWall"));
65  save( ar, *(dynamic_cast<InfiniteWall*>(w.data)));
66  //ar( cereal::make_nvp("value", dynamic_cast<const InfiniteWall*>(b)));
67  /*} else if (typeid(b) == typeid(FiniteWall)) {
68  ar( cereal::make_nvp("type","FiniteWall"));
69  ar( cereal::make_nvp("value", dynamic_cast<const FiniteWall*>(b))); */
70  } else if (typeid(*(w.data)) == typeid (InfiniteWallWithHole)) {
71  ar( cereal::make_nvp("type","InfiniteWallWithHole"));
72  //save( ar, *(dynamic_cast<InfiniteWallWithHole*>(w.data)));
73  } else if (typeid(*(w.data)) == typeid (CylindricalWall)) {
74  ar( cereal::make_nvp("type","CylindricalWall"));
75  save( ar, *(dynamic_cast<CylindricalWall*>(w.data)));
76  }
77 
78 }
void save(Archive &ar, const WallHandler &w)
Definition: Walls.h:36

References save(), and w.

◆ save() [4/4]

template<class Archive >
void save ( Archive &  ar,
const WallHandler w 
)
36  {
37  ar ( cereal::make_size_tag(w.getNumberOfObjects()));
38  for (const auto& wall UNUSED : w ) {
39  ar ( w );
40  }
41 }
#define UNUSED
Definition: GeneralDefine.h:18

References UNUSED, and w.

Referenced by save().