oomph::MySolidElement< ELEMENT > Class Template Reference

Wrapper class for solid element to modify the output. More...

+ Inheritance diagram for oomph::MySolidElement< ELEMENT >:

Public Member Functions

 MySolidElement ()
 Constructor: Call constructor of underlying element. More...
 
void output (std::ostream &outfile, const unsigned &n_plot)
 Overload output function: More...
 
 MySolidElement ()
 Constructor: Call constructor of underlying element. More...
 
void output (std::ostream &outfile, const unsigned &n_plot)
 Overload output function: More...
 
 MySolidElement ()
 Constructor: Call constructor of underlying element. More...
 
void output (std::ostream &outfile, const unsigned &n_plot)
 Overload output function: More...
 
 MySolidElement ()
 Constructor: Call constructor of underlying element. More...
 
void output (std::ostream &outfile, const unsigned &n_plot)
 Overload output function: More...
 
 MySolidElement ()
 Constructor: Call constructor of underlying element. More...
 
void output (std::ostream &outfile, const unsigned &n_plot)
 Overload output function. More...
 

Detailed Description

template<class ELEMENT>
class oomph::MySolidElement< ELEMENT >

Wrapper class for solid element to modify the output.

Wrapper class for solid elements to modify their output functions.

Constructor & Destructor Documentation

◆ MySolidElement() [1/5]

template<class ELEMENT >
oomph::MySolidElement< ELEMENT >::MySolidElement ( )
inline

Constructor: Call constructor of underlying element.

58 : ELEMENT() {};

◆ MySolidElement() [2/5]

template<class ELEMENT >
oomph::MySolidElement< ELEMENT >::MySolidElement ( )
inline

Constructor: Call constructor of underlying element.

71 : ELEMENT() {};

◆ MySolidElement() [3/5]

template<class ELEMENT >
oomph::MySolidElement< ELEMENT >::MySolidElement ( )
inline

Constructor: Call constructor of underlying element.

54 : ELEMENT() {};

◆ MySolidElement() [4/5]

template<class ELEMENT >
oomph::MySolidElement< ELEMENT >::MySolidElement ( )
inline

Constructor: Call constructor of underlying element.

56 : ELEMENT() {};

◆ MySolidElement() [5/5]

template<class ELEMENT >
oomph::MySolidElement< ELEMENT >::MySolidElement ( )
inline

Constructor: Call constructor of underlying element.

52 : ELEMENT() {}

Member Function Documentation

◆ output() [1/5]

template<class ELEMENT >
void oomph::MySolidElement< ELEMENT >::output ( std::ostream &  outfile,
const unsigned n_plot 
)
inline

Overload output function:

62  {
63 
64  // Element dimension
65  unsigned el_dim = this->dim();
66 
70 
71  switch(el_dim)
72  {
73 
74  case 2:
75 
76  //Tecplot header info
77  outfile << "ZONE I=" << n_plot << ", J=" << n_plot << std::endl;
78 
79  //Loop over element nodes
80  for(unsigned l2=0;l2<n_plot;l2++)
81  {
82  s[1] = -1.0 + l2*2.0/(n_plot-1);
83  for(unsigned l1=0;l1<n_plot;l1++)
84  {
85  s[0] = -1.0 + l1*2.0/(n_plot-1);
86 
87  // Get Eulerian coordinates and stress
88  this->interpolated_x(s,x);
89  this->get_stress(s,sigma);
90 
91  //Output the x,y,..
92  for(unsigned i=0;i<el_dim;i++)
93  {outfile << x[i] << " ";}
94 
95  // Output stress
96  outfile << sigma(0,0) << " "
97  << sigma(1,0) << " "
98  << sigma(1,1) << " "
99  << std::endl;
100  }
101  }
102 
103  break;
104 
105  default:
106 
107  std::ostringstream error_message;
108  error_message << "Output for dim !=2 not implemented" << std::endl;
109  throw OomphLibError(error_message.str(),
112  }
113 
114  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Definition: oomph_definitions.h:222
RealScalar s
Definition: level1_cplx_impl.h:130
int sigma
Definition: calibrate.py:179
list x
Definition: plotDoE.py:28
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
unsigned el_dim
dimension
Definition: overloaded_cartesian_element_body.h:30

References el_dim, i, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, s, calibrate::sigma, and plotDoE::x.

◆ output() [2/5]

template<class ELEMENT >
void oomph::MySolidElement< ELEMENT >::output ( std::ostream &  outfile,
const unsigned n_plot 
)
inline

Overload output function:

75  {
76 
77  // Element dimension
78  unsigned el_dim = this->dim();
79 
83 
84  switch(el_dim)
85  {
86 
87  case 2:
88 
89  //Tecplot header info
90  outfile << "ZONE I=" << n_plot << ", J=" << n_plot << std::endl;
91 
92  //Loop over element nodes
93  for(unsigned l2=0;l2<n_plot;l2++)
94  {
95  s[1] = -1.0 + l2*2.0/(n_plot-1);
96  for(unsigned l1=0;l1<n_plot;l1++)
97  {
98  s[0] = -1.0 + l1*2.0/(n_plot-1);
99 
100  // Get Eulerian coordinates and stress
101  this->interpolated_x(s,x);
102  this->get_stress(s,sigma);
103 
104  //Output the x,y,..
105  for(unsigned i=0;i<el_dim;i++)
106  {outfile << x[i] << " ";}
107 
108  // Output stress
109  outfile << sigma(0,0) << " "
110  << sigma(1,0) << " "
111  << sigma(1,1) << " "
112  << std::endl;
113  }
114  }
115 
116  break;
117 
118  default:
119 
120  std::ostringstream error_message;
121  error_message << "Output for dim !=2 not implemented" << std::endl;
122  throw OomphLibError(error_message.str(),
125  }
126 
127  }

References el_dim, i, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, s, calibrate::sigma, and plotDoE::x.

◆ output() [3/5]

template<class ELEMENT >
void oomph::MySolidElement< ELEMENT >::output ( std::ostream &  outfile,
const unsigned n_plot 
)
inline

Overload output function:

58  {
59 
60  // Element dimension
61  unsigned el_dim = this->dim();
62 
66 
67  switch(el_dim)
68  {
69 
70  case 2:
71 
72  //Tecplot header info
73  outfile << "ZONE I=" << n_plot << ", J=" << n_plot << std::endl;
74 
75  //Loop over element nodes
76  for(unsigned l2=0;l2<n_plot;l2++)
77  {
78  s[1] = -1.0 + l2*2.0/(n_plot-1);
79  for(unsigned l1=0;l1<n_plot;l1++)
80  {
81  s[0] = -1.0 + l1*2.0/(n_plot-1);
82 
83  // Get Eulerian coordinates and stress
84  this->interpolated_x(s,x);
85  this->get_stress(s,sigma);
86 
87  //Output the x,y,..
88  for(unsigned i=0;i<el_dim;i++)
89  {outfile << x[i] << " ";}
90 
91  // Output stress
92  outfile << sigma(0,0) << " "
93  << sigma(1,0) << " "
94  << sigma(1,1) << " "
95  << std::endl;
96  }
97  }
98 
99  break;
100 
101  default:
102 
103  std::ostringstream error_message;
104  error_message << "Output for dim !=2 not implemented" << std::endl;
105  throw OomphLibError(error_message.str(),
108  }
109 
110  }

References el_dim, i, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, s, calibrate::sigma, and plotDoE::x.

◆ output() [4/5]

template<class ELEMENT >
void oomph::MySolidElement< ELEMENT >::output ( std::ostream &  outfile,
const unsigned n_plot 
)
inline

Overload output function:

60  {
61 
62  // Element dimension
63  unsigned el_dim = this->dim();
64 
68 
69  switch(el_dim)
70  {
71 
72  case 2:
73 
74  //Tecplot header info
75  outfile << "ZONE I=" << n_plot << ", J=" << n_plot << std::endl;
76 
77  //Loop over element nodes
78  for(unsigned l2=0;l2<n_plot;l2++)
79  {
80  s[1] = -1.0 + l2*2.0/(n_plot-1);
81  for(unsigned l1=0;l1<n_plot;l1++)
82  {
83  s[0] = -1.0 + l1*2.0/(n_plot-1);
84 
85  // Get Eulerian coordinates and stress
86  this->interpolated_x(s,x);
87  this->get_stress(s,sigma);
88 
89  //Output the x,y,..
90  for(unsigned i=0;i<el_dim;i++)
91  {outfile << x[i] << " ";}
92 
93  // Output stress
94  outfile << sigma(0,0) << " "
95  << sigma(1,0) << " "
96  << sigma(1,1) << " "
97  << std::endl;
98  }
99  }
100 
101  break;
102 
103  default:
104 
105  std::ostringstream error_message;
106  error_message << "Output for dim !=2 not implemented" << std::endl;
107  throw OomphLibError(error_message.str(),
110  }
111 
112  }

References el_dim, i, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, s, calibrate::sigma, and plotDoE::x.

◆ output() [5/5]

template<class ELEMENT >
void oomph::MySolidElement< ELEMENT >::output ( std::ostream &  outfile,
const unsigned n_plot 
)
inline

Overload output function.

56  {
57  Vector<double> s(2);
58  Vector<double> x(2);
59  Vector<double> xi(2);
61 
62  //Tecplot header info
63  outfile << "ZONE I=" << n_plot << ", J=" << n_plot << std::endl;
64 
65  //Loop over plot points
66  for(unsigned l2=0;l2<n_plot;l2++)
67  {
68  s[1] = -1.0 + l2*2.0/(n_plot-1);
69  for(unsigned l1=0;l1<n_plot;l1++)
70  {
71  s[0] = -1.0 + l1*2.0/(n_plot-1);
72 
73  // Get Eulerian and Lagrangian coordinates and the stress
74  this->interpolated_x(s,x);
75  this->interpolated_xi(s,xi);
76  this->get_stress(s,sigma);
77 
78  //Output the x,y coordinates
79  for(unsigned i=0;i<2;i++)
80  {outfile << x[i] << " ";}
81 
82  // Output displacements, the difference between Eulerian and Lagrangian
83  // coordinates
84  for(unsigned i=0;i<2;i++)
85  {outfile << x[i]-xi[i] << " ";}
86 
87  //Output stress
88  outfile << sigma(0,0) << " "
89  << sigma(1,0) << " "
90  << sigma(1,1) << " "
91  << std::endl;
92  }
93  }
94  }

References i, s, calibrate::sigma, and plotDoE::x.


The documentation for this class was generated from the following files: