ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532.cpp 11.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356
// This code conforms with the UFC specification version 2017.2.0
// and was automatically generated by FFC version 2017.2.0.
//
// This code was generated with the following parameters:
//

//  add_tabulate_tensor_timing:     False
//  convert_exceptions_to_warnings: False
//  cpp_optimize:                   True
//  cpp_optimize_flags:             '-O2'
//  epsilon:                        1e-14
//  error_control:                  False
//  external_include_dirs:          ''
//  external_includes:              ''
//  external_libraries:             ''
//  external_library_dirs:          ''
//  form_postfix:                   False
//  format:                         'ufc'
//  generate_dummy_tabulate_tensor: False
//  max_signature_length:           0
//  no-evaluate_basis_derivatives:  True
//  optimize:                       True
//  precision:                      None
//  quadrature_degree:              None
//  quadrature_rule:                None
//  representation:                 'auto'
//  split:                          False

#include "ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532.h"

// Based on https://gcc.gnu.org/wiki/Visibility
#if defined _WIN32 || defined __CYGWIN__
    #ifdef __GNUC__
        #define DLL_EXPORT __attribute__ ((dllexport))
    #else
        #define DLL_EXPORT __declspec(dllexport)
    #endif
#else
    #define DLL_EXPORT __attribute__ ((visibility ("default")))
#endif

ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_cell_integral_main_otherwise::ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_cell_integral_main_otherwise() : ufc::cell_integral()
{

}

ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_cell_integral_main_otherwise::~ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_cell_integral_main_otherwise()
{

}

const std::vector<bool> & ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_cell_integral_main_otherwise::enabled_coefficients() const
{
static const std::vector<bool> enabled({});
return enabled;
}

void ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_cell_integral_main_otherwise::tabulate_tensor(double * A,
                                    const double * const * w,
                                    const double * coordinate_dofs,
                                    int cell_orientation) const
{
    // This function was generated using 'uflacs' representation
    // with the following integrals metadata:
    // 
    // num_cells:         None
    // optimize:          True
    // precision:         16
    // quadrature_degree: 2
    // quadrature_rule:   'default'
    // representation:    'uflacs'
    // 
    // and the following integral 0 metadata:
    // 
    // estimated_polynomial_degree: 4
    // optimize:                    True
    // precision:                   16
    // quadrature_degree:           2
    // quadrature_rule:             'default'
    // quadrature_scheme:           'default'
    // representation:              'uflacs'
    // Quadrature rules
    alignas(32) static const double weights3[3] = { 0.1666666666666667, 0.1666666666666667, 0.1666666666666667 };
    // Precomputed values of basis functions and precomputations
    // FE* dimensions: [entities][points][dofs]
    // PI* dimensions: [entities][dofs][dofs] or [entities][dofs]
    // PM* dimensions: [entities][dofs][dofs]
    alignas(32) static const double FE3_C0_D01_Q3[1][1][2] = { { { -1.0, 1.0 } } };
    // Unstructured piecewise computations
    const double J_c0 = coordinate_dofs[0] * FE3_C0_D01_Q3[0][0][0] + coordinate_dofs[2] * FE3_C0_D01_Q3[0][0][1];
    const double J_c3 = coordinate_dofs[1] * FE3_C0_D01_Q3[0][0][0] + coordinate_dofs[5] * FE3_C0_D01_Q3[0][0][1];
    const double J_c1 = coordinate_dofs[0] * FE3_C0_D01_Q3[0][0][0] + coordinate_dofs[4] * FE3_C0_D01_Q3[0][0][1];
    const double J_c2 = coordinate_dofs[1] * FE3_C0_D01_Q3[0][0][0] + coordinate_dofs[3] * FE3_C0_D01_Q3[0][0][1];
    alignas(32) double sp[4];
    sp[0] = J_c0 * J_c3;
    sp[1] = J_c1 * J_c2;
    sp[2] = sp[0] + -1 * sp[1];
    sp[3] = std::abs(sp[2]);
    alignas(32) double BF0[3][3] = {};
    for (int iq = 0; iq < 3; ++iq)
    {
        const double fw0 = sp[3] * weights3[iq];
        alignas(32) double TF0[3];
        for (int iq = 0; iq < 3; ++iq)
            TF0[iq] = fw0 * FE6_C0_Q3[0][iq][iq];
        BF0[iq][iq] += TF0[iq] * FE6_C0_Q3[0][iq][iq];
    }
    std::fill(A, A + 9, 0.0);
    for (int i = 0; i < 3; ++i)
        for (int j = 0; j < 3; ++j)
            A[3 * i + j] += BF0[i][j];
}

extern "C" DLL_EXPORT ufc::cell_integral * create_ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_cell_integral_main_otherwise()
{
  return new ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_cell_integral_main_otherwise();
}


ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main() : ufc::form()
{
    // Do nothing
}

ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::~ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main()
{
    // Do nothing
}

const char * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::signature() const
{
    return "51ba4a6892c7258409c64733e68d3a9c93fe29d25ed05b5c00edbe8413834f9891ef1766f7dcf5a646f87114b15a72a6cfd871861b5934e0da9b6d466ae05292";
}

std::size_t ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::rank() const
{
    return 2;
}

std::size_t ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::num_coefficients() const
{
    return 0;
}

std::size_t ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::original_coefficient_position(std::size_t i) const
{
    throw std::runtime_error("Invalid original coefficient index.");
    return i;
}

ufc::finite_element * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_coordinate_finite_element() const
{
    return create_ffc_element_c09ad6d3b8db244401737e4ca70dbd9fdf6d9378_finite_element_main();
}

ufc::dofmap * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_coordinate_dofmap() const
{
    return create_ffc_element_c09ad6d3b8db244401737e4ca70dbd9fdf6d9378_dofmap_main();
}

ufc::coordinate_mapping * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_coordinate_mapping() const
{
    return create_ffc_coordinate_mapping_8563311846154974a92feb530dfcf82f2796d9e1_coordinate_mapping_main();
}

ufc::finite_element * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_finite_element(std::size_t i) const
{
    switch (i)
    {
    case 0:
        return create_ffc_element_b31855883b6654fcbd210a4f97d0b360c2dc7892_finite_element_main();
    case 1:
        return create_ffc_element_b31855883b6654fcbd210a4f97d0b360c2dc7892_finite_element_main();
    default:
        return nullptr;
    }
}

ufc::dofmap * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_dofmap(std::size_t i) const
{
    switch (i)
    {
    case 0:
        return create_ffc_element_b31855883b6654fcbd210a4f97d0b360c2dc7892_dofmap_main();
    case 1:
        return create_ffc_element_b31855883b6654fcbd210a4f97d0b360c2dc7892_dofmap_main();
    default:
        return nullptr;
    }
}

std::size_t ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::max_cell_subdomain_id() const
{
    return 0;
}

std::size_t ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::max_exterior_facet_subdomain_id() const
{
    return 0;
}

std::size_t ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::max_interior_facet_subdomain_id() const
{
    return 0;
}

std::size_t ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::max_vertex_subdomain_id() const
{
    return 0;
}

std::size_t ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::max_custom_subdomain_id() const
{
    return 0;
}

std::size_t ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::max_cutcell_subdomain_id() const
{
    return 0;
}

std::size_t ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::max_interface_subdomain_id() const
{
    return 0;
}

std::size_t ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::max_overlap_subdomain_id() const
{
    return 0;
}

bool ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::has_cell_integrals() const
{
    return true;
}

bool ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::has_exterior_facet_integrals() const
{
    return false;
}

bool ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::has_interior_facet_integrals() const
{
    return false;
}

bool ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::has_vertex_integrals() const
{
    return false;
}

bool ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::has_custom_integrals() const
{
    return false;
}

bool ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::has_cutcell_integrals() const
{
    return false;
}

bool ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::has_interface_integrals() const
{
    return false;
}

bool ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::has_overlap_integrals() const
{
    return false;
}

ufc::cell_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_cell_integral(std::size_t subdomain_id) const
{
    return nullptr;
}

ufc::exterior_facet_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_exterior_facet_integral(std::size_t subdomain_id) const
{
    return nullptr;
}

ufc::interior_facet_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_interior_facet_integral(std::size_t subdomain_id) const
{
    return nullptr;
}

ufc::vertex_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_vertex_integral(std::size_t subdomain_id) const
{
    return nullptr;
}

ufc::custom_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_custom_integral(std::size_t subdomain_id) const
{
    return nullptr;
}

ufc::cutcell_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_cutcell_integral(std::size_t subdomain_id) const
{
    return nullptr;
}

ufc::interface_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_interface_integral(std::size_t subdomain_id) const
{
    return nullptr;
}

ufc::overlap_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_overlap_integral(std::size_t subdomain_id) const
{
    return nullptr;
}

ufc::cell_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_default_cell_integral() const
{
    return create_ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_cell_integral_main_otherwise();
}

ufc::exterior_facet_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_default_exterior_facet_integral() const
{
    return nullptr;
}

ufc::interior_facet_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_default_interior_facet_integral() const
{
    return nullptr;
}

ufc::vertex_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_default_vertex_integral() const
{
    return nullptr;
}

ufc::custom_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_default_custom_integral() const
{
    return nullptr;
}

ufc::cutcell_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_default_cutcell_integral() const
{
    return nullptr;
}

ufc::interface_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_default_interface_integral() const
{
    return nullptr;
}

ufc::overlap_integral * ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main::create_default_overlap_integral() const
{
    return nullptr;
}

extern "C" DLL_EXPORT ufc::form * create_ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main()
{
  return new ffc_form_9bc5ffe367d1e456432d1740919e312cffd43532_form_main();
}