26 #ifndef OOMPH_MACROELEMENT_HEADER
27 #define OOMPH_MACROELEMENT_HEADER
32 #include <oomph-lib-config.h>
88 throw OomphLibError(
"Don't call empty constructor for MacroElement!",
89 OOMPH_CURRENT_FUNCTION,
90 OOMPH_EXCEPTION_LOCATION);
111 void output(std::ostream& outfile,
const int& nplot)
121 std::ostream& outfile,
122 const unsigned& nplot) = 0;
148 std::ostringstream error_message_stream;
151 error_message_stream <<
"The function macro_map(...) is broken virtual\n"
152 <<
"If you need it, please implement it!"
157 OOMPH_CURRENT_FUNCTION,
158 OOMPH_EXCEPTION_LOCATION);
164 const unsigned& nplot) = 0;
174 std::ostringstream error_message;
175 error_message <<
"assemble_macro_to_eulerian_jacobian(...) not \n"
176 <<
"implemented for this element\n"
180 error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
192 std::ostringstream error_message;
193 error_message <<
"assemble_macro_to_eulerian_jacobian2(...) not \n"
194 <<
"implemented for this element\n"
198 error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
290 throw OomphLibError(
"Don't call empty constructor for QMacroElement!",
291 OOMPH_CURRENT_FUNCTION,
292 OOMPH_EXCEPTION_LOCATION);
306 void output(
const unsigned&
t, std::ostream& outfile,
const unsigned& nplot)
309 outfile <<
"ZONE I=" << nplot <<
", J=" << nplot << std::endl;
310 for (
unsigned i = 0;
i < nplot;
i++)
312 x[1] = -1.0 + 2.0 * double(
i) / double(nplot - 1);
313 for (
unsigned j = 0; j < nplot; j++)
315 x[0] = -1.0 + 2.0 * double(j) / double(nplot - 1);
317 outfile << f[0] <<
" " << f[1] << std::endl;
325 const unsigned& nplot);
383 throw OomphLibError(
"Don't call empty constructor for QMacroElement!",
384 OOMPH_CURRENT_FUNCTION,
385 OOMPH_EXCEPTION_LOCATION);
400 void output(
const unsigned&
t, std::ostream& outfile,
const unsigned& nplot)
404 outfile <<
"ZONE I=" << nplot <<
", J=" << nplot <<
", k=" << nplot
406 for (
unsigned i = 0;
i < nplot;
i++)
408 x[2] = -1.0 + 2.0 * double(
i) / double(nplot - 1);
410 for (
unsigned j = 0; j < nplot; j++)
412 x[1] = -1.0 + 2.0 * double(j) / double(nplot - 1);
414 for (
unsigned k = 0; k < nplot; k++)
416 x[0] = -1.0 + 2.0 * double(k) / double(nplot - 1);
420 outfile << f[0] <<
" " << f[1] <<
" " << f[2] << std::endl;
429 const unsigned& nplot);
Base class for Domains with curvilinear and/or time-dependent boundaries. Domain boundaries are typic...
Base class for MacroElement s that are used during mesh refinement in domains with curvlinear and/or ...
Domain * Domain_pt
Pointer to domain.
virtual void assemble_macro_to_eulerian_jacobian2(const unsigned &t, const Vector< double > &s, DenseMatrix< double > &jacobian2)
Assembles the second derivative jacobian of the mapping from the macro coordinates to the global coor...
void assemble_macro_to_eulerian_jacobian(const Vector< double > &s, DenseMatrix< double > &jacobian)
Assembles the jacobian of the mapping from the macro coordinates to the global coordinates.
virtual void output(const unsigned &t, std::ostream &outfile, const unsigned &nplot)=0
Plot: x,y (or x,y,z) in tecplot format at time level t (t=0: current; t>0: previous)
virtual void macro_map(const double &t, const Vector< double > &s, Vector< double > &r)
Get global position r(s) at continuous time value, t.
virtual void output_macro_element_boundaries(std::ostream &outfile, const unsigned &nplot)=0
Output all macro element boundaries as tecplot zones.
void operator=(const MacroElement &)=delete
Broken assignment operator.
virtual void macro_map(const unsigned &t, const Vector< double > &s, Vector< double > &r)=0
The time-dependent mapping from local to global coordinates: r(t,s). t is the discrete timelevel: t=0...
void macro_map(const Vector< double > &s, Vector< double > &r)
The mapping from local to global coordinates at the current time : r(s)
void output(std::ostream &outfile, const int &nplot)
Plot: x,y (or x,y,z) at current time in tecplot format.
unsigned Macro_element_number
What is the number of the current macro element within its domain.
Domain *& domain_pt()
Access function to the Domain_pt.
virtual ~MacroElement()
Empty destructor.
unsigned & macro_element_number()
Access function to the Macro_element_number.
virtual void assemble_macro_to_eulerian_jacobian(const unsigned &t, const Vector< double > &s, DenseMatrix< double > &jacobian)
the jacobian of the mapping from the macro coordinates to the global coordinates
MacroElement(Domain *domain_pt, const unsigned ¯o_element_number)
Constructor: Pass pointer to Domain and the number of the MacroElement within that Domain.
MacroElement(const MacroElement &dummy)=delete
Broken copy constructor.
void assemble_macro_to_eulerian_jacobian2(const Vector< double > &s, DenseMatrix< double > &jacobian2)
Assembles the second derivative jacobian of the mapping from the macro coordinates to the global coor...
MacroElement()
Default constructor (empty and broken)
An OomphLibError object which should be thrown when an run-time error is encountered....
void output(const unsigned &t, std::ostream &outfile, const unsigned &nplot)
Plot: x,y in tecplot format at time level t (t=0: current; t>0: previous)
void operator=(const QMacroElement &)=delete
Broken assignment operator.
QMacroElement(const QMacroElement &dummy)=delete
Broken copy constructor.
virtual ~QMacroElement()
Empty destructor.
QMacroElement(Domain *domain_pt, const unsigned ¯o_element_number)
Constructor: Pass the pointer to the domain and the macro element's number within this domain.
QMacroElement()
Default constructor (empty and broken)
QMacroElement(Domain *domain_pt, const unsigned ¯o_element_number)
Constructor: Pass the pointer to the domain and the macro element's number within this domain.
QMacroElement()
Default constructor (empty and broken)
void output(const unsigned &t, std::ostream &outfile, const unsigned &nplot)
Plot: x,y in tecplot format at time level t (t=0: current; t>0: previous)
virtual ~QMacroElement()
Empty destructor.
QMacroElement(const QMacroElement &dummy)=delete
Broken copy constructor.
void operator=(const QMacroElement &)=delete
Broken assignment operator.
//////////////////////////////////////////////////////////////////////// ////////////////////////////...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...