CArl
Code Arlequin / C++ implementation
carl::weight_parameter_function Class Reference

#include <weight_parameter_function.h>

Public Member Functions

 weight_parameter_function (libMesh::Mesh &alpha_mesh, double alpha_eps, double alpha_coupling_BIG, int subdomain_idx_BIG, int subdomain_idx_micro, int subdomain_idx_coupling)
 
 weight_parameter_function (libMesh::Mesh &alpha_mesh)
 
 ~weight_parameter_function ()
 
void set_parameters (double alpha_eps, double alpha_coupling_BIG, int subdomain_idx_BIG, int subdomain_idx_micro, int subdomain_idx_coupling)
 
double get_alpha_BIG (const libMesh::Point &qpoint)
 
double get_alpha_micro (const libMesh::Point &qpoint)
 
void clear ()
 

Protected Attributes

libMesh::Mesh & m_alpha_mesh
 
std::unique_ptr< libMesh::PointLocatorBase > m_locator_unique_ptr
 
double m_alpha_eps
 
double m_alpha_coupling_BIG
 
double m_alpha_coupling_micro
 
int m_subdomain_idx_BIG
 
int m_subdomain_idx_micro
 
int m_subdomain_idx_coupling
 

Detailed Description

Definition at line 16 of file weight_parameter_function.h.

Constructor & Destructor Documentation

carl::weight_parameter_function::weight_parameter_function ( libMesh::Mesh &  alpha_mesh,
double  alpha_eps,
double  alpha_coupling_BIG,
int  subdomain_idx_BIG,
int  subdomain_idx_micro,
int  subdomain_idx_coupling 
)
inline

Definition at line 35 of file weight_parameter_function.h.

37  :
38  m_alpha_mesh{ alpha_mesh },
39  m_locator_unique_ptr { alpha_mesh.sub_point_locator() },
40  m_alpha_eps { alpha_eps },
41  m_alpha_coupling_BIG { alpha_coupling_BIG },
42  m_alpha_coupling_micro { 1. - alpha_coupling_BIG },
43  m_subdomain_idx_BIG { subdomain_idx_BIG },
44  m_subdomain_idx_micro { subdomain_idx_micro },
45  m_subdomain_idx_coupling { subdomain_idx_coupling }
46  {
47  };
std::unique_ptr< libMesh::PointLocatorBase > m_locator_unique_ptr
carl::weight_parameter_function::weight_parameter_function ( libMesh::Mesh &  alpha_mesh)
inline
carl::weight_parameter_function::~weight_parameter_function ( )
inline

Definition at line 62 of file weight_parameter_function.h.

Member Function Documentation

void carl::weight_parameter_function::clear ( )
inline

Definition at line 123 of file weight_parameter_function.h.

124  {
125  m_locator_unique_ptr.reset(NULL);
126  // Nothing to do ... for now
127  };
std::unique_ptr< libMesh::PointLocatorBase > m_locator_unique_ptr
double carl::weight_parameter_function::get_alpha_BIG ( const libMesh::Point &  qpoint)
inline

Definition at line 78 of file weight_parameter_function.h.

79  {
80  libMesh::PointLocatorBase& locator = *m_locator_unique_ptr.get();
81  const libMesh::Elem* elem = locator(qpoint);
82  double output = 0;
83 
84  if(elem->subdomain_id() == m_subdomain_idx_BIG)
85  {
86  output = 1;
87  }
88  else if(elem->subdomain_id() == m_subdomain_idx_micro)
89  {
90  output = m_alpha_eps;
91  }
92  else if(elem->subdomain_id() == m_subdomain_idx_coupling)
93  {
94  output = m_alpha_coupling_BIG;
95  }
96 
97  return output;
98  }
std::unique_ptr< libMesh::PointLocatorBase > m_locator_unique_ptr
double carl::weight_parameter_function::get_alpha_micro ( const libMesh::Point &  qpoint)
inline

Definition at line 100 of file weight_parameter_function.h.

101  {
102  libMesh::PointLocatorBase& locator = *m_locator_unique_ptr.get();
103  const libMesh::Elem* elem = locator(qpoint);
104  double output = 0;
105 
106  if(elem->subdomain_id() == m_subdomain_idx_BIG)
107  {
108  output = 0;
109  }
110  else if(elem->subdomain_id() == m_subdomain_idx_micro)
111  {
112  output = 1 - m_alpha_eps;
113  }
114  else if(elem->subdomain_id() == m_subdomain_idx_coupling)
115  {
116  output = m_alpha_coupling_micro;
117  }
118 
119  return output;
120  }
std::unique_ptr< libMesh::PointLocatorBase > m_locator_unique_ptr
void carl::weight_parameter_function::set_parameters ( double  alpha_eps,
double  alpha_coupling_BIG,
int  subdomain_idx_BIG,
int  subdomain_idx_micro,
int  subdomain_idx_coupling 
)
inline

Definition at line 67 of file weight_parameter_function.h.

69  {
70  m_alpha_eps = alpha_eps;
71  m_alpha_coupling_BIG = alpha_coupling_BIG;
72  m_alpha_coupling_micro = 1. - alpha_coupling_BIG;
73  m_subdomain_idx_BIG = subdomain_idx_BIG;
74  m_subdomain_idx_micro = subdomain_idx_micro;
75  m_subdomain_idx_coupling = subdomain_idx_coupling;
76  };

Member Data Documentation

double carl::weight_parameter_function::m_alpha_coupling_BIG
protected

Definition at line 25 of file weight_parameter_function.h.

double carl::weight_parameter_function::m_alpha_coupling_micro
protected

Definition at line 26 of file weight_parameter_function.h.

double carl::weight_parameter_function::m_alpha_eps
protected

Definition at line 24 of file weight_parameter_function.h.

libMesh::Mesh& carl::weight_parameter_function::m_alpha_mesh
protected

Definition at line 21 of file weight_parameter_function.h.

std::unique_ptr<libMesh::PointLocatorBase> carl::weight_parameter_function::m_locator_unique_ptr
protected

Definition at line 22 of file weight_parameter_function.h.

int carl::weight_parameter_function::m_subdomain_idx_BIG
protected

Definition at line 28 of file weight_parameter_function.h.

int carl::weight_parameter_function::m_subdomain_idx_coupling
protected

Definition at line 30 of file weight_parameter_function.h.

int carl::weight_parameter_function::m_subdomain_idx_micro
protected

Definition at line 29 of file weight_parameter_function.h.


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