oomph::MacroElement Class Referenceabstract

#include <macro_element.h>

+ Inheritance diagram for oomph::MacroElement:

Public Member Functions

 MacroElement (Domain *domain_pt, const unsigned &macro_element_number)
 
 MacroElement ()
 Default constructor (empty and broken) More...
 
 MacroElement (const MacroElement &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const MacroElement &)=delete
 Broken assignment operator. More...
 
virtual ~MacroElement ()
 Empty destructor. More...
 
void output (std::ostream &outfile, const int &nplot)
 
virtual void output (const unsigned &t, std::ostream &outfile, const unsigned &nplot)=0
 
void macro_map (const Vector< double > &s, Vector< double > &r)
 The mapping from local to global coordinates at the current time : r(s) More...
 
virtual void macro_map (const unsigned &t, const Vector< double > &s, Vector< double > &r)=0
 
virtual void macro_map (const double &t, const Vector< double > &s, Vector< double > &r)
 Get global position r(s) at continuous time value, t. More...
 
virtual void output_macro_element_boundaries (std::ostream &outfile, const unsigned &nplot)=0
 Output all macro element boundaries as tecplot zones. More...
 
virtual void assemble_macro_to_eulerian_jacobian (const unsigned &t, const Vector< double > &s, DenseMatrix< double > &jacobian)
 
virtual void assemble_macro_to_eulerian_jacobian2 (const unsigned &t, const Vector< double > &s, DenseMatrix< double > &jacobian2)
 
void assemble_macro_to_eulerian_jacobian (const Vector< double > &s, DenseMatrix< double > &jacobian)
 
void assemble_macro_to_eulerian_jacobian2 (const Vector< double > &s, DenseMatrix< double > &jacobian2)
 
unsignedmacro_element_number ()
 Access function to the Macro_element_number. More...
 
Domain *& domain_pt ()
 Access function to the Domain_pt. More...
 

Protected Attributes

DomainDomain_pt
 Pointer to domain. More...
 
unsigned Macro_element_number
 What is the number of the current macro element within its domain. More...
 

Detailed Description

Base class for MacroElement s that are used during mesh refinement in domains with curvlinear and/or time-dependent boundaries; see the description of the Domain class for more details.

A macro element provides a parametrisation of a sub-domain by providing a mapping between a set of local coordinates \( {\bf S} \) and global coordinates \( {\bf r} ({\bf S}) \) . This must be implemented in the function

void macro_map(const Vector< double > &s, Vector< double > &r)
The mapping from local to global coordinates at the current time : r(s)
Definition: macro_element.h:126

The time-dependent version of the macro map returns the mapping from local to global coordinates: \( {\bf r} (t,{\bf S}) \) where t is the discrete timelevel: t=0: current time; t>0: previous timestep.

The MacroElement s establish the current (and previous) domain shape via member function pointers to the Domain 's

virtual void macro_element_boundary(const unsigned &t, const unsigned &i_macro, const unsigned &i_direct, const Vector< double > &s, Vector< double > &f)=0

member function.

Constructor & Destructor Documentation

◆ MacroElement() [1/3]

oomph::MacroElement::MacroElement ( Domain domain_pt,
const unsigned macro_element_number 
)
inline

Constructor: Pass pointer to Domain and the number of the MacroElement within that Domain.

79  {
80 #ifdef LEAK_CHECK
81  LeakCheckNames::MacroElement_build += 1;
82 #endif
83  }
Domain * Domain_pt
Pointer to domain.
Definition: macro_element.h:236
unsigned Macro_element_number
What is the number of the current macro element within its domain.
Definition: macro_element.h:239
Domain *& domain_pt()
Access function to the Domain_pt.
Definition: macro_element.h:229
unsigned & macro_element_number()
Access function to the Macro_element_number.
Definition: macro_element.h:223

◆ MacroElement() [2/3]

oomph::MacroElement::MacroElement ( )
inline

Default constructor (empty and broken)

87  {
88  throw OomphLibError("Don't call empty constructor for MacroElement!",
91  }
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ MacroElement() [3/3]

oomph::MacroElement::MacroElement ( const MacroElement dummy)
delete

Broken copy constructor.

◆ ~MacroElement()

virtual oomph::MacroElement::~MacroElement ( )
inlinevirtual

Empty destructor.

102  {
103 #ifdef LEAK_CHECK
104  LeakCheckNames::MacroElement_build -= 1;
105 #endif
106  }

Member Function Documentation

◆ assemble_macro_to_eulerian_jacobian() [1/2]

virtual void oomph::MacroElement::assemble_macro_to_eulerian_jacobian ( const unsigned t,
const Vector< double > &  s,
DenseMatrix< double > &  jacobian 
)
inlinevirtual

the jacobian of the mapping from the macro coordinates to the global coordinates

Reimplemented in oomph::QMacroElement< 2 >.

172  {
173  // error message stream
174  std::ostringstream error_message;
175  error_message << "assemble_macro_to_eulerian_jacobian(...) not \n"
176  << "implemented for this element\n"
177  << std::endl;
178  // throw error
179  throw OomphLibError(
180  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
181  }

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by assemble_macro_to_eulerian_jacobian().

◆ assemble_macro_to_eulerian_jacobian() [2/2]

void oomph::MacroElement::assemble_macro_to_eulerian_jacobian ( const Vector< double > &  s,
DenseMatrix< double > &  jacobian 
)
inline

Assembles the jacobian of the mapping from the macro coordinates to the global coordinates

207  {
208  unsigned t = 0;
210  }
virtual void assemble_macro_to_eulerian_jacobian(const unsigned &t, const Vector< double > &s, DenseMatrix< double > &jacobian)
Definition: macro_element.h:170
RealScalar s
Definition: level1_cplx_impl.h:130
t
Definition: plotPSD.py:36

References assemble_macro_to_eulerian_jacobian(), s, and plotPSD::t.

◆ assemble_macro_to_eulerian_jacobian2() [1/2]

virtual void oomph::MacroElement::assemble_macro_to_eulerian_jacobian2 ( const unsigned t,
const Vector< double > &  s,
DenseMatrix< double > &  jacobian2 
)
inlinevirtual

Assembles the second derivative jacobian of the mapping from the macro coordinates to the global coordinates

Reimplemented in oomph::QMacroElement< 2 >.

190  {
191  // error message stream
192  std::ostringstream error_message;
193  error_message << "assemble_macro_to_eulerian_jacobian2(...) not \n"
194  << "implemented for this element\n"
195  << std::endl;
196  // throw error
197  throw OomphLibError(
198  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
199  }

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

Referenced by assemble_macro_to_eulerian_jacobian2().

◆ assemble_macro_to_eulerian_jacobian2() [2/2]

void oomph::MacroElement::assemble_macro_to_eulerian_jacobian2 ( const Vector< double > &  s,
DenseMatrix< double > &  jacobian2 
)
inline

Assembles the second derivative jacobian of the mapping from the macro coordinates to the global coordinates

217  {
218  unsigned t = 0;
220  }
virtual void assemble_macro_to_eulerian_jacobian2(const unsigned &t, const Vector< double > &s, DenseMatrix< double > &jacobian2)
Definition: macro_element.h:186

References assemble_macro_to_eulerian_jacobian2(), s, and plotPSD::t.

◆ domain_pt()

Domain*& oomph::MacroElement::domain_pt ( )
inline

Access function to the Domain_pt.

230  {
231  return Domain_pt;
232  }

References Domain_pt.

Referenced by oomph::ExtrudedCubeMeshFromQuadMesh< ELEMENT >::build_mesh().

◆ macro_element_number()

unsigned& oomph::MacroElement::macro_element_number ( )
inline

Access function to the Macro_element_number.

224  {
225  return Macro_element_number;
226  }

References Macro_element_number.

Referenced by oomph::ExtrudedCubeMeshFromQuadMesh< ELEMENT >::build_mesh().

◆ macro_map() [1/3]

virtual void oomph::MacroElement::macro_map ( const double t,
const Vector< double > &  s,
Vector< double > &  r 
)
inlinevirtual

Get global position r(s) at continuous time value, t.

Reimplemented in oomph::QMacroElement< 2 >.

146  {
147  // Create an output stream
148  std::ostringstream error_message_stream;
149 
150  // Create an error message
151  error_message_stream << "The function macro_map(...) is broken virtual\n"
152  << "If you need it, please implement it!"
153  << std::endl;
154 
155  // Throw an error
156  throw OomphLibError(error_message_stream.str(),
159  } // End of macro_map

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ macro_map() [2/3]

virtual void oomph::MacroElement::macro_map ( const unsigned t,
const Vector< double > &  s,
Vector< double > &  r 
)
pure virtual

The time-dependent mapping from local to global coordinates: r(t,s). t is the discrete timelevel: t=0: current time; t>0: previous timestep.

Implemented in oomph::QMacroElement< 3 >, oomph::QMacroElement< 2 >, and oomph::QExtrudedMacroElement< 3 >.

◆ macro_map() [3/3]

◆ operator=()

void oomph::MacroElement::operator= ( const MacroElement )
delete

Broken assignment operator.

◆ output() [1/2]

virtual void oomph::MacroElement::output ( const unsigned t,
std::ostream &  outfile,
const unsigned nplot 
)
pure virtual

Plot: x,y (or x,y,z) in tecplot format at time level t (t=0: current; t>0: previous)

Implemented in oomph::QMacroElement< 3 >, oomph::QMacroElement< 2 >, and oomph::QExtrudedMacroElement< 3 >.

◆ output() [2/2]

void oomph::MacroElement::output ( std::ostream &  outfile,
const int nplot 
)
inline

Plot: x,y (or x,y,z) at current time in tecplot format

112  {
113  unsigned t = 0;
114  output(t, outfile, nplot);
115  }
void output(std::ostream &outfile, const int &nplot)
Definition: macro_element.h:111

References plotPSD::t.

◆ output_macro_element_boundaries()

virtual void oomph::MacroElement::output_macro_element_boundaries ( std::ostream &  outfile,
const unsigned nplot 
)
pure virtual

Output all macro element boundaries as tecplot zones.

Implemented in oomph::QMacroElement< 3 >, oomph::QMacroElement< 2 >, and oomph::QExtrudedMacroElement< 3 >.

Referenced by oomph::Domain::output_macro_element_boundaries().

Member Data Documentation

◆ Domain_pt

◆ Macro_element_number


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