Operator.h 103 KB
Newer Older
Thomas Witkowski's avatar
Thomas Witkowski committed
2001
2002
2003
2004
2005
  {
  public:
    Vec2AtQP_FOT(DOFVectorBase<double> *dv1, DOFVectorBase<double> *dv2,
		 WorldVector<double> *b_);

2006
2007
2008
2009
    Vec2AtQP_FOT(DOFVectorBase<double> *dv1, DOFVectorBase<double> *dv2,
		 int bIdx);
    
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
Thomas Witkowski's avatar
Thomas Witkowski committed
2010
		     Quadrature *quad = NULL);
2011
2012
2013
2014
2015
2016
    
    void getLb(const ElInfo *elInfo, int nPoints, 
	       VectorOfFixVecs<DimVec<double> >& Lb) const;
    
    void eval(int nPoints,
	      const double *uhAtQP,
Thomas Witkowski's avatar
Thomas Witkowski committed
2017
2018
2019
2020
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double factor) const;
2021
    
Thomas Witkowski's avatar
Thomas Witkowski committed
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
  protected:
    DOFVectorBase<double>* vec1;
    DOFVectorBase<double>* vec2;
    double *vec1AtQPs;
    double *vec2AtQPs;  
    WorldVector<double> *b;
  };


  class Vec3FctAtQP_FOT : public FirstOrderTerm
  {
  public:
2034
2035
2036
    Vec3FctAtQP_FOT(DOFVectorBase<double> *dv1, DOFVectorBase<double> *dv2, DOFVectorBase<double> *dv3,
		    BinaryAbstractFunction<double, double, double> *f,
		    WorldVector<double> *b);
Thomas Witkowski's avatar
Thomas Witkowski committed
2037
    
2038
2039
2040
    Vec3FctAtQP_FOT(DOFVectorBase<double> *dv1, DOFVectorBase<double> *dv2, DOFVectorBase<double> *dv3,
		    BinaryAbstractFunction<double, double, double> *f,
		    int b);
Thomas Witkowski's avatar
Thomas Witkowski committed
2041
2042
2043
2044
    
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);
    
2045
2046
    void getLb(const ElInfo *elInfo, int nPoints, 
	       VectorOfFixVecs<DimVec<double> >& Lb) const;
Thomas Witkowski's avatar
Thomas Witkowski committed
2047
2048
    
    void eval(int nPoints,
2049
	      const double *uhAtQP,
Thomas Witkowski's avatar
Thomas Witkowski committed
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double factor) const;
    
  protected:
    DOFVectorBase<double>* vec1;
    DOFVectorBase<double>* vec2;
    DOFVectorBase<double>* vec3;
    BinaryAbstractFunction<double, double, double>* f;
    double *vec1AtQPs;
    double *vec2AtQPs;  
    double *vec3AtQPs;  
    WorldVector<double> *b;
  };


2067
2068
2069
  class General_FOT : public FirstOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2070
    /// Constructor
2071
2072
    General_FOT(std::vector<DOFVectorBase<double>*> vecs,
		std::vector<DOFVectorBase<double>*> grads,
2073
2074
		TertiaryAbstractFunction<WorldVector<double>, 
		WorldVector<double>,
2075
		std::vector<double>, 
Thomas Witkowski's avatar
Thomas Witkowski committed
2076
		std::vector<WorldVector<double> > > *f);
2077

Thomas Witkowski's avatar
Thomas Witkowski committed
2078
    /// Implementation of \ref OperatorTerm::initElement().
2079
2080
2081
2082
    void initElement(const ElInfo*, 
		     SubAssembler* ,
		     Quadrature *quad= NULL);

Thomas Witkowski's avatar
Thomas Witkowski committed
2083
    /// Implements FirstOrderTerm::getLb().
Thomas Witkowski's avatar
Thomas Witkowski committed
2084
    void getLb(const ElInfo *elInfo, int nPoints, 
2085
2086
	       VectorOfFixVecs<DimVec<double> >& result) const;

Thomas Witkowski's avatar
Thomas Witkowski committed
2087
    /// Implenetation of FirstOrderTerm::eval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2088
2089
    void eval(int nPoints,
	      const double *uhAtQP,
2090
2091
2092
2093
2094
2095
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double factor) const;

  protected:
2096
    std::vector<DOFVectorBase<double>*> vecs_; 
2097

2098
    std::vector<DOFVectorBase<double>*> grads_;
2099
2100
2101

    TertiaryAbstractFunction<WorldVector<double>, 
			     WorldVector<double>,
2102
2103
			     std::vector<double>, 
			     std::vector<WorldVector<double> > > *f_;
2104
2105
2106

    WorldVector<double> *coordsAtQPs_;

2107
    std::vector<double*> vecsAtQPs_;
2108

2109
    std::vector<WorldVector<double>*> gradsAtQPs_;
2110
2111
2112
2113
2114
  };

  class GeneralParametric_FOT : public FirstOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2115
    /// Constructor
2116
2117
    GeneralParametric_FOT(std::vector<DOFVectorBase<double>*> vecs,
			  std::vector<DOFVectorBase<double>*> grads,
2118
2119
2120
			  QuartAbstractFunction<WorldVector<double>, 
			  WorldVector<double>,
			  WorldVector<double>,
2121
			  std::vector<double>, 
Thomas Witkowski's avatar
Thomas Witkowski committed
2122
			  std::vector<WorldVector<double> > > *f);
2123
2124
2125
2126

    /** \brief
     * Implementation of \ref OperatorTerm::initElement().
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
2127
    void initElement(const ElInfo*, SubAssembler*,
2128
2129
2130
2131
2132
		     Quadrature *quad= NULL);

    /** \brief
     * Implements FirstOrderTerm::getLb().
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
2133
    void getLb(const ElInfo *elInfo, int nPoints, 
2134
2135
2136
2137
2138
	       VectorOfFixVecs<DimVec<double> >& result) const;

    /** \brief
     * Implenetation of FirstOrderTerm::eval().
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
2139
2140
    void eval(int nPoints,
	      const double *uhAtQP,
2141
2142
2143
2144
2145
2146
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double factor) const;

  protected:
2147
    std::vector<DOFVectorBase<double>*> vecs_; 
2148

2149
    std::vector<DOFVectorBase<double>*> grads_;
2150
2151
2152
2153

    QuartAbstractFunction<WorldVector<double>, 
			  WorldVector<double>,
			  WorldVector<double>,
2154
2155
			  std::vector<double>, 
			  std::vector<WorldVector<double> > > *f_;
2156
2157
2158
2159

    WorldVector<double> *coordsAtQPs_;
    WorldVector<double> elementNormal_;

2160
    std::vector<double*> vecsAtQPs_;
2161

2162
    std::vector<WorldVector<double>*> gradsAtQPs_;
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
  };


  // ============================================================================
  // ===== class ZeroOrderTerm ==================================================
  // ============================================================================

  /**
   * \ingroup Assembler
   *
   * \brief
   * Describes zero order terms: \f$ cu(\vec{x}) \f$.
   */
  class ZeroOrderTerm : public OperatorTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2179
    /// Constructor.
Thomas Witkowski's avatar
Thomas Witkowski committed
2180
    ZeroOrderTerm(int deg) : OperatorTerm(deg) {}
2181
2182
2183
2184

    /** \brief
     * Destructor.
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
2185
    virtual ~ZeroOrderTerm() {}
2186
2187
2188
2189
2190

    /** \brief
     * Evaluates \f$ c \f$
     */
    virtual void getC(const ElInfo *elInfo,
Thomas Witkowski's avatar
Thomas Witkowski committed
2191
		      int nPoints,
2192
		      std::vector<double> &C) const = 0;
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204

  };

  /**
   * \ingroup Assembler
   *
   * \brief
   * Simple zero order term
   */
  class Simple_ZOT : public ZeroOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2205
    /// Constructor.
Thomas Witkowski's avatar
Thomas Witkowski committed
2206
    Simple_ZOT(double f = 1.0) : ZeroOrderTerm(0), factor(f) {}
2207

2208
2209
    /// Implements ZeroOrderTerm::getC().
    inline void getC(const ElInfo *, int nPoints, std::vector<double> &C) const 
2210
    {
2211
      for (int iq = 0; iq < nPoints; iq++)
2212
	C[iq] += factor; 
Thomas Witkowski's avatar
Thomas Witkowski committed
2213
    }
2214

Thomas Witkowski's avatar
Thomas Witkowski committed
2215
    /// Implements ZeroOrderTerm::eval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2216
2217
    inline void eval(int nPoints,
		     const double *uhAtQP,
2218
2219
2220
2221
2222
		     const WorldVector<double> *,
		     const WorldMatrix<double> *,
		     double *result,
		     double fac) const 
    {
2223
      for (int iq = 0; iq < nPoints; iq++)
2224
	result[iq] += fac * factor * uhAtQP[iq];
Thomas Witkowski's avatar
Thomas Witkowski committed
2225
    }
2226
2227
 
  protected:
Thomas Witkowski's avatar
Thomas Witkowski committed
2228
    /// Constant factor of zero order term.
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
    double factor;
  };

  /**
   * \ingroup Assembler
   *
   * \brief
   * Zero order term: \f$ f(v(\vec{x})) u(\vec{x})\f$
   */
  class VecAtQP_ZOT : public ZeroOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2241
    /// Constructor.
2242
    VecAtQP_ZOT(DOFVectorBase<double> *dv,
Thomas Witkowski's avatar
Thomas Witkowski committed
2243
		AbstractFunction<double, double> *ab);
2244

Thomas Witkowski's avatar
Thomas Witkowski committed
2245
2246
2247
2248
2249
2250
2251
2252
2253
    /// Implementation of \ref OperatorTerm::initElement().
    void initElement(const ElInfo* elInfo, 
		     SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

    /// Implementation of \ref OperatorTerm::initElement() for multilpe meshes.
    void initElement(const ElInfo* smallElInfo,
		     const ElInfo* largeElInfo,
		     SubAssembler* subAssembler,
2254
2255
		     Quadrature *quad = NULL);

2256
2257
    /// Implements ZeroOrderTerm::getC().
    void getC(const ElInfo *, int nPoints, std::vector<double> &C) const;
2258

2259
    /// Implements ZeroOrderTerm::eval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2260
2261
    void eval(int nPoints,
	      const double *uhAtQP,
2262
2263
2264
2265
2266
2267
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double fac) const;

  protected:
2268
    /// DOFVector to be evaluated at quadrature points.
2269
2270
    DOFVectorBase<double>* vec;

2271
    /// Vector v at quadrature points.
2272
2273
    double *vecAtQPs;

2274
    /// Function for c.
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
    AbstractFunction<double, double> *f;
  };

  /**
   * \ingroup Assembler
   *
   * \brief
   * Zero order term: \f$ f(v(\vec{x})) g(w(\vec{x})) u(\vec{x})\f$
   */
  class MultVecAtQP_ZOT : public ZeroOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2287
    /// Constructor.
2288
2289
    MultVecAtQP_ZOT(DOFVectorBase<double> *dv1,
		    DOFVectorBase<double> *dv2,
Thomas Witkowski's avatar
Thomas Witkowski committed
2290
2291
		    AbstractFunction<double, double> *f1,
		    AbstractFunction<double, double> *f2);
2292

2293
    /// Implementation of \ref OperatorTerm::initElement().
2294
2295
2296
2297
2298
2299
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

    /** \brief
     * Implements ZeroOrderTerm::getC().
     */
2300
    void getC(const ElInfo *, int nPoints, std::vector<double> &C) const;
2301
2302
2303
2304

    /** \brief
     * Implements ZeroOrderTerm::eval().
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
2305
2306
    void eval(int nPoints,
	      const double *uhAtQP,
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double fac) const;

  protected:
    /** \brief
     * DOFVectorBase to be evaluated at quadrature points.
     */
    DOFVectorBase<double>* vec1;
    DOFVectorBase<double>* vec2;

    /** \brief
     * Vector v at quadrature points.
     */
    double *vecAtQPs1;
    double *vecAtQPs2;

    /** \brief
     * Function for c.
     */
    AbstractFunction<double, double> *f1;
    AbstractFunction<double, double> *f2;
  };

  /**
   * \ingroup Assembler
   *
   * \brief
   * Zero order term: \f$ f(v(\vec{x}), w(\vec{x})) u(\vec{x})\f$
   */
  class Vec2AtQP_ZOT : public ZeroOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2341
    /// Constructor.
2342
2343
    Vec2AtQP_ZOT(DOFVectorBase<double> *dv1,
		 DOFVectorBase<double> *dv2,
Thomas Witkowski's avatar
Thomas Witkowski committed
2344
		 BinaryAbstractFunction<double, double, double> *f);
2345

Thomas Witkowski's avatar
Thomas Witkowski committed
2346
    /// Implementation of \ref OperatorTerm::initElement().
2347
2348
2349
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

Thomas Witkowski's avatar
Thomas Witkowski committed
2350
2351
2352
2353
2354
    /// Implementation of \ref OperatorTerm::initElement() for multilpe meshes.
    void initElement(const ElInfo* smallElInfo,
		     const ElInfo* largeElInfo,
		     SubAssembler* subAssembler,
		     Quadrature *quad = NULL);
2355

Thomas Witkowski's avatar
Thomas Witkowski committed
2356
    /// Implements ZeroOrderTerm::getC().
2357
    void getC(const ElInfo *, int nPoints, std::vector<double> &C) const;
Thomas Witkowski's avatar
Thomas Witkowski committed
2358
2359
2360
2361

    /// Implements ZeroOrderTerm::eval().
    void eval(int nPoints,
	      const double *uhAtQP,
2362
2363
2364
2365
2366
2367
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double fac) const;

  protected:
Thomas Witkowski's avatar
Thomas Witkowski committed
2368
    /// First DOFVector to be evaluated at quadrature points.
2369
    DOFVectorBase<double>* vec1;
Thomas Witkowski's avatar
Thomas Witkowski committed
2370
    /// Second DOFVector to be evaluated at quadrature points.
2371
2372
    DOFVectorBase<double>* vec2;

Thomas Witkowski's avatar
Thomas Witkowski committed
2373
    /// Values of the first DOFVector at the quadrature points.
2374
    double *vecAtQPs1;
Thomas Witkowski's avatar
Thomas Witkowski committed
2375
    /// Values of the second DOFVector at the quadrature points.
2376
2377
    double *vecAtQPs2;

Thomas Witkowski's avatar
Thomas Witkowski committed
2378
    /// Function for c.
2379
2380
2381
    BinaryAbstractFunction<double, double, double> *f;
  };

2382
2383
2384
2385
2386
2387
2388
2389
2390
2391

  /**
   * \ingroup Assembler
   *
   * \brief
   * Zero order term: \f$ f(v(\vec{x}), w(\vec{x})) u(\vec{x})\f$
   */
  class Vec3AtQP_ZOT : public ZeroOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2392
    /// Constructor.
2393
2394
2395
    Vec3AtQP_ZOT(DOFVectorBase<double> *dv1,
		 DOFVectorBase<double> *dv2,
		 DOFVectorBase<double> *dv3,
Thomas Witkowski's avatar
Thomas Witkowski committed
2396
		 TertiaryAbstractFunction<double, double, double, double> *f);
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406

    /** \brief
     * Implementation of \ref OperatorTerm::initElement().
     */
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

    /** \brief
     * Implements ZeroOrderTerm::getC().
     */
2407
    void getC(const ElInfo *, int nPoints, std::vector<double> &C) const;
2408
2409
2410
2411

    /** \brief
     * Implements ZeroOrderTerm::eval().
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
2412
    void eval(int nPoints,
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
	      const double *uhAtQP,
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double fac) const;

  protected:
    /** \brief
     * DOFVector to be evaluated at quadrature points.
     */
    DOFVectorBase<double>* vec1;
    DOFVectorBase<double>* vec2;
    DOFVectorBase<double>* vec3;

    /** \brief
     * Vector v at quadrature points.
     */
    double *vecAtQPs1;
    double *vecAtQPs2;
    double *vecAtQPs3;

    /** \brief
     * Function for c.
     */
    TertiaryAbstractFunction<double, double, double, double> *f;
  };

2440
2441
2442
2443
2444
2445
2446
2447
2448
2449

  /**
   * \ingroup Assembler
   *
   * \brief
   * 
   */
  class FctGradientCoords_ZOT : public ZeroOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2450
    /// Constructor.
2451
    FctGradientCoords_ZOT(DOFVectorBase<double> *dv,
Thomas Witkowski's avatar
Thomas Witkowski committed
2452
			  BinaryAbstractFunction<double, WorldVector<double>, WorldVector<double> > *f);
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462

    /** \brief
     * Implementation of \ref OperatorTerm::initElement().
     */
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

    /** \brief
     * Implements SecondOrderTerm::getC().
     */
2463
    void getC(const ElInfo *elInfo, int nPoints, std::vector<double> &C) const;
2464
2465
2466
2467

    /** \brief
     * Implements ZeroOrderTerm::eval().
     */
Thomas Witkowski's avatar
Thomas Witkowski committed
2468
2469
    void eval(int nPoints,
	      const double *uhAtQP,
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double fac) const;

  protected:
    DOFVectorBase<double>* vec;

    /** \brief
     * Function wich maps \ref gradAtQPs to a double.
     */
    BinaryAbstractFunction<double, WorldVector<double>, WorldVector<double> > *f;

    /** \brief
     * Pointer to a WorldVector<double> array containing the gradients of the DOFVector
     * at each quadrature point.
     */
    WorldVector<double>* gradAtQPs;

    WorldVector<double>* coordsAtQPs;

  };

  /**
   * \ingroup Assembler
   *
   * \brief
   */
  class VecGradCoordsAtQP_ZOT : public ZeroOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2501
    /// Constructor.
2502
    VecGradCoordsAtQP_ZOT(DOFVectorBase<double> *dv,
Thomas Witkowski's avatar
Thomas Witkowski committed
2503
			  TertiaryAbstractFunction<double, double, WorldVector<double>, WorldVector<double> > *f);
2504

Thomas Witkowski's avatar
Thomas Witkowski committed
2505
    /// Implementation of \ref OperatorTerm::initElement().
2506
2507
2508
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

Thomas Witkowski's avatar
Thomas Witkowski committed
2509
    /// Implements ZeroOrderTerm::getC().
2510
    void getC(const ElInfo *, int nPoints, std::vector<double> &C) const;
2511

Thomas Witkowski's avatar
Thomas Witkowski committed
2512
    /// Implements ZeroOrderTerm::eval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2513
2514
    void eval(int nPoints,
	      const double *uhAtQP,
2515
2516
2517
2518
2519
2520
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double fac) const;

  protected:
Thomas Witkowski's avatar
Thomas Witkowski committed
2521
    /// DOFVector to be evaluated at quadrature points.
2522
2523
    DOFVectorBase<double>* vec;

Thomas Witkowski's avatar
Thomas Witkowski committed
2524
    /// Vector v at quadrature points.
2525
2526
    double *vecAtQPs;

Thomas Witkowski's avatar
Thomas Witkowski committed
2527
    /// Gradient at quadrature points.
2528
2529
2530
2531
    WorldVector<double>* gradAtQPs;

    WorldVector<double>* coordsAtQPs;

Thomas Witkowski's avatar
Thomas Witkowski committed
2532
    /// Function for c.
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
    TertiaryAbstractFunction<double, double, WorldVector<double>, WorldVector<double> > *f;
  };

  /**
   * \ingroup Assembler
   *
   * \brief
   */
  class VecAndCoordsAtQP_ZOT : public ZeroOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2544
    /// Constructor.
2545
    VecAndCoordsAtQP_ZOT(DOFVectorBase<double> *dv,
Thomas Witkowski's avatar
Thomas Witkowski committed
2546
			 BinaryAbstractFunction<double, double, WorldVector<double> > *f);
2547

Thomas Witkowski's avatar
Thomas Witkowski committed
2548
    /// Implementation of \ref OperatorTerm::initElement().
2549
2550
2551
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

Thomas Witkowski's avatar
Thomas Witkowski committed
2552
    /// Implements ZeroOrderTerm::getC().
2553
    void getC(const ElInfo *, int nPoints, std::vector<double> &C) const;
2554

Thomas Witkowski's avatar
Thomas Witkowski committed
2555
    /// Implements ZeroOrderTerm::eval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2556
2557
    void eval(int nPoints,
	      const double *uhAtQP,
2558
2559
2560
2561
2562
2563
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double fac) const;

  protected:
Thomas Witkowski's avatar
Thomas Witkowski committed
2564
    /// DOFVector to be evaluated at quadrature points.
2565
2566
    DOFVectorBase<double>* vec;

Thomas Witkowski's avatar
Thomas Witkowski committed
2567
    /// Vector v at quadrature points.
2568
2569
    double *vecAtQPs;

Thomas Witkowski's avatar
Thomas Witkowski committed
2570
    /// Gradient at quadrature points.
2571
2572
    WorldVector<double>* coordsAtQPs;

Thomas Witkowski's avatar
Thomas Witkowski committed
2573
    /// Function for c.
2574
2575
2576
2577
    BinaryAbstractFunction<double, double, WorldVector<double> > *f;
  };


2578
2579
2580
2581
2582
2583
2584
2585
  /**
   * \ingroup Assembler
   *
   * \brief
   */
  class Vec2AndGradAtQP_ZOT : public ZeroOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2586
    /// Constructor.
2587
    Vec2AndGradAtQP_ZOT(DOFVectorBase<double> *dv1, DOFVectorBase<double> *dv2,
Thomas Witkowski's avatar
Thomas Witkowski committed
2588
			TertiaryAbstractFunction<double, double, WorldVector<double>, double > *af);
2589

Thomas Witkowski's avatar
Thomas Witkowski committed
2590
    /// Implementation of \ref OperatorTerm::initElement().
2591
2592
2593
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

Thomas Witkowski's avatar
Thomas Witkowski committed
2594
    /// Implements ZeroOrderTerm::getC().
2595
    void getC(const ElInfo *, int nPoints, std::vector<double> &C) const;
2596

Thomas Witkowski's avatar
Thomas Witkowski committed
2597
    /// Implements ZeroOrderTerm::eval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2598
2599
    void eval(int nPoints,
	      const double *uhAtQP,
2600
2601
2602
2603
2604
2605
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double fac) const;

  protected:
Thomas Witkowski's avatar
Thomas Witkowski committed
2606
    /// DOFVector to be evaluated at quadrature points.
2607
2608
2609
    DOFVectorBase<double>* vec1;
    DOFVectorBase<double>* vec2;

Thomas Witkowski's avatar
Thomas Witkowski committed
2610
    /// Vector v at quadrature points.
2611
2612
2613
    double *vecAtQPs1;
    double *vecAtQPs2;

Thomas Witkowski's avatar
Thomas Witkowski committed
2614
    /// Gradient at quadrature points.
2615
2616
    WorldVector<double> *gradAtQPs;

Thomas Witkowski's avatar
Thomas Witkowski committed
2617
    /// Function for c.
2618
2619
    TertiaryAbstractFunction<double, double, WorldVector<double>, double > *f;
  };
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630


  /**
   * \ingroup Assembler
   *
   * \brief
   * 
   */
  class FctGradient_ZOT : public ZeroOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2631
    /// Constructor.
2632
    FctGradient_ZOT(DOFVectorBase<double> *dv,
Thomas Witkowski's avatar
Thomas Witkowski committed
2633
		    AbstractFunction<double, WorldVector<double> > *f);
2634

Thomas Witkowski's avatar
Thomas Witkowski committed
2635
    /// Implementation of \ref OperatorTerm::initElement().
2636
2637
2638
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

Thomas Witkowski's avatar
Thomas Witkowski committed
2639
    /// Implements SecondOrderTerm::getC().
2640
    void getC(const ElInfo *elInfo, int nPoints, std::vector<double> &C) const;
2641

Thomas Witkowski's avatar
Thomas Witkowski committed
2642
    /// Implements ZeroOrderTerm::eval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2643
2644
    void eval(int nPoints,
	      const double *uhAtQP,
2645
2646
2647
2648
2649
2650
2651
2652
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double fac) const;

  protected:
    DOFVectorBase<double>* vec;

Thomas Witkowski's avatar
Thomas Witkowski committed
2653
    /// Function wich maps \ref gradAtQPs to a double.
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
    AbstractFunction<double, WorldVector<double> > *f;

    /** \brief
     * Pointer to a WorldVector<double> array containing the gradients of the DOFVector
     * at each quadrature point.
     */
    WorldVector<double>* gradAtQPs;

  };

  /**
   * \ingroup Assembler
   *
   * \brief
   */
  class VecAndGradAtQP_ZOT : public ZeroOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2672
    /// Constructor.
2673
    VecAndGradAtQP_ZOT(DOFVectorBase<double> *dv,
Thomas Witkowski's avatar
Thomas Witkowski committed
2674
		       BinaryAbstractFunction<double, double, WorldVector<double> > *f);
2675

Thomas Witkowski's avatar
Thomas Witkowski committed
2676
    /// Implementation of \ref OperatorTerm::initElement().
2677
2678
2679
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

Thomas Witkowski's avatar
Thomas Witkowski committed
2680
    /// Implements ZeroOrderTerm::getC().
2681
    void getC(const ElInfo *, int nPoints, std::vector<double> &C) const;
2682

Thomas Witkowski's avatar
Thomas Witkowski committed
2683
    /// Implements ZeroOrderTerm::eval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2684
2685
    void eval(int nPoints,
	      const double *uhAtQP,
2686
2687
2688
2689
2690
2691
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double fac) const;

  protected:
Thomas Witkowski's avatar
Thomas Witkowski committed
2692
    /// DOFVector to be evaluated at quadrature points.
2693
2694
    DOFVectorBase<double>* vec;

Thomas Witkowski's avatar
Thomas Witkowski committed
2695
    /// Vector v at quadrature points.
2696
2697
    double *vecAtQPs;

Thomas Witkowski's avatar
Thomas Witkowski committed
2698
    /// Gradient at quadrature points.
2699
2700
    WorldVector<double> *gradAtQPs;

Thomas Witkowski's avatar
Thomas Witkowski committed
2701
    /// Function for c.
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
    BinaryAbstractFunction<double, double, WorldVector<double> > *f;
  };

  /**
   * \ingroup Assembler
   *
   * \brief
   */
  class VecAndGradAtQP_SOT : public SecondOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2713
    /// Constructor.
2714
    VecAndGradAtQP_SOT(DOFVectorBase<double> *dv,
Thomas Witkowski's avatar
Thomas Witkowski committed
2715
		       BinaryAbstractFunction<double, double, WorldVector<double> > *af);
2716

Thomas Witkowski's avatar
Thomas Witkowski committed
2717
    /// Implementation of \ref OperatorTerm::initElement().
2718
2719
2720
2721
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);


Thomas Witkowski's avatar
Thomas Witkowski committed
2722
    /// Implements SecondOrderTerm::getLALt().
Thomas Witkowski's avatar
Thomas Witkowski committed
2723
    inline void getLALt(const ElInfo *elInfo, int nPoints, DimMat<double> **LALt) const;
2724

Thomas Witkowski's avatar
Thomas Witkowski committed
2725
    /// Implements SecondOrderTerm::eval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2726
2727
    void eval(int nPoints,
	      const double *uhAtQP,
2728
2729
2730
2731
2732
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double factor) const;

Thomas Witkowski's avatar
Thomas Witkowski committed
2733
    /// Implements SecondOrderTerm::weakEval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2734
    void weakEval(int nPoints,
2735
2736
2737
2738
		  const WorldVector<double> *grdUhAtQP,
		  WorldVector<double> *result) const;
  
  protected:
Thomas Witkowski's avatar
Thomas Witkowski committed
2739
    /// DOFVector to be evaluated at quadrature points.
2740
2741
    DOFVectorBase<double>* vec;

Thomas Witkowski's avatar
Thomas Witkowski committed
2742
    /// Vector v at quadrature points.
2743
2744
    double *vecAtQPs;

Thomas Witkowski's avatar
Thomas Witkowski committed
2745
    /// Gradient at quadrature points.
2746
2747
    WorldVector<double> *gradAtQPs;

Thomas Witkowski's avatar
Thomas Witkowski committed
2748
    /// Function for c.
2749
2750
2751
    BinaryAbstractFunction<double, double, WorldVector<double> > *f;
  };

Thomas Witkowski's avatar
Thomas Witkowski committed
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773

  /**
   * \ingroup Assembler
   *
   * \brief
   * Second order term: \f$ f(v(\vec{x}),\nabla w(\vec{x})) \Delta u(\vec{x})\f$
   */
  class VecGrad_SOT : public SecondOrderTerm
  {
  public:
    /// Constructor.
    VecGrad_SOT( DOFVectorBase<double> *dv1,
			  DOFVectorBase<double> *dv2,
		       BinaryAbstractFunction<double, double, WorldVector<double> > *f_)
      : SecondOrderTerm(f_->getDegree()), vec1(dv1), vec2(dv2), f(f_) 
    {}

    /// Implementation of \ref OperatorTerm::initElement().
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

    /// Implements SecondOrderTerm::getLALt().
Thomas Witkowski's avatar
Thomas Witkowski committed
2774
    inline void getLALt(const ElInfo *elInfo, int nPoints, DimMat<double> **LALt) const;
Thomas Witkowski's avatar
Thomas Witkowski committed
2775
2776

    /// Implements SecondOrderTerm::eval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2777
2778
    void eval(int nPoints,
	      const double *uhAtQP,
Thomas Witkowski's avatar
Thomas Witkowski committed
2779
2780
2781
2782
2783
2784
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double factor) const;

    /// Implements SecondOrderTerm::weakEval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2785
    void weakEval(int nPoints,
Thomas Witkowski's avatar
Thomas Witkowski committed
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
		  const WorldVector<double> *grdUhAtQP,
		  WorldVector<double> *result) const;
  
  protected:
    /// DOFVectors to be evaluated at quadrature points.
    DOFVectorBase<double>* vec1;
    DOFVectorBase<double>* vec2;

    /// Vector v at quadrature points.
    double *vecAtQPs;

    /// Gradient at quadrature points.
    WorldVector<double> *gradAtQPs;

    /// Function for c.
    BinaryAbstractFunction<double, double, WorldVector<double> > *f;
  };


2805
2806
2807
2808
2809
2810
2811
2812
2813
  /* 
   * \ingroup Assembler
   *
   * \brief
   * Zero order term: \f$ f(\vec{x}) u(\vec{x})\f$
   */
  class CoordsAtQP_ZOT : public ZeroOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2814
2815
2816
    /// Constructor.
    CoordsAtQP_ZOT(AbstractFunction<double, WorldVector<double> > *af)
      : ZeroOrderTerm(af->getDegree()), g(af) 
Thomas Witkowski's avatar
Thomas Witkowski committed
2817
    {}
2818

Thomas Witkowski's avatar
Thomas Witkowski committed
2819
    /// Implementation of \ref OperatorTerm::initElement().
2820
2821
2822
2823
    void initElement(const ElInfo* elInfo, 
		     SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

Thomas Witkowski's avatar
Thomas Witkowski committed
2824
    /// Implements ZeroOrderTerm::getC().
2825
    void getC(const ElInfo *, int nPoints, std::vector<double> &C) const;
2826

Thomas Witkowski's avatar
Thomas Witkowski committed
2827
    /// Implements ZeroOrderTerm::eval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2828
2829
    void eval(int nPoints,
	      const double *uhAtQP,
2830
2831
2832
2833
2834
2835
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double fac) const;

  protected:
Thomas Witkowski's avatar
Thomas Witkowski committed
2836
    /// Stores coordinates at quadrature points. Set in \ref initElement().
2837
2838
    WorldVector<double>* coordsAtQPs;

Thomas Witkowski's avatar
Thomas Witkowski committed
2839
    /// Function for c.
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
    AbstractFunction<double, WorldVector<double> > *g;
  };

  /** 
   * \ingroup Assembler
   *
   * \brief
   * SecondOrderTerm where A(x) is a WorldMatrix having a in all positions
   * except possibly the position IJ
   * \f$ \nabla \cdot A(x) \nabla u(\vec{x}) \f$
   */
  class CoordsAtQP_IJ_SOT : public SecondOrderTerm 
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2854
2855
    /// Constructor.
    CoordsAtQP_IJ_SOT(AbstractFunction<double, WorldVector<double> > *af,
2856
		      int x_i, int x_j) 
Thomas Witkowski's avatar
Thomas Witkowski committed
2857
      : SecondOrderTerm(af->getDegree()), g(af), xi(x_i), xj(x_j)
2858
2859
    {
      setSymmetric(xi == xj);
Thomas Witkowski's avatar
Thomas Witkowski committed
2860
    }
2861

Thomas Witkowski's avatar
Thomas Witkowski committed
2862
    /// Implementation of \ref OperatorTerm::initElement().
2863
2864
2865
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

Thomas Witkowski's avatar
Thomas Witkowski committed
2866
    /// Implements SecondOrderTerm::getLALt().
Thomas Witkowski's avatar
Thomas Witkowski committed
2867
    inline void getLALt(const ElInfo *elInfo, int nPoints, DimMat<double> **LALt) const;
2868

Thomas Witkowski's avatar
Thomas Witkowski committed
2869
    /// Implements SecondOrderTerm::eval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2870
2871
    void eval(int nPoints,
	      const double *uhAtQP,
2872
2873
2874
2875
2876
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double factor) const;

Thomas Witkowski's avatar
Thomas Witkowski committed
2877
    /// Implements SecondOrderTerm::weakEval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2878
    void weakEval(int nPoints,
2879
2880
2881
2882
		  const WorldVector<double> *grdUhAtQP,
		  WorldVector<double> *result) const;
  
  private:
Thomas Witkowski's avatar
Thomas Witkowski committed
2883
    /// Stores coordinates at quadrature points. Set in \ref initElement().
2884
2885
    WorldVector<double>* coordsAtQPs;

Thomas Witkowski's avatar
Thomas Witkowski committed
2886
    /// Function evaluated at quadrature points.
2887
2888
    AbstractFunction<double, WorldVector<double> > *g;

Thomas Witkowski's avatar
Thomas Witkowski committed
2889
    /// Directions for the derivatives.
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
    int xi, xj;
  };

  /**
   * \ingroup Assembler
   *  
   * \brief
   * SecondOrderTerm where A is a WorldMatrix having a in all positions
   * except possibly the position IJ, multiplied with a function
   * evaluated at the quadrature points of a given DOFVector:
   * \f$ \nabla \cdot f(v(\vec{x})) A \nabla u(\vec{x}) \f$
   */
  class VecAtQP_IJ_SOT : public SecondOrderTerm
  {
  public:
Thomas Witkowski's avatar
Thomas Witkowski committed
2905
2906
2907
    /// Constructor.
    VecAtQP_IJ_SOT(DOFVectorBase<double> *dv, AbstractFunction<double, double> *af,
		   int x_i, int x_j);
2908

Thomas Witkowski's avatar
Thomas Witkowski committed
2909
    /// Implementation of \ref OperatorTerm::initElement().
2910
2911
2912
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

Thomas Witkowski's avatar
Thomas Witkowski committed
2913
    /// Implements SecondOrderTerm::getLALt().
Thomas Witkowski's avatar
Thomas Witkowski committed
2914
    void getLALt(const ElInfo *elInfo, int nPoints, DimMat<double> **LALt) const;    
2915

Thomas Witkowski's avatar
Thomas Witkowski committed
2916
    /// Implements SecondOrderTerm::eval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2917
2918
    void eval(int nPoints,
	      const double *uhAtQP,
2919
2920
2921
2922
2923
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double factor) const;

Thomas Witkowski's avatar
Thomas Witkowski committed
2924
    /// Implements SecondOrderTerm::weakEval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2925
    void weakEval(int nPoints,
2926
2927
2928
2929
		  const WorldVector<double> *grdUhAtQP,
		  WorldVector<double> *result) const; 
  
  protected:
Thomas Witkowski's avatar
Thomas Witkowski committed
2930
    /// DOFVector to be evaluated at quadrature points.
2931
2932
    DOFVectorBase<double>* vec;

Thomas Witkowski's avatar
Thomas Witkowski committed
2933
    /// Pointer to an array containing the DOFVector evaluated at quadrature points.
2934
2935
    double* vecAtQPs;

Thomas Witkowski's avatar
Thomas Witkowski committed
2936
    /// Function evaluated at \ref vecAtQPs.
2937
2938
2939
    AbstractFunction<double, double> *f;

  private:
Thomas Witkowski's avatar
Thomas Witkowski committed
2940
    /// Directions for the derivatives.
2941
2942
2943
2944
2945
2946
    int xi, xj;
  };

  class VecAndGradVecAtQP_ZOT : public ZeroOrderTerm 
  { 
  public: 
Thomas Witkowski's avatar
Thomas Witkowski committed
2947
    /// Constructor. 
2948
2949
    VecAndGradVecAtQP_ZOT(DOFVectorBase<double> *dv, 
			  DOFVectorBase<double> *dGrd,
Thomas Witkowski's avatar
Thomas Witkowski committed
2950
			  BinaryAbstractFunction<double, double, WorldVector<double> > *f);
2951

Thomas Witkowski's avatar
Thomas Witkowski committed
2952
    /// Implementation of \ref OperatorTerm::initElement().
2953
2954
2955
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

Thomas Witkowski's avatar
Thomas Witkowski committed
2956
    /// Implements ZeroOrderTerm::getC().
2957
    void getC(const ElInfo *, int nPoints, std::vector<double> &C) const;
2958

Thomas Witkowski's avatar
Thomas Witkowski committed
2959
    /// Implements ZeroOrderTerm::eval().
Thomas Witkowski's avatar
Thomas Witkowski committed
2960
2961
    void eval(int nPoints,
	      const double *uhAtQP,
2962
2963
2964
2965
2966
2967
	      const WorldVector<double> *grdUhAtQP,
	      const WorldMatrix<double> *D2UhAtQP,
	      double *result,
	      double fac) const;

  protected: 
Thomas Witkowski's avatar
Thomas Witkowski committed
2968
    /// DOFVector to be evaluated at quadrature points. 
2969
2970
    DOFVectorBase<double>* vec; 

Thomas Witkowski's avatar
Thomas Witkowski committed
2971
    /// Vector v at quadrature points. 
2972
2973
    double *vecAtQPs; 

Thomas Witkowski's avatar
Thomas Witkowski committed
2974
    /// First DOFVector whose gradient is evaluated at quadrature points. 
2975
2976
    DOFVectorBase<double>* vecGrd; 

Thomas Witkowski's avatar
Thomas Witkowski committed
2977
    /// Gradient of first vector at quadrature points. 
2978
2979
    WorldVector<double> *gradAtQPs; 

Thomas Witkowski's avatar
Thomas Witkowski committed
2980
    /// Function for c. 
2981
2982
2983
2984
2985
2986
    BinaryAbstractFunction<double, double, WorldVector<double> > *f; 
  }; 

  class VecAndGradVec2AtQP_ZOT : public ZeroOrderTerm 
  { 
  public: 
Thomas Witkowski's avatar
Thomas Witkowski committed
2987
    /// Constructor. 
2988
    VecAndGradVec2AtQP_ZOT(DOFVectorBase<double> *dv, 
Thomas Witkowski's avatar
Thomas Witkowski committed
2989
2990
2991
			   DOFVectorBase<double> *dGrd1, 
			   DOFVectorBase<double> *dGrd2, 
			   TertiaryAbstractFunction<double, double, WorldVector<double>, WorldVector<double> > *af);
2992

Thomas Witkowski's avatar
Thomas Witkowski committed
2993
    /// Implementation of \ref OperatorTerm::initElement().
2994
2995
2996
    void initElement(const ElInfo* elInfo, SubAssembler* subAssembler,
		     Quadrature *quad = NULL);

Thomas Witkowski's avatar
Thomas Witkowski committed
2997
    /// Implements ZeroOrderTerm::getC().
2998
    void getC(const ElInfo *, int nPoints, std::vector<double> &C) const;
2999

Thomas Witkowski's avatar
Thomas Witkowski committed
3000
    /// Implements ZeroOrderTerm::eval().
For faster browsing, not all history is shown. View entire blame